Top Related Projects
The pattern matching swiss knife
UNIX-like reverse engineering framework and command-line toolset
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
FLARE Obfuscated String Solver - Automatically extract obfuscated strings from malware.
IDA Pro utilities from FLARE team
Quick Overview
The corkami/pocs repository is a collection of Proof of Concepts (PoCs) and examples related to file formats, parsers, and various security-related topics. It serves as a resource for researchers, developers, and security professionals to understand and explore different file structures, vulnerabilities, and edge cases in various formats and systems.
Pros
- Comprehensive collection of file format examples and edge cases
- Valuable resource for security researchers and developers
- Regularly updated with new PoCs and examples
- Includes both common and obscure file formats
Cons
- May require advanced knowledge to fully understand and utilize some PoCs
- Some examples might be outdated or specific to certain versions of software
- Lack of detailed documentation for each PoC
- Potential for misuse if not handled responsibly
Code Examples
This repository is not a code library in the traditional sense, but rather a collection of file samples and proof of concepts. Therefore, there are no specific code examples to provide.
Getting Started
As this is not a code library, there are no specific getting started instructions. However, users can explore the repository by:
- Cloning the repository:
git clone https://github.com/corkami/pocs.git
- Browsing the different directories to find relevant file format examples or PoCs
- Using appropriate tools or software to analyze and study the provided samples
- Referring to the README files in each directory for additional information about specific PoCs or file formats
Competitor Comparisons
The pattern matching swiss knife
Pros of yara
- Widely adopted industry standard for malware detection and classification
- Extensive documentation and community support
- Regularly updated with new features and improvements
Cons of yara
- Steeper learning curve for beginners
- Requires more setup and integration with other tools for full functionality
- Limited to pattern matching and may miss complex malware behaviors
Code comparison
yara:
rule ExampleRule {
strings:
$a = "suspicious_string"
condition:
$a
}
pocs:
# No direct code comparison available
# pocs focuses on proof-of-concept files rather than detection rules
Summary
yara is a powerful and widely-used tool for malware detection, offering extensive features and community support. However, it has a steeper learning curve and requires more setup than pocs.
pocs, on the other hand, provides a collection of proof-of-concept files for various file formats and vulnerabilities. It's more focused on demonstrating concepts rather than active detection.
While yara is better suited for large-scale malware detection and analysis, pocs is valuable for understanding file format vulnerabilities and edge cases in parsing.
UNIX-like reverse engineering framework and command-line toolset
Pros of radare2
- Comprehensive reverse engineering framework with extensive features
- Active development and large community support
- Well-documented with extensive user guides and API references
Cons of radare2
- Steeper learning curve due to complex functionality
- Larger codebase and resource footprint
- May be overkill for simple analysis tasks
Code comparison
radare2:
RCore *core = r_core_new();
r_core_cmd_str(core, "aaa");
r_core_cmd_str(core, "pdf@main");
r_core_free(core);
pocs:
import pefile
pe = pefile.PE('sample.exe')
print(pe.dump_info())
Key differences
pocs:
- Focused on proof-of-concept exploits and file format tricks
- Lightweight and easy to understand examples
- Primarily educational and research-oriented
radare2:
- Full-featured reverse engineering and binary analysis tool
- Supports a wide range of architectures and file formats
- Includes disassembly, debugging, and scripting capabilities
Both projects serve different purposes in the security and reverse engineering domain. pocs is ideal for learning about specific vulnerabilities and file format quirks, while radare2 is a powerful tool for in-depth analysis and reverse engineering of complex binaries.
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
Pros of Unicorn
- Comprehensive CPU emulation framework supporting multiple architectures
- Extensive documentation and active community support
- Integrates well with other security tools and frameworks
Cons of Unicorn
- Steeper learning curve for beginners
- Requires more setup and configuration for specific use cases
- Larger codebase and resource footprint
Code Comparison
Unicorn (emulating x86 code):
from unicorn import *
from unicorn.x86_const import *
CODE = b"\x41\x4a" # INC ecx; DEC edx
mu = Uc(UC_ARCH_X86, UC_MODE_32)
mu.mem_map(0x1000000, 2 * 1024 * 1024)
mu.mem_write(0x1000000, CODE)
mu.emu_start(0x1000000, 0x1000000 + len(CODE))
Pocs (example of a simple x86 shellcode):
; Simple x86 shellcode
xor eax, eax
push eax
push 0x68732f2f
push 0x6e69622f
mov ebx, esp
mov ecx, eax
mov edx, eax
mov al, 0xb
int 0x80
Note: Pocs primarily focuses on providing proof-of-concept examples and documentation for various file formats and security-related concepts, while Unicorn is a full-fledged CPU emulation engine.
Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
Pros of Capstone
- Comprehensive multi-architecture disassembly framework
- Actively maintained with regular updates and bug fixes
- Extensive documentation and API support for multiple programming languages
Cons of Capstone
- Larger codebase and more complex to integrate
- Focused solely on disassembly, lacking broader reverse engineering features
- Steeper learning curve for beginners
Code Comparison
Capstone (disassembling x86 code):
from capstone import *
CODE = b"\x55\x48\x8b\x05\xb8\x13\x00\x00"
md = Cs(CS_ARCH_X86, CS_MODE_64)
for i in md.disasm(CODE, 0x1000):
print("%x:\t%s\t%s" %(i.address, i.mnemonic, i.op_str))
Pocs (example of a simple PE file structure):
import struct
e_magic = b'MZ'
e_cblp = struct.pack('<H', 0x90)
e_cp = struct.pack('<H', 0x3)
e_crlc = struct.pack('<H', 0x0)
Summary
Capstone is a powerful disassembly engine suitable for complex reverse engineering tasks, while Pocs focuses on providing proof-of-concept examples for various file formats and security-related concepts. Capstone offers more depth in disassembly, whereas Pocs provides a broader range of examples across different areas of reverse engineering and malware analysis.
FLARE Obfuscated String Solver - Automatically extract obfuscated strings from malware.
Pros of flare-floss
- Focused tool for automated string extraction from malware
- Actively maintained with regular updates
- Comprehensive documentation and usage examples
Cons of flare-floss
- Limited scope compared to the broader range of pocs
- Steeper learning curve for non-security professionals
- Requires more setup and dependencies
Code comparison
flare-floss:
def extract_strings(vw, function_start):
strings = []
for basic_block in vw.getBasicBlocks(function_start):
for i in basic_block.getInstructions():
strings.extend(extract_strings_from_instruction(vw, i))
return strings
pocs:
def check_pe(filename):
with open(filename, "rb") as f:
data = f.read(2)
return data == b"MZ"
The flare-floss code snippet demonstrates its focus on string extraction from binary instructions, while the pocs example shows a simple PE file format check, illustrating the broader scope of file format exploration in pocs.
flare-floss is a specialized tool for malware analysis, offering advanced string extraction capabilities. pocs, on the other hand, provides a diverse collection of proof-of-concept examples covering various file formats and security concepts, making it more accessible for general learning and exploration.
IDA Pro utilities from FLARE team
Pros of flare-ida
- Focused specifically on IDA Pro, providing specialized tools and scripts
- Actively maintained by Mandiant, a respected cybersecurity firm
- Includes comprehensive documentation and usage examples
Cons of flare-ida
- Limited scope compared to pocs, which covers a broader range of topics
- Requires IDA Pro, which is a commercial tool, limiting accessibility
- Steeper learning curve for users not familiar with IDA Pro
Code Comparison
flare-ida (Python script for IDA Pro):
import idaapi
import idc
def find_function(name):
return idaapi.get_name_ea(BADADDR, name)
def main():
func_addr = find_function("main")
if func_addr != BADADDR:
print(f"Main function found at 0x{func_addr:x}")
pocs (Assembly code example):
section .text
global _start
_start:
mov eax, 4
mov ebx, 1
mov ecx, message
mov edx, 13
int 0x80
mov eax, 1
xor ebx, ebx
int 0x80
The code examples demonstrate the different focus areas of the two repositories. flare-ida provides Python scripts for IDA Pro analysis, while pocs offers low-level assembly examples for various purposes.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Top Related Projects
The pattern matching swiss knife
UNIX-like reverse engineering framework and command-line toolset
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
FLARE Obfuscated String Solver - Automatically extract obfuscated strings from malware.
IDA Pro utilities from FLARE team
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot