Skip to content

Commit f714d19

Browse files
Loader Python
1 parent 46a15b4 commit f714d19

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,27 @@ Please ensure you have the following installed before starting to build.
1818
In this project we have a few diffrent types of shell code that I have built as POC using C and ASM.
1919

2020
### System Execve /bin/sh
21-
This code uses inline ASM in C for system call and executes a /bin/sh as an example.
21+
This code uses inline ASM in C for system call and executes a /bin/sh as an example.
22+
23+
## Shellcode loader
24+
25+
in the /loader folder you will find 2 loader examples, the Python and C based loader. Basic shellcode loader and best part is its pure python using ctypes and std C lib.
26+
27+
### Python Example:
28+
`python loader.py ../shellcode/system-execve-shell.sc`
29+
30+
```
31+
MacBook-Pro:loader test$ python loader.py ../shellcode/system-execve-shell.sc
32+
-------------------------------------------
33+
* C runtime libary loaded: /usr/lib/libSystem.B.dylib
34+
* Current page size: 4096
35+
* Shellcode buffer pointer: <__main__.LP_c_int object at 0x10f56b950>
36+
* Shellcode file size: 122
37+
* Shellcode file pointer: <__main__.LP_c_int object at 0x10f56b950>
38+
-------------------------------------------
39+
- Shellcode buffer now RX memory
40+
- Casting pointer to: <__main__.LP_c_int object at 0x10f56b950>
41+
- Executing shellcode
42+
bash-3.2$ exit
43+
exit
44+
```

0 commit comments

Comments
 (0)