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.dev3408.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.dev3408-cp312-cp312-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.12Windows x86-64

sogen-0.0.1.dev3408-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.dev3408-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.dev3408-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.dev3408.tar.gz.

File metadata

  • Download URL: sogen-0.0.1.dev3408.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.dev3408.tar.gz
Algorithm Hash digest
SHA256 e3119d92f73928e0a80700a16406b8dcc415b85d496cd6cc739f0eca7dc7c43c
MD5 f4629e86655fb1a5b9b46be0aac4460d
BLAKE2b-256 b40be73d0af84b60cc15c5fd0854d83706682dc2a3f505d2266597c3cdd9bb1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3408.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.dev3408-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for sogen-0.0.1.dev3408-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ec9244fdcbe3afa7c6684dcf4bc7f65b17b2c8419d84405e253fd94fcb61fb0a
MD5 1a4e2cfde5431f34c7d9376444d70641
BLAKE2b-256 73f1d100b039e9afb3ac177e4940c4a7df2ff548890d0d5c7e1183ec5ed0c879

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3408-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.dev3408-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for sogen-0.0.1.dev3408-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 8b98d98db82f4b8e3d8fe1ad0c24093c73c7507e3346bd9dbbe31c85d840aec8
MD5 5ef3d2d2c50982b017197712d250c5c7
BLAKE2b-256 894e0a36e28a37123e43b4355661772c808a6d2831636617b062d61afbee75ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3408-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.dev3408-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for sogen-0.0.1.dev3408-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 800eeccb0256d50502b8d2becdd4ab333cb2e5f8698f772069967fa622b95dcd
MD5 6f2e564507485ce39d2d5738785c0038
BLAKE2b-256 875d8453e0e34a6a0a0aac1127c3e175c7175b294c3c5150505fdd204e49ddda

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3408-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.dev3408-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for sogen-0.0.1.dev3408-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5cf6f11788589f53d9c1fedb7e6144916cc06bce09412b5f92882d864921aad8
MD5 83a8857b1401a1feb5d204e758bb2b07
BLAKE2b-256 f4bde885e257191a053359c447c4161cc3108adaa0b90be0989b89dd14807069

See more details on using hashes here.

Provenance

The following attestation bundles were made for sogen-0.0.1.dev3408-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