본문 바로가기

[Defcon 2014] HJ(2) byhd write up I think It is not a good solution. I did just brute-force to find encoded shellcode.It was first time to brute-force the remote binary, So I just want to share my experience. The method is that I hooked server side. So, server side send the encoded value to client.Then, client check if the encoded value is same with our shell code or not. I repeated this method. following code is server hooking .. 더보기
[Defcon 2014] 100 lines exploit 직접 알고리즘 분석해서, 파이썬으로 옮긴후 최적화를 한거라서 딱히 설명할것은 없고, 그냥 익스플로잇만. http://pastebin.com/MGKqAZhK from socket import *import time randpad ="FC8A4551678CA9C0B0FDF76FB850F12F7A6266E3D3C36EBE373933683BC6761EAEAA83ED571AF129E6C1B99EDDA2862C1ADC499D8201D53AB5D333121CCE942BC3B06CBC4673395E7BC7B49E56F0AD725E83C705C5E92E85887994F7E7AC34FE5CCE2E13F1CC8EEA6083BEDC4ABBE8DF6520EF44ADFAD61283D5DC94AD1FE15FE8FA7E3FDA61E.. 더보기
Python Pickle 취약점 이번 plaid CTF 에서 나온 취약점... 사실 알려진지는 좀 오래 되었던 듯 하다.pickle 자체는 머신러닝 공부하면서 처음 접해봤는데, 생각없이 쓰기만 하다가, 이것만으로도 RCE가 된다는건 상상도 못했었다. 애초에, pickle이 안전하지 않다.다른사람이 준 pickle을 load하기만 해도, 쉘을 따일수가 있으니 절대 받지 않도록 한다. 취약점은 __reduce__ method에서 발생한다. unpickle을 할때, 어떻게 재구성할지에 대한 tuple을 반환 하는 메소드인데, 그 tuple에 함수 또한 리턴하며, 그 함수를 콜을 하게 된다. import cPickleimport os class exploit(object): def __reduce__(self): return (os.syste.. 더보기