SAP 시스템 감사 수검 시, 사용되는 유용한 명령어에 대해서 간략히 정리한다.
시스템 종류, 버전에 따라 명령어가 상이할 수 있다.
HP-UX :
/usr/sbin/swlist -l patch -a install_date | grep <대상 년도>
AIX :
instfix -i | grep ML
LINUX (SUSE) :
cut -d "|" -f 1-4 -s --output-delimiter " | " /var/log/zypp/history | grep -v " radd "
find / -name ".profile" -exec ls -al {} \;
OS 상에서 정확하게 계정 생성일을 확인할 수 없으나, 계정 생성 시 Profile 이 생성되기 때문에, 보통 해당 Profile의 생성 날짜를 계정 생성 날짜로 본다.
HP-UX:
cat /etc/default/security
Linux (SUSE) :
cat /etc/pam.d/common-password
Linux (SUSE) :
cat /etc/hosts.allow
cat /etc/hosts.deny
Oracle DB의 경우 출력 세팅과 같이 입력
Oracle :
set linesize 300
col action_time format a30
col action format a20
col namespace format a10
col version format a15
col bundle_series format a10
col comments format a35
select action_time, action, namespace, version, id, bundle_series, comments
from dba_registry_history;
HANA :
SAP HANA Studio 또는 HANA Cockpit 에서 확인 가능
Oracle :
set linesize 300
select username, user_id, password, created, ACCOUNT_STATUS
from dba_users order by created desc;
HANA :
select * from users
Oracle :
select *
from sys.dba_role_privs
where granted_role = 'DBA';
HANA :
select grantee, role_name
from granted_roles
where role_name like 'CONTENT_ADMIN%' and grantee_type = 'USER'
Oracle :
select username, profile
from dba_users;
select *
from dba_profiles
where resource_type='PASSWORD' order by PROFILE;
select resource_name, limit
from dba_profiles
where profile='<프로파일 명>';
HANA :
SAP HANA Studio 또는 HANA Cockpit 에서 확인 가능
cat <ORACLE_HOME>/rdbms/admin/utlpwdmg.sql
Oracle :
set lines 300
set pages 100
col USERNAME format a15
col USER_ID format 99
col PASSWORD format a12
col ACCOUNT_STATUS format a20
col EXTERNAL_NAME format a5
col DEFAULT_TABLESPACE format a12
col TEMPORARY_TABLESPACE format a10
col PROFILE format a15
SELECT *
FROM DBA_USERS;
set lines 300
set pages 100
col OWNER format a15
col JOB_NAME format a35
col JOB_CREATOR format a5
col JOB_ACTION format a55
col START_DATE format a35
col REPEAT_INTERVAL format a30
col ENABLE format a8
col STATE format a15
col LAST_START_DATE format a40
select OWNER, JOB_NAME, JOB_CREATOR, JOB_ACTION, START_DATE, REPEAT_INTERVAL, ENABLED, STATE, LAST_START_DATE
from dba_scheduler_jobs;
select *
from dba_sys_privs
where privilege like '%JOB%' order by grantee;
select *
from DBA_ROLE_PRIVS
where
GRANTED_ROLE in (select GRANTEE from dba_sys_privs where privilege like '%JOB%') and
GRANTEE in (select USERNAME from dba_users);
select *
from AUDIT_LOG
where TIMESTAMP like '<대상 년도>%' AND
CLIENT_IP NOT IN ('<제외 IP>')
select *
from AUDIT_LOG
where (TIMESTAMP like '<대상 년도>_<대상 월>%' OR TIMESTAMP like '<대상 년도>_<대상 월>%' OR TIMESTAMP like '<대상 년도>_<대상 월>%') AND
CLIENT_IP NOT IN ('<제외 IP>'') ORDER BY TIMESTAMP
select DISTINCT CLIENT_IP
from AUDIT_LOG
where (TIMESTAMP like '<대상 년도>_<대상 월>%' OR TIMESTAMP like '<대상 년도>_<대상 월>%' OR TIMESTAMP like '<대상 년도>_<대상 월>%')
프로그램 : RSPARAM
Tcode : TU02
프로그램 : RSUSR003
다음 포스트를 참고하여 주요 권한 오브젝트 보유자 조회
안녕하세요. IT 전산감사를 꿈꾸는 꿈나무입니다.
혹시 전산감사 직무에서 고객사 감사 진행시 포스팅해주신 명령어들을 직접 사용하는 경우가 있는 건가요?? 일반 감사용 계정을 부여받고 고객사 시스템에 접속하여 조회하는 절차인지 궁금합니다^^