攻防世界 reverse 进阶 -gametime
19.gametime csaw-ctf-2016-quals
这是一个小游戏,挺有意思的
's'-->' ' 'x'-->'x' 'm'-->'m'
观察流程,发现检验函数在
1 char __usercall check_input_401507@<al>(int a1@<edx>, int a2@<ecx>, DWORD dwMilliseconds, int a4, int a5)
2 {
3 int v5; // esi
4 int v6; // ebx
5
6 v5 = a1;
7 v6 = a2;
8 print_401A73((int)"key is %s (%s)", a5, a4);
9 bks_401423();
10 print_401A73((int)"\r \r");
11 if ( v5 > 0 )
12 {
13 do
14 {
15 print_401A73((int)".");
16 Sleep(dwMilliseconds);
17 --v5;
18 }
19 while ( v5 );
20 }
21 if ( check_time_401260(v6, 500 * dwMilliseconds) )//关键
22 return 1;
23 print_401A73((int)"key is %s (%s)\r", a5, a4);
24 print_401A73((int)"UDDER FAILURE! http://imgur.com/4Ajx21P \n");
25 return 0;
26 }
检验工作交给了:401260()函数
1 bool __fastcall check_time_401260(int a1, int t)
2 {
3 int a1_2; // edi
4 int t_2; // esi
5 int input_c; // eax
6
7 a1_2 = a1;
8 t_2 = t;
9 if ( a1 == ' ' )
10 print_401A73((int)"s\n");
11 else
12 print_401A73((int)"%c\n", a1);
13 if ( t_2 )
14 {
15 while ( !_kbhit() )
16 {
17 if ( !--t_2 )
18 goto LABEL_7;
19 }
20 input_c = _getch(); // 输入
21 }
22 else
23 {
24 LABEL_7:
25 input_c = -1;
26 }
27 return input_c != -1 && input_c == a1_2; // 相应时间内输入,并判断是否正确
28 }
最简单的方法就是修改401260()函数的返回值,nop掉失败跳,ok
key is (no5c30416d6cf52638460377995c6a8cf5)
攻防世界 reverse 进阶 -gametime的更多相关文章
- 攻防世界 reverse 进阶 APK-逆向2
APK-逆向2 Hack-you-2014 (看名以为是安卓逆向呢0.0,搞错了吧) 程序是.net写的,直接祭出神器dnSpy 1 using System; 2 using System.Diag ...
- 攻防世界 reverse 进阶 10 Reverse Box
攻防世界中此题信息未给全,题目来源为[TWCTF-2016:Reverse] Reverse Box 网上有很多wp是使用gdb脚本,这里找到一个本地还原关键算法,然后再爆破的 https://www ...
- 攻防世界 reverse 进阶 9-re1-100
9.re1-100 1 if ( numRead ) 2 { 3 if ( childCheckDebugResult() ) 4 { 5 responseFalse(); 6 } 7 else if ...
- 攻防世界 reverse 进阶 8-The_Maya_Society Hack.lu-2017
8.The_Maya_Society Hack.lu-2017 在linux下将时间调整为2012-12-21,运行即可得到flag. 下面进行分析 1 signed __int64 __fastca ...
- 攻防世界 reverse 进阶 notsequence
notsequence RCTF-2015 关键就是两个check函数 1 signed int __cdecl check1_80486CD(int a1[]) 2 { 3 signed int ...
- 攻防世界 reverse 进阶 easyre-153
easyre-153 查壳: upx壳 脱壳: 1 int __cdecl main(int argc, const char **argv, const char **envp) 2 { 3 int ...
- 攻防世界 reverse 进阶 16-zorropub
16.zorropub nullcon-hackim-2016 (linux平台以后整理) https://github.com/ctfs/write-ups-2016/tree/master/nu ...
- 攻防世界 reverse 进阶 15-Reversing-x64Elf-100
15.Reversing-x64Elf-100 这题非常简单, 1 signed __int64 __fastcall sub_4006FD(__int64 a1) 2 { 3 signed int ...
- 攻防世界 reverse 进阶 12 ReverseMe-120
程序流程很清晰 1 int __cdecl main(int argc, const char **argv, const char **envp) 2 { 3 unsigned int v3; // ...
随机推荐
- php 安装 yii framework notice-error 的解决方案!
1 问题描述: 2 解决方案: error_reporting(0); //解决error_notice 的最简单最有效的方法在每一个php文件的头部都加上error_reporting(0); 3. ...
- jQuery 使用注意事项 与 小技巧(tips)
jQuery 使用注意事项 与 小技巧(tips) 1 $( document ).ready() https://learn.jquery.com/using-jquery-core/documen ...
- Dart SDK All In One
Dart SDK All In One Dart SDK archive https://dart.dev/tools/sdk/archive https://dart.dev/get-dart Th ...
- GitHub user language statistics
GitHub user language statistics 2020 https://madnight.github.io/githut/#/pull_requests/2020/2 2011 ~ ...
- illustrating javascript prototype & prototype chain
illustrating javascript prototype & prototype chain 图解 js 原型和原型链 proto & prototype func; // ...
- uniapp 扫二维码跳转
在h5和wxapp中 生成qrcode的组件 https://ext.dcloud.net.cn/plugin?id=39 wx小程序扫二位码文档 生成链接时 computed: { ...mapSt ...
- Flutter 获取本地图片并剪切
安装依赖 dependencies: ... image_picker: image_cropper android\app\src\main\AndroidManifest.xml 将UCropAc ...
- 「NGK每日快讯」12.22日NGK第49期官方快讯!
- 深入解析 HTTP 缓存控制
缓存(Cache)是计算机领域里的一个重要概念,是优化系统性能的利器. 由于链路漫长,网络时延不可控,浏览器使用 HTTP 获取资源的成本较高.所以,非常有必要把"来之不易"的数据 ...
- java中synchronized与Lock的异同
本文转载自java中synchronized与Lock的异同 前言 synchronized和Lock通过互斥保障原子性,能够保护共享数据以实现线程安全,其作用包括保障原子性.可见性.有序性 常见问题 ...