ubuntu@vm:~/桌面/新建文件夹$ checksec --file=ciscn RELRO STACK CANARY NX PIE RPATH RUNPATH Symbols FORTIFY Fortified Fortifiable FILE Partial RELRO Canary found NX enabled No PIE No RPATH No RUNPATH 90 Symbols No 0 2 ciscn
int __cdecl main(int argc, constchar **argv, constchar **envp) { int v4; // [rsp+Ch] [rbp-4h] BYREF
init(argc, argv, envp); puts("EEEEEEE hh iii "); puts("EE mm mm mmmm aa aa cccc hh nn nnn eee "); puts("EEEEE mmm mm mm aa aaa cc hhhhhh iii nnn nn ee e "); puts("EE mmm mm mm aa aaa cc hh hh iii nn nn eeeee "); puts("EEEEEEE mmm mm mm aaa aa ccccc hh hh iii nn nn eeeee "); puts("===================================================================="); puts("Welcome to this Encryption machine\n"); begin(); while ( 1 ) { while ( 1 ) { fflush(0LL); v4 = 0; __isoc99_scanf("%d", &v4); getchar(); if ( v4 != 2 ) break; puts("I think you can do it by yourself"); begin(); } if ( v4 == 3 ) { puts("Bye!"); return0; } if ( v4 != 1 ) break; encrypt(); begin(); } puts("Something Wrong!"); return0; }
begin
1 2 3 4 5 6 7 8
intbegin() { puts("===================================================================="); puts("1.Encrypt"); puts("2.Decrypt"); puts("3.Exit"); returnputs("Input your choice!"); }
LOAD:00000000004002380000001C C /lib64/ld-linux-x86-64.so.2 LOAD:00000000004004490000000A C libc.so.6 LOAD:000000000040045800000007 C fflush LOAD:000000000040045F0000000F C __isoc99_scanf LOAD:000000000040046E 00000007 C signal LOAD:000000000040047A 00000006 C stdin LOAD:000000000040048000000006 C _exit LOAD:000000000040048600000007 C strlen LOAD:000000000040048D 00000008 C getchar LOAD:000000000040049500000007 C stdout LOAD:000000000040049C 00000007 C stderr LOAD:00000000004004A3 00000006 C alarm LOAD:00000000004004A9 00000008 C setvbuf LOAD:00000000004004B1 00000012 C __libc_start_main LOAD:00000000004004C3 0000000F C __gmon_start__ LOAD:00000000004004D2 0000000A C GLIBC_2.7 LOAD:00000000004004DC 0000000C C GLIBC_2.2.5 .rodata:0000000000400CA8 00000008 C Timeout .rodata:0000000000400CB0 00000025 C Input your Plaintext to be encrypted //<--提示 .rodata:0000000000400CD5 0000000B C Ciphertext .rodata:0000000000400CE0 00000045 C ==================================================================== .rodata:0000000000400D25 0000000A C 1.Encrypt .rodata:0000000000400D2F 0000000A C 2.Decrypt .rodata:0000000000400D39 00000007 C 3.Exit .rodata:0000000000400D40 00000013 C Input your choice!