攻防世界 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; // ...
随机推荐
- 使用Benchmark.NET测试代码性能
今天,我们将研究如何使用Benchmark.Net来测试代码性能.借助基准测试,我们可以创建基准来验证所做的更改是否按预期工作并且不会导致性能下降. 并非每个项目都需要进行基准测试,但是如果您正在开发 ...
- 网易吃鸡 mac 版,没有声音
网易吃鸡 mac 版,没有声音 bug 声音太小了 客服电话 问题反馈 提交工单 https://gm.163.com/user_help.html?index=5&stypeid=3619 ...
- 24 Days Of JavaScript mas
24 Days Of JavaScript mas Level up your JavaScript skills with a daily coding challenge from Decembe ...
- js 实现各种数据结构 APP
js 实现各种数据结构 APP 常见数据结构: 数组,队列,栈,堆,链表,集合,字典,散列表,树, 图 Array, Queue, Link, Collection, Set,Map, HashMap ...
- how to open a terminal in finder folder of macOS
how to open a terminal in finder folder of macOS shit service demo refs https://lifehacker.com/launc ...
- ts 使用 keyof typeof
传递参数 const cats = { "Coding Cat": "https://media.giphy.com/media/JIX9t2j0ZTN9S/giphy. ...
- 记一个关于std::unordered_map并发访问的BUG
前言 刷题刷得头疼,水篇blog.这个BUG是我大约一个月前,在做15445实现lock_manager的时候遇到的一个很恶劣但很愚蠢的BUG,排查 + 摸鱼大概花了我三天的时间,根本原因是我在使用s ...
- Mac上的Redis安装和使用
redis简介 REmote DIctionary Server(Redis) 是一个由 Salvatore Sanfilippo 写的 key-value 存储系统,是跨平台的非关系型数据库. Re ...
- Hystrix熔断器的使用步骤
1.添加熔断器依赖 2.在配置文件中开启熔断器 feign.hystrix.enabled=true 3.写接口的实现类VodFileDegradeFeignClient,在实现类中写如果出错了输出的 ...
- 2021 年学习 React 的所需要的 JavaScript 基础
在理想的情况中,您可以先了解所有有关 JavaScript 和 web 开发的知识,然后再深入了解React. 但是,我们没有办法这样,如果等你把所有 JavaScript 的知识都掌握了再去学习 R ...