Skip to main content

Sogen Windows user-space emulator bindings

Project description


Sogen is a high-performance Windows user space emulator that operates at syscall level, providing full control over process execution through comprehensive hooking capabilities.

Perfect for security research, malware analysis, and DRM research where fine-grained control over process execution is required.

Built in C++ and powered by the backend of your choice:

Try it out: sogen.dev


[!WARNING]
Caution is advised when analyzing malware in Sogen, as host isolation might not be perfect.
To mitigate potential risk, use the web version to benefit from the additional safety provided by your browser's sandbox.

Key Features

  • 🔄 Syscall-Level Emulation
    • Instead of reimplementing Windows APIs, the emulator operates at the syscall level, allowing it to leverage existing system DLLs
  • 📝 Advanced Memory Management
    • Supports Windows-specific memory types including reserved, committed, built on top of Unicorn's memory management
  • 📦 Complete PE Loading
    • Handles executable and DLL loading with proper memory mapping, relocations, and TLS
  • Exception Handling
    • Implements Windows structured exception handling (SEH) with proper exception dispatcher and unwinding support
  • 🧵 Threading Support
    • Provides a scheduled (round-robin) threading model
  • 💾 State Management
    • Supports both full state serialization and fast in-memory snapshots
  • 💻 Debugging Interface
    • Implements GDB serial protocol for integration with common debugging tools (IDA Pro, GDB, LLDB, VS Code, ...)

Preview

Preview

YouTube Overview

YouTube Video

Click here for the slides.

Quick Start (Windows + Visual Studio)

[!TIP]
Checkout the Wiki for more details on how to build & run the emulator on Windows, Linux, macOS, ...

1. Checkout the code:

git clone --recurse-submodules https://github.com/momo5502/sogen.git

2. Run the following command in an x64 Development Command Prompt in the cloned directory:

cmake --preset=vs2022

3. Build the solution that was generated at build/vs2022/emulator.sln

4. Create a registry dump by running the grab-registry.bat as administrator and place it in the artifacts folder next to the analyzer.exe

5. Run the program of your choice:

analyzer.exe C:\example.exe

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sogen-0.0.1.dev3391.tar.gz (20.7 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sogen-0.0.1.dev3391-cp312-cp312-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.12Windows x86-64

sogen-0.0.1.dev3391-cp312-cp312-manylinux_2_39_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

sogen-0.0.1.dev3391-cp312-cp312-macosx_15_0_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

sogen-0.0.1.dev3391-cp312-cp312-macosx_15_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file sogen-0.0.1.dev3391.tar.gz.

File metadata

  • Download URL: sogen-0.0.1.dev3391.tar.gz
  • Upload date:
  • Size: 20.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sogen-0.0.1.dev3391.tar.gz
Algorithm Hash digest
SHA256 b72eae8d691c22e5eb9162e29979185e5db4dd67c53e6e2f7d51b179d30b64aa
MD5 406b105a07175550524ba6a1e71b97f8
BLAKE2b-256 e34d489fc610e699c0133a20747aea22bf77a38ec2f418b3500cc58e84d5b4c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3391.tar.gz:

Publisher: build-push.yml on momo5502/sogen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sogen-0.0.1.dev3391-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for sogen-0.0.1.dev3391-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5b72ec9fbd2924225d63cdfbdc75384ee28c6661fba525b4838f6b105f953dca
MD5 351091e7197465af9327707c0e2f67ca
BLAKE2b-256 0f7c9b5d55ddb373df8daa294bb38fb31bb322624bd5250cb25b53089a6ce939

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3391-cp312-cp312-win_amd64.whl:

Publisher: build-push.yml on momo5502/sogen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sogen-0.0.1.dev3391-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for sogen-0.0.1.dev3391-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 fdca3d738c6bbdc4977b28563cd8ce4bbeba8f17ecfb69e74009ad069d985252
MD5 ca45b42620f8d711c2637ffe3c9b0448
BLAKE2b-256 74a9b4aa6b5cce20f2983104328da4654ff5997e347b0a6c00675490cc592b69

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3391-cp312-cp312-manylinux_2_39_x86_64.whl:

Publisher: build-push.yml on momo5502/sogen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sogen-0.0.1.dev3391-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for sogen-0.0.1.dev3391-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 a057a861ceea88daac3d75f7005e3df7ec71a155dbf7fad48f538653152ec9f6
MD5 aee60b0911e51043219683f37cd513e9
BLAKE2b-256 96b8a2bd2ae7bae665f1b58a194d006fcf97d37c458c16f278c23434f0045c84

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3391-cp312-cp312-macosx_15_0_x86_64.whl:

Publisher: build-push.yml on momo5502/sogen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sogen-0.0.1.dev3391-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for sogen-0.0.1.dev3391-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5e439ce6af0a3cd9945e19a322e54e4f1c8e5605439b7cf8447e80b6df698605
MD5 d80647d4c48d3fdc3c21bc6d41ebcec1
BLAKE2b-256 10967df600a5e0d312a5869a7e2642125f9b00fcde19b3a50066a9a7b2d21a1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3391-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: build-push.yml on momo5502/sogen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page