CTF dotNet逆向分析
生活随笔
收集整理的這篇文章主要介紹了
CTF dotNet逆向分析
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
題目來源http://ctf.idf.cn/index.php?g=game&m=article&a=index&id=36
.NET逆向第一題?
嗯,看名字就應該明白了,快去下載吧!
http://pan.baidu.com/s/1bnvVbp9
下載后是一個DotNetCrackMe1.exe文件。
分析
逆向分析的基礎問題,可以參考以下資源列表 豆瓣逆向分析基礎總結:https://www.douban.com/note/214872071/ 看雪逆向精華區:http://bbs.pediy.com/forumdisplay.php?viewgoodnees=1&f=4&prefixid=phpforce_20 看雪破解精華區:http://bbs.pediy.com/forumdisplay.php?viewgoodnees=1&f=37下面從頭講講這個小題的解決思路: 1.安裝.net4.0、ILSPY2.3 or 更高版本 2.用ILSPY2.3打開DotNetCrackMe1.exe3.展開DotNetCrackMe1,看到這個.net程序很簡單,就一個WindowsFormsApplication1,里面就一個Form1,Form1下有button1_click方法,其中的判斷語句 if ("fOCPTVF0diO+B0IMXntkPoRJDUj5CCsT" == this.Encode(this.textBox1.get_Text()))
- 1
- 1
4.再看一下Encode()函數,可以看出來是一個DES加密過程,最后又進行了base64的編碼。 public string Encode(string data) {string result;try{byte[] bytes = Encoding.get_ASCII().GetBytes("wctf{wol");byte[] bytes2 = Encoding.get_ASCII().GetBytes("dy_crack}");DESCryptoServiceProvider dESCryptoServiceProvider = new DESCryptoServiceProvider();int keySize = dESCryptoServiceProvider.get_KeySize();MemoryStream memoryStream = new MemoryStream();CryptoStream cryptoStream = new CryptoStream(memoryStream, dESCryptoServiceProvider.CreateEncryptor(bytes, bytes2), 1);StreamWriter streamWriter = new StreamWriter(cryptoStream);streamWriter.Write(data);streamWriter.Flush();cryptoStream.FlushFinalBlock();streamWriter.Flush();result = Convert.ToBase64String(memoryStream.GetBuffer(), 0, (int)memoryStream.get_Length());}catch{result = "http://weibo.com/woldy";}return result; }
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
最后附上逆向工具ILSPY的下載地址:?
http://pan.baidu.com/share/link?shareid=505596871&uk=1376014793
答案:解碼得到wctf{dotnet_crackme1}
總結
以上是生活随笔為你收集整理的CTF dotNet逆向分析的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 通过源码将git升级到最新版
- 下一篇: 简单解释 MapReduce 算法