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 Online
- Hack Tool Apk No Root
- Hacker Tools Free Download
- Hack Tool Apk
- Hack Tool Apk
- Underground Hacker Sites
- Hacker Tools For Pc
- Hak5 Tools
- Hacking Tools For Kali Linux
- Pentest Tools
- Pentest Tools Website Vulnerability
- Free Pentest Tools For Windows
- Black Hat Hacker Tools
- Hacking Tools Windows 10
- Pentest Tools Framework
- Hack Tools For Mac
- Hacking Tools Windows
- Hacking Tools Usb
- Tools Used For Hacking
- Pentest Tools Tcp Port Scanner
- Hack Apps
- Hack Tool Apk
- Pentest Box Tools Download
- Hacker Hardware Tools
- Pentest Automation Tools
- Hackers Toolbox
- Pentest Tools Port Scanner
- Hak5 Tools
- Hacker Tools Mac
- What Are Hacking Tools
- Hacking Tools Hardware
- Pentest Tools Bluekeep
- Hacker Tools Software
- Nsa Hacker Tools
- Free Pentest Tools For Windows
- Hack Tools Pc
- Hacker Techniques Tools And Incident Handling
- Github Hacking Tools
- Hacking Tools For Windows Free Download
- Hacking Tools 2020
- Pentest Tools Subdomain
- Hackrf Tools
- Hack Tool Apk
- Hack Tool Apk No Root
- Hacker Tools 2020
- Hacking Tools
- Hack Tools 2019
- Hacking Tools For Kali Linux
- Pentest Automation Tools
- Blackhat Hacker Tools
- Hacker Tools Windows
- Pentest Tools Bluekeep
- Hacking Tools 2019
- Hack Tools For Pc
- Pentest Tools Download
- Hack Tools Online
- Hacking App
- Hacking Tools Download
- Hack Tools Github
- Hack Tools 2019
- Hacks And Tools
- Hacker Tools For Pc
- Termux Hacking Tools 2019
- Hacking Tools Github
- Hacker Tools Free
- Nsa Hacker Tools
- Hacking Apps
- Hacking Tools For Windows
- Hack Tools For Mac
- Hacker Tools 2020
- Hacking Tools Hardware
- Hacking Tools Usb
- Hacking Tools For Windows 7
- Hacker Tools For Mac
- Pentest Tools Website Vulnerability
- Hack Tools Online
- Hacker Tools Windows
- Ethical Hacker Tools
- Nsa Hack Tools Download
- Pentest Tools Url Fuzzer
- Hack Tools
- Hacker Tools For Ios
- Pentest Tools Url Fuzzer
- Pentest Tools For Mac
- Hack Apps
- Hack Tools Download
- Hack Tools For Mac
- What Are Hacking Tools
- Pentest Tools For Mac
- Hacker Tools Free
- Pentest Tools Online
- Hacker Tools Hardware
- Hacker Tool Kit
- Hacker Tools Github
- Hacking Apps
- Pentest Recon Tools
- Pentest Tools Find Subdomains
- Hacking Tools Name
- Hack Tools Pc
- Hack Tools Mac
- Hacking Tools 2019
- Hacking Tools Windows
- Hack Tool Apk No Root
- Hacking Tools For Windows
- Hacking Tools Software
- Tools For Hacker
- Hacker Tools
- Hacking Tools Software
- Pentest Tools Download
- Game Hacking
- Hacker
- Hacker Techniques Tools And Incident Handling
- Pentest Tools Free
- Best Hacking Tools 2019
- Hacker Tools Github
- Pentest Tools Find Subdomains
- Hacking Tools And Software
- Hacking Tools For Pc
- Hack Apps
- Hacking Tools Mac
- Hack App
- Hacking Tools For Kali Linux
- Hacker Tools List
- Computer Hacker
- Best Pentesting Tools 2018
- Hack Tools
- Hack Website Online Tool
- Pentest Tools Open Source
- Hack App
- Pentest Tools For Mac
- Hack Tools 2019
- Hacking Tools 2019
- Pentest Recon Tools
- Hacker Security Tools
- Hacker Tools Online
- Hack App
- New Hack Tools
0 comments:
Post a Comment
Request Item or Service