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.
More info
- New Hack Tools
- Pentest Tools Website
- Pentest Tools Github
- Hack Apps
- Tools Used For Hacking
- New Hack Tools
- Tools 4 Hack
- Hacking Tools Online
- Hacker Tools
- Hacking Tools Github
- Hack Tools Mac
- Pentest Tools For Ubuntu
- Pentest Tools Windows
- Hack Tools Download
- Top Pentest Tools
- Hack Tools For Pc
- Hacking Tools For Mac
- What Is Hacking Tools
- Hacker Hardware Tools
- Beginner Hacker Tools
- Hacker Hardware Tools
- Pentest Tools Find Subdomains
- Hack Tools
- Hackers Toolbox
- Hacker Tool Kit
- Github Hacking Tools
- Hacker Hardware Tools
- Hacking Tools For Windows Free Download
- Hacking Tools For Pc
- Hack Tools Mac
- Hacking Tools Download
- Hacking Tools Free Download
- Hacker Tools Apk Download
- How To Make Hacking Tools
- Hacking Tools For Beginners
- Hacking Tools For Games
- Hacker Tools Windows
- Ethical Hacker Tools
- Kik Hack Tools
- Best Hacking Tools 2020
- Pentest Tools Find Subdomains
- Hack Tool Apk
- Pentest Tools Apk
- Pentest Tools Android
- Hacking Tools And Software
- Hacker Tools Apk
- Hacking Tools Github
- Hacker Tools
- Pentest Tools Open Source
- Hacking Tools For Windows 7
- Black Hat Hacker Tools
- Free Pentest Tools For Windows
- Pentest Tools Apk
- Hacking Tools For Kali Linux
- Beginner Hacker Tools
- Hacker Tools For Ios
- How To Make Hacking Tools
- Hacking Tools 2019
- Hack Website Online Tool
- Android Hack Tools Github
- What Are Hacking Tools
- Hacker Tools Mac
- Hacker Tools For Mac
- Hacking Tools 2019
- Hacker Tools 2019
- Usb Pentest Tools
- Hacker Tools For Pc
- Pentest Tools Apk
- Hacker Techniques Tools And Incident Handling
- Best Hacking Tools 2019
- Hacking Tools Pc
- Pentest Tools Subdomain
- Beginner Hacker Tools
- Top Pentest Tools
- Hack Tools 2019
- Hack Tools
- Hack Tool Apk
- Hacking Tools Hardware
- Hacker Tools Online
- Hacker Tools Free
- Hacking Tools Mac
- Top Pentest Tools
- Pentest Automation Tools
- Hacker Tools For Ios
- Wifi Hacker Tools For Windows
- Pentest Box Tools Download
- Pentest Tools
- Best Hacking Tools 2020
- How To Make Hacking Tools
- Hacker Hardware Tools
- Pentest Tools Linux
- Pentest Automation Tools
- Hacker Tools Apk Download
- Hack Apps
- Hacking Tools For Beginners
- Pentest Tools Apk
- Pentest Tools Url Fuzzer
- Hack Tools For Windows
- Pentest Tools Port Scanner
- Hacker Tools Hardware
- Hacker Tool Kit
- Hacker Tools Online
- Hack Tools Github
- Hacking Tools Usb
- Best Hacking Tools 2020
- Hacker Tools Online
- Beginner Hacker Tools
- Hacker Techniques Tools And Incident Handling
- Pentest Tools For Ubuntu
- Best Pentesting Tools 2018
- Hacker Tools Free
- Pentest Tools Kali Linux
- Pentest Tools Alternative
- Pentest Tools Alternative
- Hacker Search Tools
- Hack Tools Online
- Hack And Tools
- Pentest Tools Url Fuzzer
- Hack Tools For Pc
- Hacker Search Tools
- Usb Pentest Tools
- Growth Hacker Tools
- Hacker Tools 2019
- Hack Tool Apk
- Game Hacking
- Hacker Tools Apk Download
- Pentest Tools Subdomain
- Computer Hacker
- Hacking Tools
- What Is Hacking Tools
- Hacking Tools For Games
- Termux Hacking Tools 2019
- Hack App
- Hak5 Tools
- Hacking Tools Download
- Hacker Tools Online
- Pentest Tools Alternative
- Hackers Toolbox
- Pentest Tools For Mac
- Tools For Hacker
- Hacking Tools And Software
- Hack App
- Hacking Tools Kit
- Hacker Tools Software
- Hacker Tools Free
- Pentest Tools Apk
- Hack Tools
- New Hack Tools
- What Is Hacking Tools
- Hack Tools For Pc
- Hack And Tools
- Kik Hack Tools
- Hacking Tools Pc
- Pentest Box Tools Download
- Wifi Hacker Tools For Windows
- What Is Hacking Tools
- Github Hacking Tools
- Hacking Tools Hardware
- Pentest Reporting Tools
- Pentest Automation Tools
- Hack Tools Mac
- Pentest Tools Windows
- Hacker Tools List
- Pentest Tools Url Fuzzer
- Hack App
- Hack Tools
- Hacker Tools Hardware
- Hacker Tools Apk Download
- Hacking Tools Free Download
- Hacker Tools Free Download
- Pentest Tools Framework
- Hacker Tools Github
- Pentest Automation Tools
- Beginner Hacker Tools
- Hacking Tools Download
0 件のコメント:
コメントを投稿