-
-
[原创]BUUCTF逆向题:[UTCTF2020]basic-re
-
发表于: 2022-3-27 17:36 4889
-
1.基本信息探查:
1.EXEinfo:
2.运行一下:
2.IDA分析:
1.主函数分析:
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 29 30 31 32 33 34 35 36 37 38 39 40 | int __cdecl main( int argc, const char * * argv, const char * * envp) { char v4; / / [rsp + Fh] [rbp - 21h ] BYREF double v5; / / [rsp + 10h ] [rbp - 20h ] BYREF double v6; / / [rsp + 18h ] [rbp - 18h ] BYREF unsigned __int64 v7; / / [rsp + 28h ] [rbp - 8h ] v7 = __readfsqword( 0x28u ); printf( "Enter an operator (+, -, *,): " ); __isoc99_scanf( "%c" , &v4); printf( "Enter two operands: " ); __isoc99_scanf( "%lf %lf" , &v5, &v6); if ( v4 = = '/' ) { printf( "%.1lf / %.1lf = %.1lf" , v5, v6, v5 / v6); return 0 ; } if ( v4 > '/' ) goto LABEL_11; if ( v4 = = '-' ) { printf( "%.1lf - %.1lf = %.1lf" , v5, v6, v5 - v6); return 0 ; } if ( v4 > '-' ) goto LABEL_11; if ( v4 = = '*' ) { printf( "%.1lf * %.1lf = %.1lf" , v5, v6, v5 * v6); return 0 ; } if ( v4 ! = '+' ) { LABEL_11: printf( "Error! operator is not correct" ); return 0 ; } printf( "%.1lf + %.1lf = %.1lf" , v5, v6, v5 + v6); return 0 ; } |
这个主函数就是做两个数的+,-,*,/,也没有看到什么flag啥的,咋办呢,主函数反正是没得flag的线索,那就直接查看字符串:
其实这个题啥也没考,flag摆你面前了:
utflag{str1ngs_1s_y0ur_fr13nd}
赞赏
他的文章
- 关于迷宫题的一些求解思路 11224
- [原创]攻防世界PWN新手区:int_overflow 7860
- [原创]攻防世界PWN新手区:guess_num 11574
- [原创]攻防世界PWN新手区:level2 11849
- [原创]攻防世界PWN新手区:level0 6144
看原图
赞赏
雪币:
留言: