Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save uriellberdeja/3792c6d9c318d7ff3ce57b059906cdfb to your computer and use it in GitHub Desktop.
Save uriellberdeja/3792c6d9c318d7ff3ce57b059906cdfb to your computer and use it in GitHub Desktop.
Xamarin Reverse Engineering

Notes:

Regarding the interception of HTTP:

We did it through USB reverse tunneling and iptable rules local to the phone.

# Setup USB reverse tunnel for port 8080 (MITM)
adb reverse tcp:8080 tcp:8080

# Add rules to redirect HTTP through the reverse tunnel (Phone)
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:8080
iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination 127.0.0.1:8080

Blog Posts:

GitHub:

Documentation:


Unpack assemblies.blob within Android Device: https://github.com/jakev/pyxamstore https://thecobraden.com/posts/unpacking_xamarin_assembly_stores/

Xamarin unpin

https://github.com/GoSecure/frida-xamarin-unpin

Additional information:

https://www.appknox.com/blog/xamarin-reverse-engineering-a-guide-for-penetration-testers

Xamarin antiroot

https://codeshare.frida.re/@Gand3lf/xamarin-antiroot/

IF patching of some assemblies is needed use:

ildasm.exe /out=output.il YourAssembly.dll
ilasm.exe /output=YourModifiedAssembly.dll output.il

Practical patching and IL Code disasm/C# decompilation can be done using DnSPY!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment