RAIN: .NET/WP7 Applications Hacking (+Dis/Assembler)

Search This thread

ash.rain

Member
Sep 27, 2011
26
25
the web
What the TOOL actually does is unpack a xap file, show its content and let you edit them.
As simple as that. It includes some internal editors.

GITHUB

Here are the features of .NET Rain:
- Unpack/Pack a valid WP7/Silverlight XAP file.
- Integrated binary and text editors.
- Integrated image viewer.
- Integrated .NET DLL disassembler/assembler and editor, allowing you to edit the types, methods, properties, resources and each method's set of IL instructions in an assembly.
- Ability to edit assemblies directly in C# and then compile it back directly from the program UI.
- Of course, giving you the freedom to open each XAP entry with an external editor. Editing is intuitive and simple.
- Besides working in the context of a XAP package, you can also edit single files.
- You can manually edit the contents of the XAP by adding, removing or swapping files, besides in-place editing.

I'm planning to add a few more features.
I know about Reflector but it's way too overpriced... I don't find it user-friendly as well.
I will keep Rain donateware. Once I release a stable version, its development would pretty much depend on your feedback and donations.

Here are some cool resources I've found on the net for those of you who are interested in something more than the end result:

Open-source alternatives to Reflector:

Other resources:
  • TypeView.cs
  • Jason Haley's notes on disassembling .NET
  • Adrian Bank's recent blog post summarising a number of Reflector alternatives, including several options not mentioned below.
  • Mark Lichtenberg's detailed blog post comparing several of the open source alternatives (DILE, ILSpy and Mono Cecil using MonoDevelop) to Reflector.

Keep an eye on the second post for updates!
 
Last edited:

ash.rain

Member
Sep 27, 2011
26
25
the web
UPDATES

After quite a while, I announce that
Beta 3 is out!
You'll need the .NET Framework
Download: You can either download from the Google Code project or from the project's website.

rain1.png


There are still things I'm working on, expect another update in about a week!



Please use Google Code's Issue Tracker for any feedback or feature requests. Any kind of support, be it a donation, suggestion, feature request or bug report, is highly appreciated.

Thanks!
 
Last edited:

amritpal2489

Senior Member
Oct 3, 2010
414
96
Amazing... Was hoping that someone make this... Great work buddy...
Let me get my hands dirty with the beta version
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Looks very cool!

Basic decompilation / recompilation of the IL would be neat, but IL isn't terribly hard to read or write (especially for people who already know some assembly).

One thing that would be useful (can't tell if it's there yet or not) would be to support adding folders called .. and files under them (allows path traversal to put files almost anywhere on the system). For bonus points, show the phone's filesystem as it would be after installation (the contents of the XAP unpacked with the root at \Applications\Install\<GUID>\Install\) so people can very easily put files where they want them.

A quick manifest tweaker (things like add/remove ID_CAP_INTEROPSERVICES) would also be cool, though exiting XML is easy by hand anyhow.

All in all, looks very cool. A very convenient all-in-one tool, aside from perhaps a decompiler.
 
  • Like
Reactions: ash.rain

ash.rain

Member
Sep 27, 2011
26
25
the web
Thanks for the positive replies so far, guys, I appreciate it! However, I'm more into suggestions and when I release a download - some critic. I've made a simple vote for the means of counting the interest, please use that.

Basic decompilation / recompilation of the IL would be neat, but IL isn't terribly hard to read or write (especially for people who already know some assembly).

One thing that would be useful (can't tell if it's there yet or not) would be to support adding folders called .. and files under them (allows path traversal to put files almost anywhere on the system). For bonus points, show the phone's filesystem as it would be after installation (the contents of the XAP unpacked with the root at \Applications\Install\<GUID>\Install\) so people can very easily put files where they want them.

A quick manifest tweaker (things like add/remove ID_CAP_INTEROPSERVICES) would also be cool, though exiting XML is easy by hand anyhow.
First of all, thanks for the post - you raised a few very good points.
I've already implemented a IL instructions edit form. I'm thinking about IL to C# conversion, but so far I've only made a C# to IL form. The other way around is a bit tricky, but is in my todo list for sure. And after all, yeah - IL is pretty easy to understand, and I've even implemented a simple "instruction description" field for every instruction for the sake of refference.

That second suggestion concerning file path tweaks is a very good idea and hadn't crossed my mind so far. I'll surely put that on the todo list as well!

The "manifest tweaker" is already on that list but I need to figure out the signing algorithm first, since it seems to be related to some data from the manifest.

Nice work. Will this work on unsigned /sideloaded apps also?
Umm... no, not really :) As I said, I've got some things on my todo list and on the end of that list is spending a while trying to figure out the signing algorithm. If anyone can save me some time, that'd be cool.
 
Last edited:

ahmedfikry

Senior Member
Jun 13, 2007
1,439
62
great idea...makes it easier than the workaround that I have been trying all along

i am interested in testing / beta ... & will be happy to help
 

Poryhack

Senior Member
Jul 22, 2010
145
6
So I'm clearly not in the first 10 but I hope you'll consider me for a beta. I have literally been searching for a tool to do this for the past week and have ended up settling with a trial version of Reflector. Needless to say your tool sounds much more promising and I would love to test it out.

You can PM me here on the forums but it might be better if you email me. poryhack|at|gmail|dot|com

EDIT: For the record, no, Reflector will not let you edit and recompile/reassemble. It's strictly decompilation, although in theory you can take the decompiled source into Visual Studio and do what you want with it.
 
Last edited:

ash.rain

Member
Sep 27, 2011
26
25
the web
For the record, no, Reflector will not let you edit and recompile/reassemble. It's strictly decompilation, although in theory you can take the decompiled source into Visual Studio and do what you want with it.
Yeah, now imagine yourself copy-pasting every single piece of code from Reflector in an empty Visual Studio project, extracting resources and manually linking refferences... sounds gret, huh? :)

By the way, why not count you for a beta? Ten was more... figurative. Also, some of the guys didn't mention anything about willing to beta-test and didn't sound like they would. I'm working on the resource editor for a few more hours and I'm gonna contact you all ;-)
Thanks to everyone who shows and will show any kind of support - a man might be smarter than another, but no man is smarter than everyone else :)

Edit: I'm very interested in building in hacking-proof tools (besides anything else that might come in handy), so I'm very open for suggestions. I might wanna consider a "thanks to" section as well :-D
 
Last edited:

sensboston

Recognized Developer
Nov 18, 2009
2,165
814
Boston, MA
- Integrated .NET DLL disassembler/assembler and editor, allowing you to edit the types, methods, properties, resources and each method's set of IL instructions in an assembly.

This one is sounds interesting... for the hacking purposes :D As far as I think, the whole purpose of your tool ;)

It's useless from the other listed reasons such as check obfuscation security or explore recompiled code for the training purposes (you can do it with Reflector - its isn't pricey, and has a trial/EA versions).

However, your description of the tool looks cool, would be nice to try. Also, would be nice to have a real Reflector alternative. I hope you'll keep it donateware ;)

Thanks.
 
Last edited:

ash.rain

Member
Sep 27, 2011
26
25
the web
I hope you'll keep it donateware ;)
Well, so am I regarding cigarettes and food :)
No really, I'm thinking about having a paid version, but I've already promised a free version as well, which will be capable of almost all the stuff. I'm not much of a manager/seller myself, I'm a coder, so I haven't figured out what should I exclude from the free version but also as a coder I know it shouldn't be useless.
And I think you'll all agree when you have some **** done, you can get some financial support for that :)
But hey, I'm not greedy and sure as hell don't expect to make a fortune out of this. I'm talking something more symbolic. I always put work before bucks, so let's see what will come out of it first ;-)
 
Last edited:

ash.rain

Member
Sep 27, 2011
26
25
the web
After thinking about that a while I think you are right. I'm currently stuck trying to convert IL to C# and as soon as I make any progress, I'm uploading a beta.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    What the TOOL actually does is unpack a xap file, show its content and let you edit them.
    As simple as that. It includes some internal editors.

    GITHUB

    Here are the features of .NET Rain:
    - Unpack/Pack a valid WP7/Silverlight XAP file.
    - Integrated binary and text editors.
    - Integrated image viewer.
    - Integrated .NET DLL disassembler/assembler and editor, allowing you to edit the types, methods, properties, resources and each method's set of IL instructions in an assembly.
    - Ability to edit assemblies directly in C# and then compile it back directly from the program UI.
    - Of course, giving you the freedom to open each XAP entry with an external editor. Editing is intuitive and simple.
    - Besides working in the context of a XAP package, you can also edit single files.
    - You can manually edit the contents of the XAP by adding, removing or swapping files, besides in-place editing.

    I'm planning to add a few more features.
    I know about Reflector but it's way too overpriced... I don't find it user-friendly as well.
    I will keep Rain donateware. Once I release a stable version, its development would pretty much depend on your feedback and donations.

    Here are some cool resources I've found on the net for those of you who are interested in something more than the end result:

    Open-source alternatives to Reflector:

    Other resources:
    • TypeView.cs
    • Jason Haley's notes on disassembling .NET
    • Adrian Bank's recent blog post summarising a number of Reflector alternatives, including several options not mentioned below.
    • Mark Lichtenberg's detailed blog post comparing several of the open source alternatives (DILE, ILSpy and Mono Cecil using MonoDevelop) to Reflector.

    Keep an eye on the second post for updates!
    2
    UPDATES

    After quite a while, I announce that
    Beta 3 is out!
    You'll need the .NET Framework
    Download: You can either download from the Google Code project or from the project's website.

    rain1.png


    There are still things I'm working on, expect another update in about a week!



    Please use Google Code's Issue Tracker for any feedback or feature requests. Any kind of support, be it a donation, suggestion, feature request or bug report, is highly appreciated.

    Thanks!
    2
    Hi, check out the third beta. It contains the functionality to compile back the changes made to decompiled code with a simple Ctrl+S.
    I'm sorry for the long delay and I promise another update within a week with many bugs fixed, a good resource editor (which will allow you to add new resources, so with a bit of side work you'll be able to localize apps in a way), XAP deployer, marketplace search tool and a few surprises.

    The UI needs a lot of improvements as well, I am aware of that. If anyone wishes to help in that (or any other) way, please contact me :)
    2
    Hi, ted973

    As I said in the second post, native assembly support is not yet implemented. However, it's planned and will be there in the release version! Maybe just a resource editor, but it's a start. I want to include a full-featured disassembler for native Win32 code at some point in the future for sure.

    The second issue's been fixed a couple of hours ago. I guess I was in a bit of a hurry to make the build, so I forgot that. I've been adding a lot of neat stuff as well, so Beta3 will feel better. And I'm sure you guys have some ideas of your own I hadn't thought about.

    And as of the third part of your post - the disassembly's been almost completely cutoff in Beta2, since I'm still working on it. Use the IL editor on the right instead until Beta3.

    Thanks for the feedback,
    - Ash
    1
    Looks very cool!

    Basic decompilation / recompilation of the IL would be neat, but IL isn't terribly hard to read or write (especially for people who already know some assembly).

    One thing that would be useful (can't tell if it's there yet or not) would be to support adding folders called .. and files under them (allows path traversal to put files almost anywhere on the system). For bonus points, show the phone's filesystem as it would be after installation (the contents of the XAP unpacked with the root at \Applications\Install\<GUID>\Install\) so people can very easily put files where they want them.

    A quick manifest tweaker (things like add/remove ID_CAP_INTEROPSERVICES) would also be cool, though exiting XML is easy by hand anyhow.

    All in all, looks very cool. A very convenient all-in-one tool, aside from perhaps a decompiler.