전체 글435 Using PIN_SafeCopy() #include #include "pin.H" #include #include std::ofstream* out = 0; //======================================================= // Analysis routines //======================================================= // Move from memory to register ADDRINT DoLoad(REG reg, ADDRINT * addr) { *out 2018. 9. 18. 9/17 파티션 기능이 있다.(/data, /system 따라서 권한을 획득하면 두 곳다 뚫을 수 있따)emmcufs /data/system/sdcard 물리적획득: 사라진 파일을 복구할 수 있다but 분석관이 모든 권한을 갖는건 프라이버시 침해->주로 논리적 획득현재는 물리적 획득 불가능 펌웨어란? 하드웨어----펌웨어----소프트웨어 임시루팅: 껐다 켜면 루팅이 안되어있고 완전루팅은 되어있다. 부팅->boot-loader모드:boot.img , recovery mode(안전모드):recovery.img 2018. 9. 17. Procedure Instruction Count (Routine Instrumentation) *질문 // // This tool counts the number of times a routine is executed and // the number of instructions executed in a routine // #include #include #include #include #include "pin.H" ofstream outFile; // Holds instruction count for a single procedure typedef struct RtnCount { string _name; string _image; ADDRINT _address; RTN _rtn; UINT64 _rtnCount; UINT64 _icount; struct RtnCount * _next; } RTN_COUNT.. 2018. 9. 14. More Efficient Instruction Counting (Trace Instrumentation) +질문 #include #include #include "pin.H" ofstream OutFile; // The running count of instructions is kept here // make it static to help the compiler optimize docount static UINT64 icount = 0; // This function is called before every block VOID docount(UINT32 c) { icount += c; } // Pin calls this function every time a new basic block is encountered // It inserts a call to docount VOID Trace(TRACE trace, .. 2018. 9. 14. Detecting the Loading and Unloading of Images (Image Instrumentation)+질문 // // This tool prints a trace of image load and unload events // #include "pin.H" #include #include #include using namespace std; KNOB KnobOutputFile(KNOB_MODE_WRITEONCE, "pintool", "o", "imageload.out", "specify file name"); ofstream TraceFile; // Pin calls this function every time a new img is loaded // It can instrument the image, but this example does not // Note that imgs (including shared.. 2018. 9. 14. Memory Reference Trace (Instruction Instrument) /* * This file contains an ISA-portable PIN tool for tracing memory accesses. */ #include #include "pin.H" FILE * trace; // Print a memory read record VOID RecordMemRead(VOID * ip, VOID * addr) { fprintf(trace, "%p: R %p\n", ip, addr); } // Print a memory write record VOID RecordMemWrite(VOID * ip, VOID * addr) { fprintf(trace, "%p: W %p\n", ip, addr); } // Is called for every instruction and in.. 2018. 9. 14. 9/14 전쟁이란 무엇인가 고대 그리스 도시국가아테네스파르테테베.. 전투대형: 방진(그리스 말로: 팔랑크스)Phalanx 스파르타 300 '마케도니아'->창이 길어서 유일한 문제점: 빼는게 어렵다창이길면 여러개 있는 것 같이 보인 뒤에걸 앞 으로 빼서 마케도니아(도 그리스)는 아테네와 테베를 물리쳐!필리포스 아들:알렉산더 알렉산더 vs 페르시아 알렉산더 성공의 요소: 병참 고대최초전쟁: 농경시대 식량 훔치고 노예 훔치고 제국의 역사는 ~~다음 제국을 의미함. 전쟁을 빨리 끝내고 농사->속전속결 전쟁이 잔인해진 이유1. 종교2. 정치적 이념 동족상잔: fratricide 삼단노\\\ 2018. 9. 14. 9/13 OSI 7 layer 라우터 wireshark Packet List Packet Detail Packet Byte http Frame에는 메타정보 bit stream에 있는 내용이 아니다 첫번째 과제는 파싱! DNS Ethenet->IP->UDP->DNS PDU Destination MAC address: 공유기 address Source 앞에 3바이트는 제조업체에 따라 Ethernet Type을 보고 0800이면 IPv4 86DD이면 IPv6 fopen pcap_open fread pcap_next_ex fwrite pcap_sendpacket fclose pcap_close https://gitlab.com/gilgil/network -> wiki /usr/include 에 header /usr/li.. 2018. 9. 13. Instruction Address Trace(Instruction Instrumentation) #include #include #include "pin.H" FILE * trace; // This function is called before every instruction is executed //and prints the IP; VOID printip(VOID * ip) { fprintf(trace, "%p\n", ip); } // Pin calls this function every time a new instruction is encountered VOID Instruction(INS ins, VOID *v) { // Insert a call to printip before every instruction, and pass it the IP INS_InsertCall(ins, IPOINT_.. 2018. 9. 11. 이전 1 ··· 9 10 11 12 13 14 15 ··· 49 다음