[INSHack2018]Tricky-Part1
生活随笔
收集整理的這篇文章主要介紹了
[INSHack2018]Tricky-Part1
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- [INSHack2018]Tricky-Part1
- 主要利用交叉引用列表( Jump - Jump to xref 或快捷鍵X,將光標放在一個交叉引用的目標地址上,通過該快捷鍵可彈出交叉引用列表。)
- 主要函數分析
- 腳本
[INSHack2018]Tricky-Part1
主要利用交叉引用列表( Jump - Jump to xref 或快捷鍵X,將光標放在一個交叉引用的目標地址上,通過該快捷鍵可彈出交叉引用列表。)
主要函數分析
std::string *__fastcall stack_check(std::string *a1) {unsigned __int64 v1; // rbxunsigned __int64 v2; // rax_BYTE *v3; // raxunsigned __int64 v4; // rbxchar v6; // [rsp+1Bh] [rbp-25h] BYREFint i; // [rsp+1Ch] [rbp-24h]char v8[32]; // [rsp+20h] [rbp-20h] BYREFstd::allocator<char>::allocator(&v6);std::string::string(v8, &unk_4011D8, &v6);std::allocator<char>::~allocator(&v6);for ( i = 0; ; ++i ){v4 = i;if ( v4 >= std::string::size((std::string *)&base) )break;v1 = i;v2 = std::string::size((std::string *)v8); // 這里是v8數組大小4LOBYTE(v1) = *(_BYTE *)std::string::operator[]((__int64)v8, v1 % v2);// 結果v1是取出v8數組元素v3 = (_BYTE *)std::string::operator[]((__int64)&base, i);// v3是取出對應位置的輸入結果*v3 ^= v1; // 輸入數組和v8進行異或}std::string::string(a1, (const std::string *)&base);std::string::~string(v8);return a1; }兩個重要數組,一個是v8,另外一個base
unsigned char ida_chars[] = {71, 68, 66 }; unsigned char ida_chars[] = {0x0E, 0x0A, 0x11, 0x06, 0x3F, 0x01, 0x1F, 0x1C, 0x1D, 0x76, 0x37, 0x1D, 0x2F, 0x70, 0x30, 0x23, 0x77, 0x30, 0x18, 0x22, 0x72, 0x35, 0x1B, 0x31, 0x33, 0x70, 0x36, 0x76, 0x27, 0x1D, 0x73, 0x2A, 0x76, 0x2B, 0x75, 0x31, 0x3E, 0x37, 0x1D, 0x30, 0x2C, 0x71, 0x29, 0x1B, 0x26, 0x74, 0x26, 0x37, 0x20, 0x23, 0x71, 0x35, 0x1B, 0x24, 0x73, 0x75, 0x2E, 0x34, 0x39 };腳本
a =[0x0E, 0x0A, 0x11, 0x06, 0x3F, 0x01, 0x1F, 0x1C, 0x1D, 0x76, 0x37, 0x1D, 0x2F, 0x70, 0x30, 0x23, 0x77, 0x30, 0x18, 0x22, 0x72, 0x35, 0x1B, 0x31, 0x33, 0x70, 0x36, 0x76, 0x27, 0x1D, 0x73, 0x2A, 0x76, 0x2B, 0x75, 0x31, 0x3E, 0x37, 0x1D, 0x30, 0x2C, 0x71, 0x29, 0x1B, 0x26, 0x74, 0x26, 0x37, 0x20, 0x23, 0x71, 0x35, 0x1B, 0x24, 0x73, 0x75, 0x2E, 0x34, 0x39 ]b =[71, 68, 66 ] c="" for i in range(len(a)):c+=chr(a[i]^b[i%(len(b))]) print(c) INSA{CXX_1s_h4rd3r_f0r_st4t1c_4n4l1sys_wh3n_d3bugg3r_f41ls}總結
以上是生活随笔為你收集整理的[INSHack2018]Tricky-Part1的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Ubuntu下pip安装、升级、卸载
- 下一篇: Androidstudio无法修改按钮颜