분류 전체보기
-
pwnable 기본 세팅ETC/Pwn 메모장 2021. 4. 28. 16:48
# 기본세팅 sudo apt-get update sudo apt-get -y upgrade # 파이썬 sudo apt-get install python python-dev python-pip # 32비트 sudo dpkg --add-architecture i386 sudo apt-get update sudo apt install build-essential sudo apt install gcc-multilib sudo apt-get install libc6:i386 libstdc++6:i386 # peda sudo apt install gdb git clone https://github.com/longld/peda.git ~/peda echo "source ~/peda/peda.py" >> ~/.gdbi..
-
Python JailCoding/Python 2021. 4. 8. 14:07
Python Jail이란? def main(): print(open(__file__).read()) print("Welcome to Jail World!") text = input('>>> ') for keyword in ['eval', 'exec', 'import', 'open', 'os', 'read', 'system', 'write']: if keyword in text: print("Filtered Keyword.") return; else: exec(text) if __name__ == "__main__": main() 위 코드와 같이 CTF에서 나오는 문제 유형으로, Bash Jail과 비슷한 유형으로 나온다. 문자열을 filtering 하며, filtering에 걸리지 않은 문자열들은 exe..
-
seccomp 문제 만들때ETC/Pwn 메모장 2020. 11. 15. 13:48
sudo apt-get -y install libseccomp-dev gcc -o seccomp1 seccomp1.c -lseccomp ./seccomp1 libseccomp-dev 패키지 설치 및 gcc 옵션으로 -lseccomp 추가 출처 s3hh.wordpress.com/2012/07/24/playing-with-seccomp/ Playing with seccomp Seccomp is a linux kernel feature by Andrea Arcangeli which limits the system calls which a task can use, by allowing a task to say “from now on, msyelf and my new children should not be ab..
-
wsl의 버전이 2일때, wsl에 탐색기로 접근하는 방법카테고리 없음 2020. 9. 30. 02:58
기존 wsl1에서는 %LOCALAPPDATA%\Packages\CanonicalGroupLimited.[wsl패키지명]\LocalState 에 가면 접근이 가능했었다. 하지만 wsl2에서는 아래와 같이 이미지 파일로 저장이 되어 있어서 접근이 불가능하다. 이에 대한 접근 방법으로는 다음과 같은 방법이 있다. [시작] - [실행] - '\\$wsl\' 으로 모든 접근 가능한 wsl목록들이 탐색기에 나타난다. 참조 https://devblogs.microsoft.com/commandline/whats-new-for-wsl-in-windows-10-version-1903/
-
wsl 에서 32bit binary 실행하기ETC/그 외 메모장 2020. 9. 30. 02:00
wsl에서는 기본적으로, 아래과 같이 32bit binary가 실행이 되지 않는다. e10@ELEFT:~$ ./basic_exploitation_000 -bash: ./basic_exploitation_000: No such file or directory 하지만, 다음과 같이 설정해주면 실행할 수 있다. sudo dpkg --add-architecture i386 sudo apt-get update sudo apt install build-essential sudo apt install gcc-multilib 정상적으로 실행이 되는 것을 확인할 수 있다. e10@ELEFT:~$ ./basic_exploitation_000 buf = (0xffbf0228) 참조 https://stackoverflow.c..