éã³ã³ãã¤ã« ï¼ éã¢ã»ã³ãã« ã®ããã®ï¼ã¤ã®ç¡æãã¼ã« ï¼.exeã¨.classããªãã¼ã¹ã¨ã³ã¸ãã¢ãªã³ã°ããããã®ï¼ããªã¼ã½ããã®ä½¿ãæ¹ï¼
éã³ã³ãã¤ã«, ããã³éã¢ã»ã³ãã«ã®ããã®åãã¼ã«ã¨ï¼å®è¡æé ãåæããã
.exeã¨.classã対象ã
â»ãªãã¼ã¹ã¨ã³ã¸ãã¢ãªã³ã°ã«ããã£ã¦ã¯ï¼ã½ããã¦ã§ã¢ã®ä½¿ç¨å¥ç´ã«ãããããçæãããã¨ã
Windowsã®exeãã¡ã¤ã«ã¨, Javaã®classãã¡ã¤ã«ã«ã¤ãã¦ï¼ããããéã¢ã»ã³ãã«ï¼éã³ã³ãã¤ã«ã®æ¹æ³ãèããã
ï¼ï¼ï¼.exeãã¡ã¤ã«
éã¢ã»ã³ãã©
exeããasmï¼å½¢å¼ã®è¡¨ç¤ºï¼ãçæããæ¹æ³ã
æ©æ¢°èªããã¼ã¢ããã¯è¡¨ç¤ºãï¼ãã¼ã¿ã»ã¯ã·ã§ã³ããã³ãããã
ããã°ã©ã ãå©ç¨ãã¦ããæååå®æ°ãªã©ã¯ä¸¸è¦ãã«ãªãã
( exeã¢ãã«å³è§£ã®ãã»ã¯ã·ã§ã³é¨ãã®é¨åãåç §ï¼http://www.geocities.jp/winapi_database2/special/2001_10_11/page1.html )
Visual Studioã«ä»å±ããdumpbin.exeã使ãã使ãæ¹ï¼
ããã³ãã³ãããã³ãããã ãããdumpbin /DISASM /rawdata a.exe > b.asm
åç §ï¼
- EXEãã¡ã¤ã«ã解èªããããhttp://www.winapi-database.com/special/2001_10_11/page10.html
- DUMPBINã®ãªãã·ã§ã³ãhttp://www.xlsoft.com/jp/products/intel/cvf/docs/vf-html/pg/pg26_10_02.htm
- *.lib,*.dllãã¡ã¤ã«ããé¢æ°ã®ã·ã³ãã«æ å ±ãå¾ãæ¹æ³ http://d.hatena.ne.jp/Seasons/20080928/1222587606
- DLLãLIBãã¡ã¤ã«ã解æããå ´å㯠/EXPORTS (é¢æ°åä¸è¦§ãåºã), /SYMBOLS ï¼ã»ã¯ã·ã§ã³ä¸è¦§ãåºãï¼ãªãã·ã§ã³ã使ãã
éã³ã³ãã¤ã©
ä¸è¬ã«ï¼exeããã½ã¼ã¹ã³ã¼ãã復å ããäºã¯é£ããã
ããã.NET Frameworkã§æ§ç¯ãããã¢ããªã±ã¼ã·ã§ã³ãªãã°ï¼
exeã®ä¸èº«ã¯ãã¤ãã£ãã³ã¼ãã§ã¯ãªãMSILï¼ä¸éè¨èªï¼ã§ããï¼
ç´ ã®æ©æ¢°èªãããé¥ãã«å®¹æã«ãã³ã³ãã¤ã«ã§ããã(é£èªåããã¦ããå ´åãé¤ã)
ã¾ãï¼exeããä¸éè¨èªãå¾ãæ¹æ³ã
.NET frameworkä»å±ã®ildasm.exeã使ãã
è¨ç½®ãã¹ã¯ï¼ä¾ãã°
- C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\ildasm.exe
ãªã©ã«ããã
ããã³ãã³ãããã³ãããã ãããildasm /output=b.txt a.exe
ããã§MSILãå¾ãã
åç §ï¼
- microsoftã®èª¬æãã¼ã¸ãhttp://msdn.microsoft.com/ja-jp/library/f7dy01k1.aspx
- EXE/DLL ãã¡ã¤ã«ã®å 容㯠MSIL ãhttp://www2.nsknet.or.jp/~azuma/ms/0071.htm
- 解説ãã¤ã³ãµã¤ã .NET Framework ï¼»æ¹è¨çï¼½ãhttp://www.atmarkit.co.jp/fdotnet/technology/idnfw11_index/index.html
ãããï¼ILã¯ã¾ã ã¾ã ãã·ã³èªã§ããï¼ããªãã¸ã§ã¯ãæåã®æ©æ¢°èªããªã©ã¨è¨ãããï¼ããï¼
ããã ãã§ã¯ãéã¢ã»ã³ãã«ãã ã
é«ç´è¨èªã¸ã®å¤æã¯ãã¦ããªãã
exeããï¼VB.NETãC#.NETã®ã½ã¼ã¹ã³ã¼ããåå¾ããã«ã¯ï¼
Reflectorãªãããªã¼ã½ããã使ãã
ãã®ã½ããããã¦ã³ãã¼ãï¼è§£åãããï¼FileâOpenã§exeãé¸æããã ãã
ã½ã¼ã¹ã³ã¼ãã表示ããã¦ï¼
ãã¨ã®å¤æ°åãé¢æ°åãã«ã¼ãã³ã®å 容ãããã£ã¦ãã¾ãï¼
éã³ã³ãã¤ã«æåã¨ãªãï¼ãã ãï¼MSILããæ¨æ¸¬ãã¦å¾©å ãã¦ããã«éããªããï¼
- .NET Reflectorã®ãã¦ã³ãã¼ããhttp://www.red-gate.com/products/reflector/
- .NETéã³ã³ãã¤ã©ã¨ã³ã¼ããé£èªåããDotfuscatorãhttp://www.atmarkit.co.jp/fdotnet/tools/dotfuscator/dotfuscator_02.html
ï¼ï¼ï¼Java
HelloWorld.classã¨ããã¯ã©ã¹ãã¡ã¤ã«ãããã¨ãã¦ï¼ãã®è§£ææ¹æ³ã
éã¢ã»ã³ãã©
.classä¸ã®ãã¤ãã³ã¼ããèªã¿åãæ¹æ³ã
javapã使ãã
javapã¯jdkã«å梱ããã¦ããã
ããã§ããã¢ã»ã³ãã©ã¨ã¯ï¼MSILã®å ´åã¨åããï¼
ããã¾ã§ä»®æ³ãã·ã³ãèªã¿åãã¢ã»ã³ããª(ï¼VMç¨ã®ãã¤ãã³ã¼ãããã¼ã¢ããã¯è¡¨ç¤ºãããã®)ã§ãããªãäºã«æ³¨æã
CPUã«ç´æ¥æ¸¡ãå½ä»¤ã§ã¯ãªãã
ããã³ãã³ãããã³ãããã ãããjavap -c HelloWorld
åç §ï¼
- javapã³ãã³ãã§ã¯ã©ã¹ãã¡ã¤ã«ãèªããhttp://www.atmarkit.co.jp/fjava/javatips/065java004.html
- ãã¤ãã³ã¼ãã«ã¤ãã¦ãhttp://www.nextindex.net/java/perform/byte.html
- ãã¼ã¢ããã¯è¡¨ãhttp://ja.wikipedia.org/wiki/Java%E4%BB%AE%E6%83%B3%E3%83%9E%E3%82%B7%E3%83%B3
éã³ã³ãã¤ã©
.classãã.javaã(æ¨æ¸¬ã«ãã)å¾ãæ¹æ³ã
JADã使ãã
Eclipseç¨ã«ã¯jadclipseãªããã©ã°ã¤ã³ãããï¼
ããã使ã£ã¦ããã¨ä½ãã«ãµã¯ãµã¯ã¨ã½ã¼ã¹ã³ã¼ãã表示ãããã®ã§ï¼.classã®åå¨ãå¿ãã¦ãã¾ãã»ã©ã
ããã³ãã³ãããã³ãããã ãããjad -8 HelloWorld.class
- jadã®ãã¦ã³ãã¼ãã¨ä½¿ãæ¹ãhttp://adgjm.net/its/java/re.htm
ï¼ï¼ï¼ãã®ä»
Flash(swfãã¡ã¤ã«)ã®éã³ã³ãã¤ã«ãã§ããï¼ã¨è¬³ã£ã¦ãããã¼ã«ãããã
ãã¡ãã¯å¤æã¨ãããããæ½åºãã«è¿ãã ããã
- ãªã³ã¯éãhttp://coliss.com/articles/software/853.html
ã¾ã¨ã
ã³ãã³ãããã³ãããã
- dumpbin /DISASM /rawdata a.exe > b.asm
- ildasm /output=b.txt a.exe
- javap -c HelloWorld
- jad -8 HelloWorld.class
GUIã§
- .NET Reflector
é¢é£ããè¨äºï¼
ã¡ã¢ãªã®ä¸èº«ãèªãã§ã¿ãããï¼ããã»ã¹ããã³ãï¼è§£æããæ¹æ³ï¼
http://language-and-engineering.hatenablog.jp/entry/20081019/1224341559
ã¦ã£ã³ãã¦ããã£ããã« Windows ã®å
é¨ã®ä»çµã¿ãæ¢ããï¼ååã®è£è¶³ï¼ã¢ã»ã³ãã©ã§ã¦ã£ã³ãã¦ãçæããæ¹æ³
http://language-and-engineering.hatenablog.jp/entry/20081109/1226258057
ã¦ã£ã³ãã¦ããã£ããã« Windows ã®å
é¨ã®ä»çµã¿ãæ¢ããï¼å¾åï¼ã·ã¹ãã ã³ã¼ã«ããã«ã¼ãã«ããã¤ã¹ãã©ã¤ãã¾ã§
http://language-and-engineering.hatenablog.jp/entry/20081111/1226413103