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.
Related news
- Bluetooth Hacking Tools Kali
- Pentest Tools List
- Hacking Tools Windows 10
- Hack Apps
- Pentest Tools For Android
- Growth Hacker Tools
- Hack Tools Online
- Pentest Tools Subdomain
- Black Hat Hacker Tools
- Hacking Tools Windows
- Pentest Tools Website
- Pentest Tools Free
- Hackrf Tools
- Hacker Tools Hardware
- Tools Used For Hacking
- Hacker Tools List
- Pentest Tools Website Vulnerability
- Best Hacking Tools 2019
- Pentest Tools Open Source
- New Hack Tools
- Hack Tools 2019
- Free Pentest Tools For Windows
- Underground Hacker Sites
- Pentest Tools Tcp Port Scanner
- Pentest Tools Subdomain
- Pentest Tools List
- Nsa Hack Tools
- Pentest Tools For Ubuntu
- Best Hacking Tools 2019
- Hack Tools For Pc
- Nsa Hack Tools Download
- Hacking Tools Usb
- Hacker Tool Kit
- Pentest Tools Review
- What Are Hacking Tools
- Hacker Tools 2019
- Pentest Tools Port Scanner
- Pentest Tools
- Underground Hacker Sites
- What Is Hacking Tools
- Hacker Tools Linux
- Hacker Techniques Tools And Incident Handling
- Hacker Tools
- Physical Pentest Tools
- Hack And Tools
- What Is Hacking Tools
- Tools Used For Hacking
- How To Make Hacking Tools
- Hacking Tools Name
- Physical Pentest Tools
- Hacking Tools Mac
- Hack Tools For Games
- Hack Tools Mac
- Hacker Tools Free Download
- Hacker Tools Github
- Pentest Tools Open Source
- Physical Pentest Tools
- Hacking Tools Kit
- Pentest Recon Tools
- Hacking Tools For Windows Free Download
- Hacker Techniques Tools And Incident Handling
- Pentest Tools For Ubuntu
- How To Install Pentest Tools In Ubuntu
- Hacking Tools Windows
- Hacking Tools For Beginners
- Hacks And Tools
- Hacking Tools For Beginners
- Pentest Tools For Ubuntu
- Install Pentest Tools Ubuntu
- Hacker Search Tools
- Pentest Recon Tools
- Hackers Toolbox
- Top Pentest Tools
- Hacker Tools Apk
- Hacker Tools 2019
- Hack Tools For Windows
- Hacking Tools Windows
- Pentest Tools Framework
- Hacker Tools Hardware
- Pentest Tools Subdomain
- Hacking Tools Hardware
- Pentest Tools
- Pentest Tools List
- How To Make Hacking Tools
- Hackers Toolbox
- Pentest Tools Url Fuzzer
- Pentest Reporting Tools
- Hacker Techniques Tools And Incident Handling
- Hacking Tools Free Download
- New Hack Tools
- Pentest Tools Online
- How To Make Hacking Tools
- Pentest Tools For Windows
- Hacking Tools 2019
- Pentest Tools
- Nsa Hack Tools Download
- Hacking Tools For Mac
- How To Hack
- Pentest Tools Android
- Hacking Tools Pc
- Hacking Tools For Windows
- Pentest Tools Free
- Pentest Tools For Mac
- Game Hacking
- Hacker Tools Linux
- Hacker Tools Free Download
- Hack Tools Pc
- Termux Hacking Tools 2019
- Hack Tool Apk
- Hacking Tools Windows
- Tools For Hacker
- Hacking Tools Windows 10
- Hacker Tools Linux
- Pentest Tools For Mac
- Pentest Tools For Ubuntu
- Pentest Box Tools Download
- Hacker Tools Online
- Hacking Tools Github
- Usb Pentest Tools
- Hacking Apps
- Computer Hacker
- Pentest Tools Review
- Hacking Tools Windows 10
- Game Hacking
- Hacking Tools For Windows
- Hack And Tools
- Game Hacking
- Tools Used For Hacking
- New Hack Tools
- Hack Tools Online
- How To Install Pentest Tools In Ubuntu
- Hacker Tools Free Download
- Install Pentest Tools Ubuntu
- Ethical Hacker Tools
- Hacking Tools Online
- Pentest Reporting Tools
- Pentest Tools For Ubuntu
- Blackhat Hacker Tools
- Hacking Tools Hardware
- Hacker Hardware Tools
- Blackhat Hacker Tools
- Hacks And Tools
- Pentest Automation Tools
- Pentest Tools Url Fuzzer
- Pentest Box Tools Download
- Pentest Recon Tools
- Pentest Tools For Windows
- Hacker Techniques Tools And Incident Handling
- Physical Pentest Tools
- Hacking Tools For Kali Linux
- Hacking Tools
- Pentest Recon Tools
- Hacking Tools For Kali Linux
- Usb Pentest Tools
- Hacking Tools For Windows Free Download
- Hacker Tools Mac
- Hacker Tools Online
- Pentest Tools Android
- Hacking Apps
- Pentest Tools Open Source
- Hacking Tools
- Hack Tools For Games
- New Hack Tools
- What Is Hacking Tools
- Hacker Tools Free Download
- Hak5 Tools
- Hacker Tools Software





Aucun commentaire:
Enregistrer un commentaire