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 word
- Underground Hacker Sites
- New Hack Tools
- Pentest Tools For Ubuntu
- Hack Website Online Tool
- Hack Tool Apk No Root
- World No 1 Hacker Software
- Hacker Search Tools
- Physical Pentest Tools
- Hacker Tools Free Download
- Nsa Hack Tools
- Pentest Tools Framework
- Hacker Tools Mac
- Hack Tools Github
- Hacker Tools Hardware
- Hack Tools
- Pentest Box Tools Download
- Hacker Security Tools
- Hacker Tools Github
- Black Hat Hacker Tools
- Hack Apps
- Hacking Tools 2020
- Hack Tools Pc
- Hacker Tools
- Hack Website Online Tool
- Hacking Tools For Windows 7
- New Hack Tools
- Pentest Tools Online
- Hack Tools
- Hacking Tools 2019
- Hack Tools
- Nsa Hacker Tools
- Pentest Tools Port Scanner
- Hack And Tools
- Hack Tools
- Hack Apps
- Pentest Tools Port Scanner
- Hack Tools
- Hacker
- What Are Hacking Tools
- Hacking Tools Kit
- Pentest Tools Kali Linux
- Pentest Tools Free
- Computer Hacker
- Hak5 Tools
- Pentest Tools Review
- Hacker Tools Windows
- Best Hacking Tools 2019
- Best Pentesting Tools 2018
- Hack Tools
- Hacker Tools Apk
- Hacking Apps
- Hack Tools
- Pentest Recon Tools
- Hacker Tools Apk
- Pentest Tools Bluekeep
- Hacker Tool Kit
- Wifi Hacker Tools For Windows
- Hacker Tools Apk
- Pentest Reporting Tools
- Hacker Tools Linux
- Computer Hacker
- Growth Hacker Tools
- Free Pentest Tools For Windows
- Hacking Tools For Pc
- Hack Tools Download
- Hacker Tools List
- Pentest Box Tools Download
- Hacking Tools Software
- Best Hacking Tools 2020
- How To Hack
- Hacking Apps
- How To Make Hacking Tools
- Hacking Tools Kit
- Hackrf Tools
- Best Hacking Tools 2020
- Pentest Tools Bluekeep
- Pentest Box Tools Download
- Hacking Tools For Pc
- Hacker Search Tools
- How To Make Hacking Tools
- Hacking Tools 2020
- Hacking Tools For Windows
- Hack Website Online Tool
- Best Hacking Tools 2019
- Pentest Tools Website Vulnerability
- Pentest Tools Alternative
- Hack Tool Apk No Root
- Hacking Tools Pc
- Hacker Tools For Pc
- New Hack Tools
- Hack Tools Pc
- Hack Tools Pc
- Hacking Tools Windows
- Hacking Tools Mac
- Hacking Tools Hardware
- Hack Tools Github
- Hacker Tools Hardware
- Pentest Tools Alternative
- Hack Website Online Tool
- Hacking Tools For Kali Linux
- Hackers Toolbox
- Hacker Tools Hardware
- Hack Tools For Mac
- World No 1 Hacker Software
- Hack Tools For Games
- Tools Used For Hacking
- Hack Apps
- Easy Hack Tools
- Underground Hacker Sites
- Hacking Tools Kit
- Hacking Tools For Beginners
- Pentest Tools Kali Linux
- Hack Tools For Pc
- Best Pentesting Tools 2018
- Hackrf Tools
- Hack Tools For Windows
- Nsa Hack Tools Download
- Pentest Tools Online
- Pentest Tools For Android
- Game Hacking
- Nsa Hack Tools Download
- Pentest Tools For Android
- Hacking Tools 2019
- Hacking Tools Name
- Hacking Tools Mac
- Pentest Tools Windows
- Hacking Tools Pc
- Hacker Tools Windows
- Hacking Apps
- Computer Hacker
- Pentest Tools Kali Linux
- Pentest Tools Alternative
- Pentest Tools Android
- Hacking Tools Name
- Hacker Tools Apk
- Blackhat Hacker Tools
- Hack Tools
- Hacking Apps
- Hacking Tools For Windows Free Download
- Hacks And Tools
- Hacker Hardware Tools
- Hacker Tools 2019
- World No 1 Hacker Software
- Hacking Tools Hardware
- Hacking Tools For Games
- Hacker
- Hacking Tools Github
- Hacking Tools Free Download
- Nsa Hack Tools
- Pentest Tools Download
- Hacking Tools For Windows
- Hacking Tools Usb
- Hacking App
- Nsa Hacker Tools
- Hacking Tools For Beginners
- Hacker Tools Apk
- Easy Hack Tools
- Hack Tool Apk No Root
- Hacking Tools Hardware
- Kik Hack Tools
- Hacker Search Tools
- Hacking Tools For Pc
- Pentest Tools For Ubuntu
No comments:
Post a Comment