All Projects → b1tg → Rust Windows Shellcode

b1tg / Rust Windows Shellcode

Windows shellcode development in Rust

Programming Languages

rust
11053 projects
shellcode
44 projects

Projects that are alternatives of or similar to Rust Windows Shellcode

Ffm
Freedom Fighting Mode: open source hacking harness
Stars: ✭ 302 (+350.75%)
Mutual labels:  offensive-security
Oscp Exam Report Template
Modified template for the OSCP Exam and Labs. Used during my passing attempt
Stars: ✭ 506 (+655.22%)
Mutual labels:  offensive-security
Awesome Oscp
A curated list of awesome OSCP resources
Stars: ✭ 804 (+1100%)
Mutual labels:  offensive-security
Vault
swiss army knife for hackers
Stars: ✭ 346 (+416.42%)
Mutual labels:  offensive-security
Vanquish
Vanquish is Kali Linux based Enumeration Orchestrator. Vanquish leverages the opensource enumeration tools on Kali to perform multiple active information gathering phases.
Stars: ✭ 449 (+570.15%)
Mutual labels:  offensive-security
Blackmamba
C2/post-exploitation framework
Stars: ✭ 544 (+711.94%)
Mutual labels:  offensive-security
East
Exploits and Security Tools Framework 2.0.1
Stars: ✭ 283 (+322.39%)
Mutual labels:  offensive-security
Pentest
⛔️ offsec batteries included
Stars: ✭ 1,063 (+1486.57%)
Mutual labels:  offensive-security
Chimera
Chimera is a (shiny and very hack-ish) PowerShell obfuscation script designed to bypass AMSI and commercial antivirus solutions.
Stars: ✭ 463 (+591.04%)
Mutual labels:  offensive-security
Rapidscan
🆕 The Multi-Tool Web Vulnerability Scanner.
Stars: ✭ 775 (+1056.72%)
Mutual labels:  offensive-security
Badkarma
network reconnaissance toolkit
Stars: ✭ 353 (+426.87%)
Mutual labels:  offensive-security
Oscp Pwk
This is my cheatsheet and scripts developed while taking the Offensive Security Penetration Testing with Kali Linux course.
Stars: ✭ 406 (+505.97%)
Mutual labels:  offensive-security
Keylogger
Get Keyboard,Mouse,ScreenShot,Microphone Inputs from Target Computer and Send to your Mail.
Stars: ✭ 604 (+801.49%)
Mutual labels:  offensive-security
Black Hat Rust
Applied offensive security with Rust - Early access - https://academy.kerkour.com/black-hat-rust?coupon=GITHUB
Stars: ✭ 331 (+394.03%)
Mutual labels:  offensive-security
Offensive Terraform.github.io
Offensive Terraform Website
Stars: ✭ 25 (-62.69%)
Mutual labels:  offensive-security
Rmiscout
RMIScout uses wordlist and bruteforce strategies to enumerate Java RMI functions and exploit RMI parameter unmarshalling vulnerabilities
Stars: ✭ 296 (+341.79%)
Mutual labels:  offensive-security
Bigbountyrecon
BigBountyRecon tool utilises 58 different techniques using various Google dorks and open source tools to expedite the process of initial reconnaissance on the target organisation.
Stars: ✭ 541 (+707.46%)
Mutual labels:  offensive-security
Pathwar
☠️ The Pathwar Project ☠️
Stars: ✭ 58 (-13.43%)
Mutual labels:  offensive-security
Oscp
My OSCP journey
Stars: ✭ 50 (-25.37%)
Mutual labels:  offensive-security
Vhostscan
A virtual host scanner that performs reverse lookups, can be used with pivot tools, detect catch-all scenarios, work around wildcards, aliases and dynamic default pages.
Stars: ✭ 767 (+1044.78%)
Mutual labels:  offensive-security

Write Windows Shellcode in Rust

Project overview

Windows shellcode project is located in shellcode/, it can build into a PE file with only .text section and has no external dependencies.

shellcode.exe in pe-bear

Then we can dump the .text section and do some patches to make it position-independent. this idea was from hasherezade's project masm_shc.

How to build it

(Only tested on Win10 x64)

Build shellcode binary

rustup default nightly-x86_64-pc-windows-msvc
cd shellcode/
cargo build --release

If everthing goes well, we will get shellcode\target\x86_64-pc-windows-msvc\release\shellcode.exe

Dump .text section and do some patches

We patch at the start of .text section, make it jump to entry point. In this way, we can have some strings store in the merged section, or we have to use u8 and u16 bytes array on stack to represent string.

cd ..
cargo run

We will get shellcode\target\x86_64-pc-windows-msvc\release\shellcode.bin, this is the final shellcode file.

Test shellcode

Test the shellcode use your favorite shellcode loader, i use my own little tool rs_shellcode for demonstration.

git clone https://github.com/b1tg/rs_shellcode
cd rs_shellcode/
cargo build
./target/debug/rs_shellcode.exe -f "shellcode\target\x86_64-pc-windows-msvc\release\shellcode.bin" 

This demo shellcode will popup a message box and print some log use OutputDebugStringA, you can check it out in debugview or windbg.

run shellcode

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].