Log in

View Full Version : .net


CTRL-D
February 19th, 2002, 07:15
great board, but knowledge on it has alway some levels to high for me, so i never registered. But as i havent got any ideas anymore, mabe i can get some help in here ....

I coded a small proggie in VC#, compiled and ran it. Was really happy that it worked. As all others on the board here i was intrested in what it looks like disassembled.
WDasm didnt even try to disassemble it. IDA (version 4.20 demo) gave some code, but the interesting part of it looked typically like a packed program. So i fired up sice to check what it does. Its even worse than VB. It very much looks like an interpreted language. Searching the net i found IDA 4.2 full version will decompile this all.

http://www.datarescue.com/idabase/gallery/dotnet.htm

Unbelieveable for me how Ilfak does this all.

Anyone got some information on how to proceed with this ? reverse .NET-code without having IDA 4.2 full ?

Or any ideas what i could try ?

thx in advance

CTRL-D

PS: if any1 wants me to i can upload the small prog, but be warned, you need .NET-Framework installed to run it

death
February 19th, 2002, 09:09
Hi CTRL-D
Microsoft provides a disassembler, called ILDASM.

CTRL-D
February 19th, 2002, 10:39
short answer to a long question
btw: your name seems very common to me

thx a lot, cannot await to be back on my PC for testing ... *g*

CTRL-D

CTRL-D
February 19th, 2002, 12:45
JUST GREAT !!!

i wrote a simple c#:

using System;
class Hello {
static void Main() {
String s;
Console.WriteLine("Type your Password";
s=Console.ReadLine();
if (s=="mypass"
Console.WriteLine("Yeahhhh !!!";
s=Console.ReadLine();
}
}

and thats the results of the disassembly:

.method private hidebysig static void Main() cil managed
{
.entrypoint
// Code size 46 (0x2e)
.maxstack 2
.locals init (string V_0)
IL_0000: ldstr "Type your Password"
IL_0005: call void [mscorlib]System.Console::WriteLine(string)
IL_000a: call string [mscorlib]System.Console::ReadLine()
IL_000f: stloc.0
IL_0010: ldloc.0
IL_0011: ldstr "mypass"
IL_0016: call bool [mscorlib]System.String:p_Equality(string,
string)
IL_001b: brfalse.s IL_0027
IL_001d: ldstr "Yeahhhh !!!"
IL_0022: call void [mscorlib]System.Console::WriteLine(string)
IL_0027: call string [mscorlib]System.Console::ReadLine()
IL_002c: stloc.0
IL_002d: ret
} // end of method Hello::Main


lateron iŽll see what happens with my visualc#-progs

but for theŽm interested in all this:
.NET-framework can be downloaded at m$oft
the csc.exe is the c#-compiler. This file is even in the redistributable abvailable (~20MB).
the disasm for this all can be found @
f**://ftp.dei.uc.pt/.raid1/MSVisualStudio.NET/program%20files/microsoft%20visual%20studio%20.net/frameworksdk/bin/ildasm.exe

fun with disassemling hells out of your files

CTRL-D

garph0
February 23rd, 2002, 08:44
Have a look at

Anakrino (http://www.saurik.com/net/exemplar/)

it's really nice and (to some extent) it can show the inner code of the .NET framework

regards,

g

PS
ah, and it comes with full source

CTRL-D
February 25th, 2002, 13:57
thats a good one, too.
perfect for finding fast information.
I still use the other one, because you can save it as *.IL-file and recompile it again after changing

sometimes the compiler errored, because it couldn t find the resourcefiles. I just remarked the lines (class) of error and it worked like a charm. The resources are just like the original ones.

but thanks for telling
CTRL-D