This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
from z3 import * | |
import re | |
import time | |
def get_solution(diff): | |
print diff | |
s = Solver() | |
a = Int('a') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
from z3 import * | |
# Solution for Friedrich's Christmas Hangover Challenge for X-MAS CTF 2018 | |
s = Solver() | |
i1 = Int('i1') | |
i2 = Int('i2') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<title>IE SafeMode</title> | |
<script language="vbscript"> | |
Set obj = CreateObject("Shell.Application") | |
obj.ShellExecute("calc.exe"); | |
</script> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int sum(int, int, int, int); | |
int main(int argc, char **argv) | |
{ | |
int result = 0; | |
result = sum(1,2,3,4); | |
printf("The sum is: %d\n", result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Instruction Tracer to identify | |
interesting sequence of instructions | |
in malwares. | |
c0d3inj3cT | |
*/ | |
#include <stdio.h> | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Overwrite RETN opcode | |
; Control Flow Obfuscation | |
; c0d3inj3cT | |
include \masm32\include\masm32rt.inc | |
.data | |
hMod dd 0 | |
.code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Detect VMWare using OEM String in Memory | |
Tested on Windows XP SP3/VMWare Workstation 7.1.0 | |
c0d3inj3cT | |
*/ | |
#include <windows.h> | |
#include <stdio.h> | |
#define MARKER "MS_VM_CERT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ESI - Function Pointer | |
EDI - Buffer | |
00C816F9 803E E9 CMP BYTE PTR DS:[ESI],0E9 ; check if the first instruction of API is a jump instruction | |
00C816FC 75 09 JNZ SHORT 00C81707 | |
00C816FE 8B46 01 MOV EAX,DWORD PTR DS:[ESI+1] | |
00C81701 8D4430 05 LEA EAX,DWORD PTR DS:[EAX+ESI+5] | |
00C81705 EB 12 JMP SHORT 00C81719 | |
00C81707 8D46 05 LEA EAX,DWORD PTR DS:[ESI+5] ; point eax to the 5th byte of the function | |
00C8170A A5 MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI] ; store 5 bytes from the function into the buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Pintool to detect API hooks in a process | |
c0d3inj3cT | |
*/ | |
#include <stdio.h> | |
#include <iostream> | |
#include "pin.H" | |
int i=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Below are the first few lines of code of the Window Procedure: | |
00402680 55 PUSH EBP | |
00402681 8BEC MOV EBP,ESP | |
00402683 83E4 F8 AND ESP,FFFFFFF8 | |
00402686 83EC 4C SUB ESP,4C | |
00402689 A1 04A04000 MOV EAX,DWORD PTR DS:[40A004] | |
0040268E 33C4 XOR EAX,ESP | |
00402690 894424 48 MOV DWORD PTR SS:[ESP+48],EAX | |
00402694 8B45 0C MOV EAX,DWORD PTR SS:[EBP+C] ; window message code |
NewerOlder