There are situations when c interacts with golang for example in a library, and its possible to exploit a golang function writing raw memory using an unsafe.Pointer() parameter.
When golang receive a null terminated string on a *C.Char parameter, can be converted to golang s tring with s2 := C.GoString(s1) we can do string operations with s2 safelly if the null byte is there.
When golang receives a pointer to a buffer on an unsafe.Pointer() and the length of the buffer on a C.int, if the length is not cheated can be converted to a []byte safelly with b := C.GoBytes(buf,sz)
Buuut what happens if golang receives a pointer to a buffer on an unsafe.Pointer() and is an OUT variable? the golang routine has to write on this pointer unsafelly for example we can create a golangs memcpy in the following way:
We convert to uintptr for indexing the pointer and then convert again to pointer casted to a byte pointer dereferenced and every byte is writed in this way.
If b is controlled, the memory can be written and the return pointer of main.main or whatever function can be modified.
https://play.golang.org/p/HppcVpLfuMf
The return addres can be pinpointed, for example 0x41 buffer 0x42 address:
We can reproduce it simulating the buffer from golang in this way:
we can dump the address of a function and redirect the execution to it:
https://play.golang.org/p/7htJHJp8gUJ
In this way it's possible to build a rop chain using golang runtime to unprotect a shellcode.
More info
- Hacker Tools For Pc
- Best Hacking Tools 2019
- Pentest Tools Online
- Hacking App
- Usb Pentest Tools
- Hack App
- Wifi Hacker Tools For Windows
- Hacker Tools Apk Download
- Pentest Tools Windows
- Hacking Apps
- Hacker Tools Free
- Pentest Tools Linux
- Hack Rom Tools
- Wifi Hacker Tools For Windows
- Pentest Tools Bluekeep
- Hacking Tools
- Hacking Tools For Pc
- Hack Tools For Windows
- Pentest Tools Framework
- Hack Tool Apk No Root
- Install Pentest Tools Ubuntu
- Hacking Tools For Beginners
- Hacking Tools Free Download
- Hacking Tools
- Install Pentest Tools Ubuntu
- Hacker Tools
- Bluetooth Hacking Tools Kali
- Hack App
- Nsa Hacker Tools
- Hacking Tools For Pc
- Hacker Search Tools
- Hacker Tools For Mac
- Pentest Tools Download
- Pentest Box Tools Download
- Pentest Tools Linux
- Hack Tools For Windows
- Growth Hacker Tools
- Hacking Tools Online
- Hacker Tools Windows
- Usb Pentest Tools
- How To Make Hacking Tools
- Bluetooth Hacking Tools Kali
- Pentest Tools Windows
- Hackrf Tools
- Best Pentesting Tools 2018
- Pentest Box Tools Download
- Nsa Hacker Tools
- Pentest Tools Windows
- Hacking Tools For Kali Linux
- Bluetooth Hacking Tools Kali
- Hacking Tools Online
- Hack Tool Apk
- Hacker Tools Hardware
- Hacking Tools For Kali Linux
- Pentest Tools List
- Pentest Tools Download
- Tools For Hacker
- Pentest Tools For Android
- Pentest Tools List
- Hacking Tools For Mac
- Hack Tools For Games
- Underground Hacker Sites
- Pentest Tools Framework
- Hack Tools For Games
- Hack Tools For Games
- Hacking Tools Online
- Pentest Tools Bluekeep
- Hacking Tools Github
- Hacker Tools Hardware
- Pentest Tools Framework
- Hacking Tools Github
- Hacking Tools For Mac
- Tools 4 Hack
- Game Hacking
- Hack Tools 2019
- Pentest Tools Bluekeep
- Pentest Tools Windows
- Hacker Tool Kit
- Hacking Tools Online
- Hacking Tools 2019
- Pentest Tools Bluekeep
- Hack Tools 2019
- Pentest Tools List
- Hacking Tools Software
- Wifi Hacker Tools For Windows
- Hacking Tools 2019
- Hacker Tools 2019
- Hacking Tools Online
- What Are Hacking Tools
- Hacking Tools For Windows
- Hacking Tools Pc
- Hack Tools
- Hacker Tools Online
- Pentest Tools For Android
- Pentest Tools Subdomain
- Pentest Reporting Tools
- Hacker Tools Software
- Pentest Tools List
- Hacking Tools For Kali Linux
- Best Pentesting Tools 2018
- Hack Apps
- Pentest Tools Windows
- What Are Hacking Tools
- Pentest Tools Download
- Hacking Tools For Windows
- Pentest Tools Subdomain
- Hack Tools Github
- What Is Hacking Tools
- Game Hacking
- Pentest Tools Tcp Port Scanner
- Tools For Hacker
- Bluetooth Hacking Tools Kali
- Top Pentest Tools
- Hak5 Tools
- Nsa Hacker Tools
- Hacker Tools Online
- Hacking Tools 2019
- Easy Hack Tools
- Hacking Tools For Windows
- Pentest Tools Github
- Nsa Hack Tools Download
- Ethical Hacker Tools
- Pentest Tools Framework
- Best Pentesting Tools 2018
- Pentest Tools Github
- Pentest Tools
- Best Pentesting Tools 2018
- How To Hack
- New Hack Tools
- Hack And Tools
- Hacking Tools For Windows Free Download
- Hacker Hardware Tools
- Hack Tools For Mac
- Nsa Hack Tools Download
- Hack Tools 2019
- Pentest Box Tools Download
- Github Hacking Tools
- Hack Tools 2019
- Top Pentest Tools
- Pentest Tools Alternative
- Nsa Hack Tools Download
- Hacking Tools Windows
- Pentest Tools Find Subdomains
- Hacker Techniques Tools And Incident Handling
- Hacking Tools Kit
- How To Hack
- Hacker Tools Github
- Hacking Tools And Software
- Pentest Tools Github
- Physical Pentest Tools
- Hack Tools 2019
- Hacker Tools Windows
- Hacking Tools Name
- Hacker Tools Windows
- Pentest Recon Tools
- Beginner Hacker Tools
- Pentest Tools Alternative
- Free Pentest Tools For Windows
- Tools 4 Hack
- Hacking Apps
- Hacking Apps
- Hacking Tools For Mac
- Hacker Tools Linux
- Hackers Toolbox
- Pentest Tools Website
- Pentest Tools Download
- Hack Tools For Windows
- New Hacker Tools
- Hacker Tools Apk Download
- Hack Apps
No comments:
Post a Comment