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
- Hacking Tools Windows
- Pentest Tools Linux
- Hack Tools For Games
- Hacking Tools For Windows 7
- Pentest Tools Free
- Pentest Tools Open Source
- Hacker Tools Free
- Usb Pentest Tools
- Hacking Tools Usb
- Hacker Tools Github
- New Hack Tools
- New Hack Tools
- Hacker Tools For Windows
- Tools 4 Hack
- Hacking Tools Name
- Pentest Tools For Mac
- Hacker Tools Software
- Easy Hack Tools
- Hacking Tools Pc
- Install Pentest Tools Ubuntu
- Hacker Tools For Windows
- Hacking Tools For Games
- Pentest Tools For Mac
- Hacker Tools Software
- Tools For Hacker
- Hacker Security Tools
- Hackers Toolbox
- Hack Tools For Ubuntu
- Hacker Tools For Windows
- Hacking Tools 2019
- Hacker Tools Software
- Hacking Tools Github
- Best Hacking Tools 2020
- Hackrf Tools
- Hacking App
- Hacker Hardware Tools
- Pentest Tools Github
- Hacking Tools Github
- Hack Tools Github
- How To Make Hacking Tools
- Hacking Tools For Pc
- Hack Tools Pc
- Tools Used For Hacking
- Hack Tools
- Hacking Tools For Windows Free Download
- New Hacker Tools
- Hacker Tools Software
- Hack Tools 2019
- Hack Tool Apk No Root
- Tools For Hacker
- Pentest Box Tools Download
- Nsa Hacker Tools
- Hack Tools For Ubuntu
- Pentest Tools Website Vulnerability
- Hacker Security Tools
- Hacker Tools Hardware
- Hacking Tools Github
- Hacker Tools List
- Hack Tools
- Hacking Apps
- Pentest Automation Tools
- Pentest Tools Website
- Hacking Tools For Games
- Tools Used For Hacking
- Hack Website Online Tool
- Hacking Tools Download
- Hacker Tools For Ios
- Hacking Tools Kit
- Hacks And Tools
- Underground Hacker Sites
- Hack App
- Hack Tools For Ubuntu
- Kik Hack Tools
- Hacking Tools Software
- Pentest Tools Apk
- Hack Tool Apk No Root
- Install Pentest Tools Ubuntu
- Hacker Tools Apk Download
- Free Pentest Tools For Windows
- Hack Tool Apk No Root
- Best Hacking Tools 2020
- How To Make Hacking Tools
- Pentest Tools Bluekeep
- Free Pentest Tools For Windows
- Hacking Tools For Kali Linux
- Hacking Tools For Windows
- Hacker Tools Apk
- Hacking Tools Usb
- Hack Tools Pc
- Hack Tools
- Bluetooth Hacking Tools Kali
- Pentest Tools For Ubuntu
- Hacker Tools Free Download
- Hacking Tools Name
- Hacking Tools Software
- Hacking Tools For Windows 7
- Pentest Tools Url Fuzzer
- Pentest Box Tools Download
- Pentest Tools Free
- Android Hack Tools Github
- Hack And Tools
- Pentest Tools Windows
- Hacking Tools Name
- Hack Tool Apk
- Free Pentest Tools For Windows
- Best Hacking Tools 2020
- Free Pentest Tools For Windows
- Hacks And Tools
- Wifi Hacker Tools For Windows
- Best Hacking Tools 2019
- Computer Hacker
- Hacking Tools Hardware
- Hacker Security Tools
- Physical Pentest Tools
- Wifi Hacker Tools For Windows
- Hacking Apps
- Pentest Tools Website
- Pentest Tools Apk
- Hacking Tools For Pc
- Hacking Tools For Windows
- Pentest Tools Tcp Port Scanner
- Pentest Tools For Mac
- What Are Hacking Tools
- Hack Tools Download
- Hacker Techniques Tools And Incident Handling
- Hacking Tools Usb
- Wifi Hacker Tools For Windows
- Underground Hacker Sites
- Hacking Tools For Kali Linux
- Black Hat Hacker Tools
- Tools Used For Hacking
- Best Hacking Tools 2020
- Nsa Hack Tools
- Pentest Tools Github
- Hacking Tools For Games
- Hack Tools Pc
- Pentest Tools Bluekeep
- World No 1 Hacker Software
- Nsa Hack Tools
- Hackrf Tools
- Hacking Tools For Games
- Hacker Hardware Tools
- Hacking Tools Hardware
- Ethical Hacker Tools
- Hacking Tools For Pc
- Hacking Tools Download
- Hacking Tools Free Download
0 comments:
Post a Comment