목록2020/07 (21)
Self-Improvement
코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import requests s = requests.Session() https_check=Https_Check(target, port,s) url=https_check+"://"+target+":"+port s.get(url, verify=False) def Https_Check(target, port,s): try: resp=s.get('http://%s:%s' %(target,port)) if resp.status_code==400: return 'https' else: return 'http' except requests.exceptions.ConnectionError as e: return 'https' exc..
첫번째 코드 파일과 파일의 내용을 정해서 전송 1 2 3 4 5 import requests #proxies = {"http":"http://127.0.0.1:8080"} requests.post("http://192.168.0.1/test", \ files={"userfile":("pwn.txt",'one,two,zap,zap\none,two,three,Uppercut')}) cs Request 123456789101112131415POST /test HTTP/1.1Host: 192.168.0.1Connection: closeAccept-Encoding: gzip, deflateAccept: */*User-Agent: python-requests/2.21.0Content-Length: 185Conten..
[dreamhack] 에서 모르는 용어나 단어가 보여 정리하고자 쓴다. OOB(Out Of Boundary) OOB는 버퍼의 길이 범위를 벗어나는 인덱스에 접근할 때 발생하는 취약점이다. 소스코드 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include int main(void) { int win; int idx; int buf[10]; printf("Which index? "); scanf("%d", &idx); printf("Value: "); scanf("%d", &buf[idx]); printf("idx: %d, value: %d\n", idx, buf[idx]); if(win == 31337){ printf("Vulner{-----------redeacted---..
보호되어 있는 글입니다.
보호되어 있는 글입니다.
보호되어 있는 글입니다.
보호되어 있는 글입니다.
RELRO ELF 바이너리에서 printf와 같이 동적으로 링크된 라이브러리의 함수를 호출할 때, 호출된 함수의 주소를 찾기 위해 PLT(Procedure Linkage Table)와 GOT(Global Offset Table)를 사용한다. GOT에는 처음에 라이브러리 함수의 주소를 구하는 바이너리 코드 영역 주소가 저장되어 있다가, 함수가 처음 호출될 때 라이브러리 함수의 실제 주소가 저장되며 바이너리가 실행되는 도중, 함수가 처음 호출될 때 주소를 찾는 방식을 Lazy Binding이라고 한다. Lazy Binding을 할 때는 프로그램이 실행되고 있는 도중 GOT에 라이브러리 함수의 주소를 덮어써야 하기 때문에 GOT에 쓰기 권한이 있어야 합니다. GOT에 값을 쓸 수 있다는 특징 때문에 ROP 익..
소스코드 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 #include #include #include #include #include using namespace std; class Human{ private: virtual void give_shell(){ system("/bin/sh"); } protected: int age; string na..
보호되어 있는 글입니다.