MCPcopy Index your code
hub / github.com/codewhitesec/Lastenzug

github.com/codewhitesec/Lastenzug @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
200 symbols 452 edges 52 files 79 documented · 40%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LastenZug

This project implements a Socka4a proxy based on websockets.

The client component is implemented in C compiling down to fully position independent code (PIC).

During the compilation process, obfuscation is applied on assembly level by leveraging a second tool: SpiderPIC located in LastenPIC/SpiderPIC

SpiderPIC

The obfuscation includes: - Instruction substitution - Adding trash and a jump over the trash - Adding useless instructions

This is meant to break static signatures, however you need to keep in mind that API hashes, strings and other constants are not obfuscated during this process.

Usage

Client

The makefile produces both: the PIC socks client and a sample loader for the shellcode. You can call the shellcode using the following prototype:

DWORD lastenzug(PWSTR wServerName, PWSTR wPath, DWORD port, PWSTR proxy, PWSTR pUserName, PWSTR pPassword);

The sample loader embeds the shellcode in its .text segment and can be called as follows:

.\LastenLoader.exe --server [host] --path [path used by server] --port [port]

Server

cd Server && go build -o LastenServer
./LastenServer server --addr ws://0.0.0.0:8080/lastenzug

Credits

  • Our @invist for implementing the backend
  • Our @thefLinkk for implementing the client

Extension points exported contracts — how you extend this code

Translator (Interface)
Translater defines how to read/write Packets between agents [2 implementers]
Server/lib/protocol/protocol.go
ID (Interface)
defines the ID interface [1 implementers]
Server/lib/protocol/protocol.go
Server (Interface)
Server
Server/lib/component/server/server.go
ConnHandleFunc (FuncType)
ConnHandleFunc
Server/lib/component/server/standard.go
DialFunc (FuncType)
(no doc)
Server/lib/laeufer/dial.go

Core symbols most depended-on inside this repo

getFunctionPtr
called by 30
LastenPIC/src/ApiResolve.c
Close
called by 9
Server/lib/laeufer/http/http_conn.go
HandleRead
called by 7
Server/lib/laeufer/laeufer.go
Done
called by 7
Server/lib/laeufer/laeufer.go
ID
called by 6
Server/lib/protocol/protocol.go
String
called by 6
Server/lib/laeufer/http/http_conn.go
LogInfo
called by 6
LastenPIC/SpiderPIC/src/misc.go
Bind
called by 5
Server/lib/component/server/socks5.go

Shape

Function 96
Method 67
Struct 15
Class 8
TypeAlias 8
FuncType 3
Interface 3

Languages

Go82%
C13%
C++6%

Modules by API surface

Server/lib/laeufer/http/http_conn.go18 symbols
Server/lib/laeufer/laeufer.go11 symbols
LastenPIC/src/ApiResolve.c10 symbols
Server/lib/protocol/sessionid.go9 symbols
Server/lib/talje.go8 symbols
LastenPIC/src/Core.c8 symbols
Server/lib/laeufer/tcp/tcp.go7 symbols
Server/lib/laeufer/conn_pool.go7 symbols
Server/lib/component/server/socks5.go7 symbols
Server/lib/component/server/http.go7 symbols
LastenPIC/src/ApiResolve.h7 symbols
Server/lib/protocol/protocol.go6 symbols

For agents

$ claude mcp add Lastenzug \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact