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.
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:
In this way it's possible to build a rop chain using golang runtime to unprotect a shellcode.
Related word
- Hacking Tools Online
- Tools Used For Hacking
- Hacking Tools 2019
- Github Hacking Tools
- Pentest Tools Review
- Hacker Tools Apk Download
- Best Hacking Tools 2020
- Tools For Hacker
- Hacker Tools Free
- Hacker
- Pentest Tools Nmap
- Hacking Tools Download
- Termux Hacking Tools 2019
- Pentest Tools Url Fuzzer
- Hack Tools Mac
- Pentest Tools Kali Linux
- Hack Tools Mac
- Best Hacking Tools 2020
- Pentest Tools List
- Hacking Tools For Games
- Hacking Apps
- Pentest Tools Tcp Port Scanner
- Pentest Tools Apk
- Hack Website Online Tool
- Termux Hacking Tools 2019
- Pentest Tools For Android
- Pentest Tools Windows
- Hacker Tools Linux
- Hacker Tools Windows
- Pentest Tools Android
- Pentest Tools For Ubuntu
- Hacking Tools Online
- Hack Tools Download
- Hacks And Tools
- Tools Used For Hacking
- Hacker
- Pentest Tools Website
- Pentest Tools Tcp Port Scanner
- Hacking Tools For Games
- Pentest Automation Tools
- Pentest Tools
- Android Hack Tools Github
- Pentest Recon Tools
- Pentest Box Tools Download
- Nsa Hack Tools
- Hacking Tools Name
- Nsa Hacker Tools
- Tools For Hacker
- Hack App
- Hacking Tools Download
- Hacker Tools Free
- Pentest Tools For Mac
- Hacking Tools 2019
- Pentest Tools Tcp Port Scanner
- Hacking Tools Usb
- Hack App
- Hacking Tools
- Easy Hack Tools
- Tools Used For Hacking
- Pentest Tools Alternative
- Hacking Tools And Software
- Pentest Tools For Android
- Hacker Tool Kit
- Physical Pentest Tools
- Hacks And Tools
- Hacking Tools For Windows
- Pentest Tools Framework
- Pentest Tools Find Subdomains
- Hacking Tools Kit
- Hack Tool Apk
- Tools 4 Hack
- Physical Pentest Tools
- Physical Pentest Tools
- Pentest Tools Bluekeep
- Hacker Tools Software
- Hacker Security Tools
- Pentest Tools For Windows
- Hack Tools For Games
- Hackers Toolbox
- Hacker Tools For Windows
- Pentest Tools Linux
- Hacking Tools Hardware
- Hack Tools For Ubuntu
- Pentest Tools Apk
- Hacker Search Tools
- Hack Tool Apk No Root
- Pentest Tools Framework
- Hacker Tools List
- Nsa Hack Tools
- Hacking Tools For Beginners
- Hacker Tools Online
- Hacking Tools Download
- Hacking Tools
- Pentest Tools For Ubuntu
- Beginner Hacker Tools
- Pentest Tools Port Scanner
- Hacker Tools Windows
- Hacker Tools
- Pentest Automation Tools
- Pentest Tools Apk
- Best Pentesting Tools 2018
- Ethical Hacker Tools
- Pentest Tools Windows
- Hack Tools
- What Is Hacking Tools
- Hack Tools
- Hacking Tools And Software
- What Is Hacking Tools
- Hacker Tools Online
- Hack Tool Apk
- Hacks And Tools
- Hacker Tools Free
- How To Hack
- Pentest Tools Bluekeep
- Growth Hacker Tools
- Hack Tools Online
- Ethical Hacker Tools
- Hacking Tools Windows
- Easy Hack Tools
- Pentest Recon Tools
- Hacking Tools For Pc
- Pentest Tools Online
- Hacking Tools Download
- Game Hacking
- Underground Hacker Sites
- Pentest Tools Download
- Pentest Tools Website
- Pentest Tools Website Vulnerability
- Easy Hack Tools
- Hacking Tools And Software
- Best Hacking Tools 2019
- Hacking Tools Free Download
- Pentest Tools For Windows
- Pentest Reporting Tools
- New Hacker Tools
- Hacking Tools Download
- Hack Apps
- Blackhat Hacker Tools
- Pentest Tools Github
- Hack Tools
- Hacker Tools 2019
- Physical Pentest Tools
- Pentest Tools For Ubuntu
- Pentest Tools Website
- Hacker Tools Github
- Hack Tools Pc
- Free Pentest Tools For Windows
- Hacker Tools Free Download
- Hack Tools 2019
- Install Pentest Tools Ubuntu
- Hacking Tools
- Pentest Recon Tools
- Hacking Tools Name
- Hackers Toolbox
- Tools For Hacker
- Hack Tools For Ubuntu
- Hacking Tools Software
- Pentest Tools For Windows
- New Hacker Tools
0 comments:
Post a Comment