sexta-feira, 2 de junho de 2023

Introduction To Reversing Golang Binaries


Golang binaries are a bit hard to analyze but there are some tricks to locate the things and view what is doing the code.






Is possible to list all the go files compiled in the binary even in an striped binaries, in this case we have only one file gohello.go this is a good clue to guess what is doing the program.


On stripped binaries the runtime functions are not resolved so is more difficult to locate the user algorithms:


If we start from the entry point, we will found this mess:

The golang string initialization are encoded and is not displayed on the strings window.


How to locate main?  if its not stripped just bp on [package name].main for example bp main.main, (you can locate the package-name searching strings with ".main")


And here is our main.main:


The code is:

So in a stripped binary we cant find the string "hello world" neither the initialization 0x1337 nor the comparator 0x1337, all this is obfuscated.

The initialization sequence is:


The procedure for locating main.main in stripped binaries is:
1. Click on the entry point and locate the runtime.mainPC pointer:



2. click on runtime.main function (LAB_0042B030):


3. locate the main.main call after the zero ifs:



4. click on it and here is the main:




The runtime is not obvious for example the fmt.Scanf() call perform several internal calls until reach the syscall, and in a stripped binary there are no function names.



In order to identify the functions one option is compile another binary with symbols and make function fingerprinting.

In Ghidra we have the script golang_renamer.py which is very useful:


After applying this plugin the main looks like more clear:




This script is an example of function fingerprinting, in this case all the opcodes are included on the crc hashing:
# This script fingerprints the functions
#@author: sha0coder
#@category fingerprinting

print "Fingerprinting..."

import zlib


# loop through program functions
function = getFirstFunction()
while function is not None:
name = str(function.getName())
entry = function.getEntryPoint()
body = function.getBody()
addresses = body.getAddresses(True)

if not addresses.hasNext():
# empty function
continue

ins = getInstructionAt(body.getMinAddress())
opcodes = ''
while ins and ins.getMinAddress() <= body.getMaxAddress():
for b in ins.bytes:
opcodes += chr(b & 0xff)
ins = getInstructionAfter(ins)
crchash = zlib.crc32(opcodes) & 0xffffffff

print name, hex(crchash)


function = getFunctionAfter(function)





Related posts

  1. Hacking Tools For Mac
  2. Hacker Tools For Mac
  3. Hacking Tools Free Download
  4. Hacking Tools Online
  5. Pentest Tools Open Source
  6. Hack Website Online Tool
  7. Hacking Tools
  8. Hack Tool Apk No Root
  9. What Is Hacking Tools
  10. Hacks And Tools
  11. Hack Tools Download
  12. Hacker Tools Apk Download
  13. World No 1 Hacker Software
  14. Hacking Tools For Pc
  15. Hacker Tools Free
  16. Hacking Tools Kit
  17. Game Hacking
  18. Hack Website Online Tool
  19. Hacking Tools For Kali Linux
  20. Pentest Tools Subdomain
  21. Pentest Tools List
  22. Nsa Hack Tools Download
  23. Wifi Hacker Tools For Windows
  24. Hacking Tools Mac
  25. What Are Hacking Tools
  26. Hacker Tools Online
  27. Best Hacking Tools 2019
  28. Hack Tools Pc
  29. Hacking Tools And Software
  30. Hacker Hardware Tools
  31. Hack Tools
  32. Hacking Tools For Windows 7
  33. Pentest Tools Subdomain
  34. Pentest Tools
  35. Game Hacking
  36. Hack Tools
  37. Pentest Tools Url Fuzzer
  38. Black Hat Hacker Tools
  39. Hacking Tools For Windows
  40. Hacking Tools Name
  41. Hack Tool Apk
  42. Black Hat Hacker Tools
  43. Pentest Tools Linux
  44. Hacker Tools Online
  45. Pentest Tools Bluekeep
  46. Hacker Tool Kit
  47. Hacking Tools And Software
  48. Pentest Automation Tools
  49. Hack And Tools
  50. Pentest Tools
  51. Ethical Hacker Tools
  52. Top Pentest Tools
  53. Hacker Tools For Mac
  54. Hacks And Tools
  55. How To Make Hacking Tools
  56. Hacking Tools 2019
  57. Pentest Tools Download
  58. Hackrf Tools
  59. How To Install Pentest Tools In Ubuntu
  60. Hacker Tools Hardware
  61. Hacking Tools
  62. Hacking Tools Name
  63. Pentest Recon Tools
  64. Hack Tools 2019
  65. Hacking Tools For Windows Free Download
  66. Hack Tools For Ubuntu
  67. Hack Tool Apk
  68. Hacking Tools For Mac
  69. Hack Tools Online
  70. Hack Website Online Tool
  71. Hacker Tools Online
  72. Hacker Techniques Tools And Incident Handling
  73. Pentest Tools Linux
  74. Pentest Tools Alternative
  75. Computer Hacker
  76. Pentest Tools Free
  77. Hacking Tools For Beginners
  78. Pentest Tools Kali Linux
  79. Best Hacking Tools 2019
  80. Hacker Tools Hardware
  81. Pentest Automation Tools
  82. Pentest Tools Website
  83. Tools Used For Hacking
  84. Hacking Tools Free Download
  85. What Is Hacking Tools
  86. Hacking Tools And Software
  87. Hacking Tools Windows 10
  88. Pentest Tools Find Subdomains
  89. Nsa Hack Tools Download
  90. Hacking App
  91. What Are Hacking Tools
  92. Hack Apps
  93. Physical Pentest Tools
  94. Hacker Techniques Tools And Incident Handling
  95. Hacking Tools Mac
  96. What Is Hacking Tools
  97. Hack Tools For Pc
  98. How To Hack
  99. Pentest Tools Linux
  100. Hacking Tools For Beginners
  101. Hacking Tools And Software
  102. Game Hacking
  103. Hack Tools For Windows
  104. Hack Tools Online
  105. Hacker Tools
  106. Hack Tools Github
  107. Hacker Security Tools
  108. Hacker Tool Kit
  109. Hacking Tools For Windows
  110. Pentest Automation Tools
  111. Hack Tool Apk
  112. Hacking Tools For Mac
  113. New Hacker Tools

quinta-feira, 1 de junho de 2023

Hackerhubb.blogspot.com

Hackerhubb.blogspot.com

Continue reading


  1. Hack Tools
  2. Install Pentest Tools Ubuntu
  3. Pentest Tools Github
  4. Pentest Box Tools Download
  5. Hacking Tools Hardware
  6. Hacking Tools Windows
  7. Pentest Automation Tools
  8. Computer Hacker
  9. Hacker Tools 2019
  10. Pentest Tools Github
  11. Tools Used For Hacking
  12. Pentest Tools List
  13. Hack Tools Pc
  14. Hacking Tools For Windows
  15. Hacker Tools For Mac
  16. Hacker Tools Github
  17. Hack Tools Mac
  18. Hack Tools For Pc
  19. Hacker Tools Apk
  20. Hacker Tools Online
  21. Hacker Tools 2020
  22. Hacker Tools Apk Download
  23. New Hacker Tools
  24. Hack Tools Github
  25. Install Pentest Tools Ubuntu
  26. Hacking Tools For Windows Free Download
  27. Pentest Tools List
  28. Hacker Search Tools
  29. Computer Hacker
  30. Pentest Tools For Ubuntu
  31. Hack Tools Online
  32. Tools Used For Hacking
  33. Hacking Tools Name
  34. Hack Tools
  35. Pentest Tools Kali Linux
  36. Hack Tools Github
  37. Hack Website Online Tool
  38. Growth Hacker Tools
  39. What Is Hacking Tools
  40. Pentest Tools Android
  41. Hacker Tools Software
  42. Hacks And Tools
  43. Hacker Tools Online
  44. Hacking Tools Usb
  45. Hack Tool Apk No Root
  46. Pentest Tools Kali Linux
  47. What Is Hacking Tools
  48. Usb Pentest Tools
  49. Hacking Tools For Windows Free Download
  50. Android Hack Tools Github
  51. Blackhat Hacker Tools
  52. Hacker Tools Windows
  53. Hacker Tools For Pc
  54. Pentest Automation Tools
  55. Hacker Tools Mac
  56. Pentest Tools Windows
  57. Tools 4 Hack
  58. Kik Hack Tools
  59. New Hacker Tools
  60. Hacker Search Tools
  61. Termux Hacking Tools 2019
  62. Pentest Tools Website Vulnerability
  63. Pentest Tools Framework
  64. Hacking Tools Windows 10
  65. Hack Tools 2019
  66. Hack Tools
  67. Hacker Tools Apk
  68. Hacker Tools Apk Download
  69. Hacker Tools Free
  70. Hacking Tools 2019
  71. Hack Tools Pc
  72. Nsa Hack Tools
  73. Hacker Hardware Tools
  74. Hack Tool Apk No Root
  75. Pentest Tools For Ubuntu
  76. Ethical Hacker Tools
  77. Hak5 Tools
  78. Hack Tool Apk No Root
  79. Hacking Tools Kit
  80. Termux Hacking Tools 2019
  81. Pentest Tools Website
  82. Hacker Tools 2019
  83. Hacking Tools And Software
  84. Pentest Tools Free
  85. Top Pentest Tools
  86. Growth Hacker Tools
  87. Pentest Tools Website
  88. Hack Tool Apk
  89. Pentest Box Tools Download
  90. Hack Tool Apk No Root
  91. Physical Pentest Tools
  92. Hacking Tools 2020
  93. Pentest Tools For Mac
  94. Hacking Tools Windows 10
  95. Hackrf Tools
  96. How To Install Pentest Tools In Ubuntu
  97. Hacking Tools For Beginners
  98. Pentest Tools Subdomain
  99. Hack Tools
  100. Hack Tools Mac
  101. Pentest Tools List
  102. Usb Pentest Tools
  103. Pentest Tools Download
  104. Hack Tools For Games
  105. Hacking Tools For Windows
  106. Hacker Tools Online
  107. Best Hacking Tools 2020
  108. Tools 4 Hack
  109. Wifi Hacker Tools For Windows
  110. Beginner Hacker Tools
  111. Hak5 Tools
  112. Hacking Apps
  113. Hacker Tools Github
  114. Hacker Tools Linux
  115. Pentest Tools Review
  116. Pentest Tools Review
  117. Hacker Tools Software

BYOPPP - Build Your Own Privacy Protection Proxy

I have read a blog post, where you can build your own privacy proxy server built on Raspberry PI. The post got me thinking about how I can use this to protect my privacy on my Android phone, and also get rid of those annoying ads. 

Since I own a Samsung Galaxy S3 LTE with Android 4.3 (with a HW based Knox counter), rooting the phone now means you break Knox, and loose warranty. Past the point of no return ...

This means I have to solve this without root. Luckily newer Androids support VPN without rooting, but setting a mandatory system-wide proxy is still not possible without root. 
But thanks to some iptables magic and Privoxy, this is not a problem anymore :) 

The ingredients to build your own privacy protection proxy:
  • One (or more) cheap VPS server(s)
  • a decent VPN program
  • Privoxy
  • iptables

VPS server

To get the cheap VPS server, I recommend using Amazon EC2, but choose whatever you like. The micro instance is very cheap (or even free), and has totally enough resources for this task. I'm using the Ubuntu free tier now and it works like a charm. And last but not least Amazon has two-factor authentication! You can set up an Ubuntu server under 10 minutes. Use the AWS region nearest to you, e.g. I choose EU - Ireland.



VPN

For the VPN program, I recommend the free version of the OpenVPN AS (EDIT: be sure to use OpenVPN AS 2.0.6 or later, both on the server and the client). Easy to set-up quick start guide is here, GUI based configuration, and one-click client installer for Android, iOS, Windows, Linux, OSX. The Ubuntu installer packages are here.




The most important settings:

  • I prefer to use the TCP 443 and UDP 53 ports for my OpenVPN setup, and let the user guess why. 
  • For good performance, UDP is preferred over TCP. 
  • VPN mode is Layer 3 (routing/NAT).
  • Don't forget to allow the configured VPN ports in the AWS firewall (security groups). 


Other VPN settings:
  • Should VPN clients have access to private subnets (non-public networks on the server side)? - Yes
  • Should client Internet traffic be routed through the VPN? - Yes

Privoxy

The next component we have to install and configure is Privoxy. As usual, "apt-get install privoxy" just works. The next step is to configure privoxy via /etc/privoxy/config file, there are two options to change:
  • listen-address your.ip.add.ress:8118
  • accept-intercepted-requests 1
Beware not to allow everyone accessing your Privoxy server in the AWS EC2 security groups, be sure it is reachable only to VPN users!

After everything is set, start privoxy with "service privoxy start", and add it to the autostart "update-rc.d privoxy defaults".

Iptables

And the final step is to configure your iptables chain to forward every web traffic from the VPN clients to the Privoxy server:

iptables -t nat -A PREROUTING -s 5.5.0.0/16 -p tcp -m multiport --dports 80,8080,81 -j DNAT --to-destination your.ip.add.ress:8118 

Optionally you can block access to all other ports as well, and what does not go through your Privoxy won't be reachable.
Based on your Linux distribution and preference, you might make this rule persistent.

Final test

Now you can connect to the VPN server from your Android device.
After logging in from a client, you get the following nice packages to install on your device:


After connecting, the final results can be seen in the following screenshots. And yes, there is a reason I chose Angry Birds as an example.

Angry Birds without Privoxy
Angry Birds with Privoxy
Stupid flashlight app with ad
Stupid flashlight app with Privoxy
Spoiler alert
If you are afraid of NSA tracking you, this post is not for you. If you want to achieve IP layer anonymity, this post is not for you. As long as you are the only one using that service, it should be trivial to see what could possibly go wrong with that.

Known issues
Whenever the Internet connection (Wifi, 3G) drops, the VPN connection drops as well, and your privacy is gone ...
Sites breaking your privacy through SSL can still do that as long as the domain is not in the Privoxy blacklist.

Additional recommendation
If you are using OSX or Windows, I can recommend Aviator to be used as your default browser. It is just great, give it a try!

PS: There are also some adblock apps removed from the official store which can block some ads, but you have to configure a proxy for every WiFi connection you use, and it is not working over 3G.



Related word