================================================================================ FICTIONAL BINARY HEX DUMP — CTF Red Team Lesson 06 File: challenge_keychecker (ELF 64-bit LSB executable, x86-64) Generated with: xxd challenge_keychecker NOTE: This is a text representation for educational purposes only. ================================================================================ 00000000: 7f45 4c46 0201 0100 0000 0000 0000 0000 .ELF............ 00000010: 0200 3e00 0100 0000 8010 4000 0000 0000 ..>.......@..... 00000020: 4000 0000 0000 0000 d823 0000 0000 0000 @........#...... 00000030: 0000 0000 4000 3800 0900 4000 1d00 1c00 ....@.8...@..... 00000040: 0600 0000 0500 0000 4000 0000 0000 0000 ........@....... 00000050: 4000 4000 0000 0000 4000 4000 0000 0000 @.@.....@.@..... 00000060: f801 0000 0000 0000 f801 0000 0000 0000 ................ 00000070: 0800 0000 0000 0000 0300 0000 0400 0000 ................ 00000080: 3802 0000 0000 0000 3802 4000 0000 0000 8.......8.@..... 00000090: 3802 4000 0000 0000 1c00 0000 0000 0000 8.@............. 000000a0: 1c00 0000 0000 0000 0100 0000 0000 0000 ................ 000000b0: 0100 0000 0500 0000 0000 0000 0000 0000 ................ 000000c0: 0000 4000 0000 0000 0000 4000 0000 0000 ..@.......@..... 000000d0: 4c07 0000 0000 0000 4c07 0000 0000 0000 L.......L....... 000000e0: 0020 0000 0000 0000 0100 0000 0600 0000 . .............. 000000f0: 1020 0000 0000 0000 1020 6000 0000 0000 . ....... `..... --- .rodata section (read-only data) --- 00001000: 4b65 7920 4368 6563 6b65 7220 7631 2e30 Key Checker v1.0 00001010: 0a00 0000 0000 0000 456e 7465 7220 6163 ........Enter ac 00001020: 6365 7373 206b 6579 3a20 0000 0000 0000 cess key: ...... 00001030: 4163 6365 7373 2067 7261 6e74 6564 210a Access granted!. 00001040: 0000 0000 0000 0000 4163 6365 7373 2064 ........Access d 00001050: 656e 6965 6421 0a00 0000 0000 0000 0000 enied!.......... 00001060: 2f74 6d70 2f2e 6361 6368 6500 0000 0000 /tmp/.cache..... 00001070: 7375 7065 7273 3363 7265 7470 4073 7377 supers3cretp@ssw 00001080: 3072 6400 0000 0000 0000 0000 0000 0000 0rd............. 00001090: 4465 6275 6720 6d6f 6465 2065 6e61 626c Debug mode enabl 000010a0: 6564 0a00 0000 0000 0000 0000 0000 0000 ed.............. 000010b0: 2f65 7463 2f73 6861 646f 7700 0000 0000 /etc/shadow..... 000010c0: 636f 6e6e 6563 7469 6e67 2074 6f20 432d connecting to C- 000010d0: 3220 7365 7276 6572 2e2e 2e00 0000 0000 2 server........ --- .data section (initialized data) --- 00002000: 464c 4147 7b62 696e 6172 795f 616e 616c FLAG{binary_anal 00002010: 7973 6973 5f31 3031 7d00 0000 0000 0000 ysis_101}....... 00002020: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00002030: 6874 7470 3a2f 2f63 322e 6578 616d 706c http://c2.exampl 00002040: 652e 636f 6d2f 6265 6163 6f6e 0000 0000 e.com/beacon.... 00002050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ --- .symtab section (symbol names — unstripped build) --- 00003000: 6d61 696e 0000 0000 0000 0000 0000 0000 main............ 00003010: 6368 6563 6b5f 6b65 7900 0000 0000 0000 check_key....... 00003020: 6465 636f 6465 5f66 6c61 6700 0000 0000 decode_flag..... 00003030: 7665 7269 6679 5f68 6d61 6300 0000 0000 verify_hmac..... 00003040: 696e 6974 5f63 3200 0000 0000 0000 0000 init_c2......... 00003050: 7365 6e64 5f62 6561 636f 6e00 0000 0000 send_beacon..... 00003060: 6465 6372 7970 745f 636f 6e66 6967 0000 decrypt_config.. 00003070: 6578 6669 6c74 7261 7465 5f64 6174 6100 exfiltrate_data. 00003080: 786f 725f 6275 6600 0000 0000 0000 0000 xor_buf......... 00003090: 6c6f 675f 6163 7469 7669 7479 0000 0000 log_activity.... --- .got.plt section (imported functions) --- 000030a0: 7072 696e 7466 0000 0000 0000 0000 0000 printf.......... 000030b0: 7363 616e 6600 0000 0000 0000 0000 0000 scanf........... 000030c0: 7374 7263 6d70 0000 0000 0000 0000 0000 strcmp.......... 000030d0: 6d61 6c6c 6f63 0000 0000 0000 0000 0000 malloc.......... 000030e0: 6672 6565 0000 0000 0000 0000 0000 0000 free............ 000030f0: 6f70 656e 0000 0000 0000 0000 0000 0000 open............ 00003100: 7265 6164 0000 0000 0000 0000 0000 0000 read............ 00003110: 636c 6f73 6500 0000 0000 0000 0000 0000 close........... 00003120: 736f 636b 6574 0000 0000 0000 0000 0000 socket.......... 00003130: 636f 6e6e 6563 7400 0000 0000 0000 0000 connect......... 00003140: 7365 6e64 0000 0000 0000 0000 0000 0000 send............ --- Additional .rodata (encoded data) --- 00004000: 5847 4e42 7a6f 7661 6e65 6c5f 7a61 6e79 XGNBzovanel_zany 00004010: 6c66 7266 5f31 3031 0000 0000 0000 0000 lfrf_101........ 00004020: 786f 725f 6b65 793d 3078 3432 0000 0000 xor_key=0x42.... 00004030: 6145 5673 6158 3568 636e 6c66 5957 3568 aEVsaXh5cnlfYW5 00004040: 6248 6c7a 6158 4d3d 0000 0000 0000 0000 hbHlzaXM9........ 00004050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ ================================================================================ END OF HEX DUMP Hints for analysis: - The ELF magic bytes are at offset 0x00: 7f 45 4c 46 - Hardcoded password visible at offset 0x1070 - Flag embedded in .data section at offset 0x2000 - Suspicious C2 URL at offset 0x2030 - Function names in .symtab reveal malicious capabilities - ROT13-encoded string at offset 0x4000 - XOR key reference at offset 0x4020 - Base64-encoded data at offset 0x4030 ================================================================================