Access Denied 1.2 CTF 2018: BitMapElf (Forensics)

Challenge

A bitmap defines a display space and the color for each pixel or “bit” in the display space.

Can you get the flag out using bit mapping ?

Challenge running at : https://bitmapelf.herokuapp.com

Solution

The referred website contains a page with an HTML table. Each table row contains cells with bgcolor attributes set to hexadecimal numbers.

<td bgcolor="#7f454c" height="25" width="25"></td>
<td bgcolor="#460201" height="25" width="25"></td>
<td bgcolor="#010000" height="25" width="25"></td>
<td bgcolor="#000000" height="25" width="25"></td>
<td bgcolor="#000000" height="25" width="25"></td>
<td bgcolor="#000200" height="25" width="25"></td>
<td bgcolor="#3e0001" height="25" width="25"></td>
<td bgcolor="#000000" height="25" width="25"></td>
<td bgcolor="#e00840" height="25" width="25"></td>
<td bgcolor="#000000" height="25" width="25"></td>
<td bgcolor="#000040" height="25" width="25"></td>
<td bgcolor="#000000" height="25" width="25"></td>
<td bgcolor="#000000" height="25" width="25"></td>

And so on...

These numbers can be interpreted like background colors or, considering the name of the challenge, like the binary representation of an ELF file.

Extracting all the hexadecimal numbers will give the following data:

7f454c4602010100000000000000000002003e0001000000e0084000000000004000000000000000381d00000000000000000000400038000900400020001d000600000005000000400000000000000040004000000000004000400000000000f801000000000000f801000000000000080000000000000003000000040000003802000000000000380240000000000038024000000000001c000000000000001c0000000000000001000000000000000100000005000000000000000000000000004000000000000000400000000000180d000000000000180d00000000000000002000000000000100000006000000e80d000000000000e80d600000000000e80d6000000000009802000000000000a00200000000000000002000000000000200000006000000080e000000000000080e600000000000080e600000000000f001000000000000f0010000000000000800000000000000040000000400000054020000000000005402400000000000540240000000000044000000000000004400000000000000040000000000000050e57464040000006c0b0000000000006c0b4000000000006c0b40000000000044000000000000004400000000000000040000000000000051e574640600000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000052e5746404000000e80d000000000000e80d600000000000e80d6000000000001802000000000000180200000000000001000000000000002f6c696236342f6c642d6c696e75782d7838362d36342e736f2e3200040000001000000001000000474e550000000000020000000600000020000000040000001400000003000000474e5500ef141e5ab7d4d637f6ab579a8449c38c68128733020000000e000000010000000600000000001000200100010e000000000000002845d54c79496bb60000000000000000000000000000000000000000000000001000000020000000000000000000000000000000000000001f0000002000000000000000000000000000000000000000f100000012000000000000000000000000000000000000008801000012000000000000000000000000000000000000007b01000012000000000000000000000000000000000000003300000020000000000000000000000000000000000000004f00000020000000000000000000000000000000000000000901000012000000000000000000000000000000000000006a0100001200000000000000000000000000000000000000690000001200000000000000000000000000000000000000a30000001200000000000000000000000000000000000000e400000012000000000000000000000000000000000000005101000012000000000000000000000000000000000000007600000012000000500840000000000000000000000000008e00000012000000b0084000000000000000000000000000006c6962737464632b2b2e736f2e36005f5f676d6f6e5f73746172745f5f005f4a765f5265676973746572436c6173736573005f49544d5f64657265676973746572544d436c6f6e655461626c65005f49544d5f7265676973746572544d436c6f6e655461626c65005f5a4e536149634544314576005f5a4e537438696f735f6261736534496e697444314576005f5f6778785f706572736f6e616c6974795f7630005f5a4e5374375f5f6378783131313262617369635f737472696e67496353743131636861725f747261697473496345536149634545433145504b63524b53335f005f5a4e536149634543314576005f5a4e537438696f735f6261736534496e697443314576005f5a4e5374375f5f6378783131313262617369635f737472696e67496353743131636861725f74726169747349634553614963454544314576006c69626763635f732e736f2e31005f556e77696e645f526573756d65006c6962632e736f2e36005f5f737461636b5f63686b5f6661696c005f5f6378615f617465786974005f5f6c6962635f73746172745f6d61696e004743435f332e3000474c4942435f322e3400474c4942435f322e322e35004358584142495f312e3300474c49424358585f332e342e323100474c49424358585f332e340000000000000002000300030000000000040005000200040002000700020006000000010001004301000010000000200000005026790b000007009a01000000000000010002006001000010000000300000001469690d00000500a201000010000000751a690900000300ac0100000000000001000300010000001000000000000000d3af6b0500000600b80100001000000071f8970200000400c3010000100000007429920800000200d201000000000000f80f600000000000060000000100000000000000000000001810600000000000070000000300000000000000000000002010600000000000070000000400000000000000000000002810600000000000070000000500000000000000000000003010600000000000070000000e00000000000000000000003810600000000000070000000800000000000000000000004010600000000000070000000900000000000000000000004810600000000000070000000a00000000000000000000005010600000000000070000000b00000000000000000000005810600000000000070000000c00000000000000000000006010600000000000070000000f00000000000000000000006810600000000000070000000d00000000000000000000004883ec08488b05fd0720004885c07405e8cb0000004883c408c3000000000000ff35f2072000ff25f40720000f1f4000ff25f20720006800000000e9e0ffffffff25ea0720006801000000e9d0ffffffff25e20720006802000000e9c0ffffffff25da0720006803000000e9b0ffffffff25d20720006804000000e9a0ffffffff25ca0720006805000000e990ffffffff25c20720006806000000e980ffffffff25ba0720006807000000e970ffffffff25b20720006808000000e960ffffffff25aa0720006809000000e950ffffffff25a2072000680a000000e940ffffffff25220720006690000000000000000031ed4989d15e4889e24883e4f0505449c7c0300b400048c7c1c00a400048c7c7d6094000e827fffffff4660f1f440000b88710600055482d801060004883f80e4889e5761bb8000000004885c074115dbf80106000ffe0660f1f8400000000005dc30f1f4000662e0f1f840000000000be80106000554881ee8010600048c1fe034889e54889f048c1e83f4801c648d1fe7415b8000000004885c0740b5dbf80106000ffe00f1f005dc3660f1f440000803de9062000007511554889e5e86effffff5dc605d606200001f3c30f1f4000bf000e600048833f007505eb930f1f00b8000000004885c074f1554889e5ffd05de97affffff554889e5534883ec4864488b042528000000488945e831c0488d45bf4889c7e8a6feffff488d55bf488d45c0be480b40004889c7e881feffff488d45bf4889c7e865feffffbb00000000488d45c04889c7e834feffff89d8488b4de86448330c25280000007421eb1a4889c3488d45bf4889c7e832feffff4889d84889c7e867feffffe812feffff4883c4485b5dc3554889e54883ec10897dfc8975f8837dfc017527817df8ffff0000751ebf81106000e894fdffffba78106000be81106000bf50084000e8a0fdffff90c9c3554889e5beffff0000bf01000000e8afffffff5dc30f1f840000000000415741564189ff415541544c8d251603200055488d2d1e032000534989f64989d54c29e54883ec0848c1fd03e8fffcffff4885ed742031db0f1f8400000000004c89ea4c89f64489ff41ff14dc4883c3014839eb75ea4883c4085b5d415c415d415e415fc390662e0f1f840000000000f3c300004883ec084883c408c3000000010002000000000061636365737364656e6965647b63306c3072355f6172335f61773373306d337d00000000011b033b4000000007000000a4fcffff8c00000074fdffff5c0000006afeffffd4000000f9fefffffc00000037ffffff1c01000054ffffff3c010000c4ffffff840100001400000000000000017a5200017810011b0c070890010710140000001c00000010fdffff2a00000000000000000000001400000000000000017a5200017810011b0c070890010000240000001c00000010fcffffc0000000000e10460e184a0f0b770880003f1a3b2a332422000000001c00000000000000017a504c52000178100703b0084000031b0c07089001000024000000240000008efdffff8f000000040c0d4000410e108602430d0645830302850c07080000001c0000008c000000f5fdffff3e00000000410e108602430d06790c07080000001c000000ac00000013feffff1500000000410e108602430d06500c070800000044000000cc00000010feffff6500000000420e108f02420e188e03450e208d04420e288c05480e308606480e3883074d0e40720e38410e30410e28420e20420e18420e10420e0800140000001401000038feffff02000000000000000000000000000000ffff0108340569005132000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b009400000000000a30a400000000000900940000000000000000000000000000100000000000000010000000000000001000000000000004301000000000000010000000000000060010000000000000c00000000000000f0074000000000000d00000000000000340b4000000000001900000000000000e80d6000000000001b0000000000000010000000000000001a00000000000000f80d6000000000001c000000000000000800000000000000f5feff6f000000009802400000000000050000000000000040044000000000000600000000000000c0024000000000000a00000000000000de010000000000000b000000000000001800000000000000150000000000000000000000000000000300000000000000001060000000000002000000000000000801000000000000140000000000000007000000000000001700000000000000e8064000000000000700000000000000d0064000000000000800000000000000180000000000000009000000000000001800000000000000feffff6f000000004006400000000000ffffff6f000000000300000000000000f0ffff6f000000001e064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080e6000000000000000000000000000000000000000000026084000000000003608400000000000460840000000000056084000000000006608400000000000760840000000000086084000000000009608400000000000a608400000000000b608400000000000c608400000000000000000000000000000000000000000004743433a20285562756e747520352e342e302d367562756e7475317e31362e30342e31302920352e342e30203230313630363039000000000000000000000000000000000000000000000000000000000000000003000100380240000000000000000000000000000000000003000200540240000000000000000000000000000000000003000300740240000000000000000000000000000000000003000400980240000000000000000000000000000000000003000500c002400000000000000000000000000000000000030006004004400000000000000000000000000000000000030007001e0640000000000000000000000000000000000003000800400640000000000000000000000000000000000003000900d00640000000000000000000000000000000000003000a00e80640000000000000000000000000000000000003000b00f00740000000000000000000000000000000000003000c00100840000000000000000000000000000000000003000d00d00840000000000000000000000000000000000003000e00e00840000000000000000000000000000000000003000f00340b40000000000000000000000000000000000003001000400b400000000000000000000000000000000000030011006c0b40000000000000000000000000000000000003001200b00b400000000000000000000000000000000000030013000c0d40000000000000000000000000000000000003001400e80d60000000000000000000000000000000000003001500f80d60000000000000000000000000000000000003001600000e60000000000000000000000000000000000003001700080e60000000000000000000000000000000000003001800f80f60000000000000000000000000000000000003001900001060000000000000000000000000000000000003001a00701060000000000000000000000000000000000003001b00801060000000000000000000000000000000000003001c0000000000000000000000000000000000010000000400f1ff000000000000000000000000000000000c00000001001600000e60000000000000000000000000001900000002000e00100940000000000000000000000000001b00000002000e00500940000000000000000000000000002e00000002000e00900940000000000000000000000000004400000001001b00801060000000000001000000000000005300000001001500f80d60000000000000000000000000007a00000002000e00b00940000000000000000000000000008600000001001400e80d6000000000000000000000000000a50000000400f1ff00000000000000000000000000000000b000000001001b0081106000000000000100000000000000bf00000002000e00650a4000000000003e00000000000000ef00000002000e00a30a4000000000001500000000000000010000000400f1ff000000000000000000000000000000000301000001001200080d40000000000000000000000000001101000001001600000e6000000000000000000000000000000000000400f1ff000000000000000000000000000000001d010000000011006c0b40000000000000000000000000003001000001001900001060000000000000000000000000004601000000001400f80d60000000000000000000000000005701000000001400e80d60000000000000000000000000006a01000001001700080e60000000000000000000000000007002000020001a00701060000000000000000000000000007301000012000e00300b40000000000002000000000000007402000012000e00e0084000000000002a000000000000008301000020000000000000000000000000000000000000009201000020000000000000000000000000000000000000007d01000012000f00340b4000000000000000000000000000a60100001200000000000000000000000000000000000000cb0100001200000000000000000000000000000000000000ea01000012000000000000000000000000000000000000000402000012000000500840000000000000000000000000002902000020000000000000000000000000000000000000004502000011001000400b40000000000004000000000000005402000020000000000000000000000000000000000000006e02000010001a00701060000000000000000000000000007b0200001200000000000000000000000000000000000000c502000011021a0080106000000000000000000000000000d102000011021a0078106000000000000000000000000000de02000012000e00c00a4000000000006500000000000000ee02000010001b0080106000000000000000000000000000fa02000012000000000000000000000000000000000000001603000012000000000000000000000000000000000000005201000010001b00881060000000000000000000000000003003000012000000000000000000000000000000000000008103000010001a0080106000000000000000000000000000880300001200000000000000000000000000000000000000a203000012000000b0084000000000000000000000000000c30300001200000000000000000000000000000000000000fe00000012000e00d6094000000000008f00000000000000e802000012000b00f00740000000000000000000000000000063727473747566662e63005f5f4a43525f4c4953545f5f00646572656769737465725f746d5f636c6f6e6573005f5f646f5f676c6f62616c5f64746f72735f61757800636f6d706c657465642e37353934005f5f646f5f676c6f62616c5f64746f72735f6175785f66696e695f61727261795f656e747279006672616d655f64756d6d79005f5f6672616d655f64756d6d795f696e69745f61727261795f656e74727900666f72656e322e637070005f5a53744c385f5f696f696e6974005f5a34315f5f7374617469635f696e697469616c697a6174696f6e5f616e645f6465737472756374696f6e5f306969005f474c4f42414c5f5f7375625f495f6d61696e005f5f4652414d455f454e445f5f005f5f4a43525f454e445f5f005f5f474e555f45485f4652414d455f484452005f474c4f42414c5f4f46465345545f5441424c455f005f5f696e69745f61727261795f656e64005f5f696e69745f61727261795f7374617274005f44594e414d4943005f5f6c6962635f6373755f66696e69005f5f676d6f6e5f73746172745f5f005f4a765f5265676973746572436c6173736573005f5a4e537438696f735f6261736534496e6974433145764040474c49424358585f332e34005f5f6c6962635f73746172745f6d61696e4040474c4942435f322e322e35005f5f6378615f6174657869744040474c4942435f322e322e35005f5a4e537438696f735f6261736534496e6974443145764040474c49424358585f332e34005f49544d5f64657265676973746572544d436c6f6e655461626c65005f494f5f737464696e5f75736564005f49544d5f7265676973746572544d436c6f6e655461626c65005f5f646174615f7374617274005f5a4e5374375f5f6378783131313262617369635f737472696e67496353743131636861725f747261697473496345536149634545443145764040474c49424358585f332e342e3231005f5f544d435f454e445f5f005f5f64736f5f68616e646c65005f5f6c6962635f6373755f696e6974005f5f6273735f7374617274005f5f737461636b5f63686b5f6661696c4040474c4942435f322e34005f5a4e5361496345443145764040474c49424358585f332e34005f5a4e5374375f5f6378783131313262617369635f737472696e67496353743131636861725f747261697473496345536149634545433145504b63524b53335f4040474c49424358585f332e342e3231005f6564617461005f5a4e5361496345433145764040474c49424358585f332e34005f5f6778785f706572736f6e616c6974795f763040404358584142495f312e33005f556e77696e645f526573756d6540404743435f332e3000002e73796d746162002e737472746162002e7368737472746162002e696e74657270002e6e6f74652e4142492d746167002e6e6f74652e676e752e6275696c642d6964002e676e752e68617368002e64796e73796d002e64796e737472002e676e752e76657273696f6e002e676e752e76657273696f6e5f72002e72656c612e64796e002e72656c612e706c74002e696e6974002e706c742e676f74002e74657874002e66696e69002e726f64617461002e65685f6672616d655f686472002e65685f6672616d65002e6763635f6578636570745f7461626c65002e696e69745f6172726179002e66696e695f6172726179002e6a6372002e64796e616d6963002e676f742e706c74002e64617461002e627373002e636f6d6d656e740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000010000000200000000000000380240000000000038020000000000001c00000000000000000000000000000001000000000000000000000000000000230000000700000002000000000000005402400000000000540200000000000020000000000000000000000000000000040000000000000000000000000000003100000007000000020000000000000074024000000000007402000000000000240000000000000000000000000000000400000000000000000000000000000044000000f6ffff6f02000000000000009802400000000000980200000000000028000000000000000500000000000000080000000000000000000000000000004e0000000b0000000200000000000000c002400000000000c00200000000000080010000000000000600000001000000080000000000000018000000000000005600000003000000020000000000000040044000000000004004000000000000de010000000000000000000000000000010000000000000000000000000000005e000000ffffff6f02000000000000001e064000000000001e0600000000000020000000000000000500000000000000020000000000000002000000000000006b000000feffff6f02000000000000004006400000000000400600000000000090000000000000000600000003000000080000000000000000000000000000007a000000040000000200000000000000d006400000000000d006000000000000180000000000000005000000000000000800000000000000180000000000000084000000040000004200000000000000e806400000000000e80600000000000008010000000000000500000019000000080000000000000018000000000000008e000000010000000600000000000000f007400000000000f0070000000000001a000000000000000000000000000000040000000000000000000000000000008900000001000000060000000000000010084000000000001008000000000000c00000000000000000000000000000001000000000000000100000000000000094000000010000000600000000000000d008400000000000d00800000000000008000000000000000000000000000000080000000000000000000000000000009d000000010000000600000000000000e008400000000000e0080000000000005202000000000000000000000000000010000000000000000000000000000000a3000000010000000600000000000000340b400000000000340b0000000000000900000000000000000000000000000004000000000000000000000000000000a9000000010000000200000000000000400b400000000000400b0000000000002900000000000000000000000000000008000000000000000000000000000000b10000000100000002000000000000006c0b4000000000006c0b0000000000004400000000000000000000000000000004000000000000000000000000000000bf000000010000000200000000000000b00b400000000000b00b0000000000005c01000000000000000000000000000008000000000000000000000000000000c90000000100000002000000000000000c0d4000000000000c0d0000000000000c00000000000000000000000000000001000000000000000000000000000000db0000000e0000000300000000000000e80d600000000000e80d0000000000001000000000000000000000000000000008000000000000000000000000000000e70000000f0000000300000000000000f80d600000000000f80d0000000000000800000000000000000000000000000008000000000000000000000000000000f3000000010000000300000000000000000e600000000000000e0000000000000800000000000000000000000000000008000000000000000000000000000000f8000000060000000300000000000000080e600000000000080e000000000000f00100000000000006000000000000000800000000000000100000000000000098000000010000000300000000000000f80f600000000000f80f0000000000000800000000000000000000000000000008000000000000000800000000000000010100000100000003000000000000000010600000000000001000000000000070000000000000000000000000000000080000000000000008000000000000000a0100000100000003000000000000007010600000000000701000000000000010000000000000000000000000000000080000000000000000000000000000001001000008000000030000000000000080106000000000008010000000000000080000000000000000000000000000000100000000000000000000000000000015010000010000003000000000000000000000000000000080100000000000003500000000000000000000000000000001000000000000000100000000000000110000000300000000000000000000000000000000000000131c0000000000001e01000000000000000000000000000001000000000000000000000000000000010000000200000000000000000000000000000000000000b81000000000000080070000000000001f00000033000000080000000000000018000000000000000900000003000000000000000000000000000000000000003818000000000000db03000000000000000000000000000001000000000000000000000000000000 

First bytes are the ELF file signature, 7F 45 4C 46.

Using an hexadecimal editor, the real ELF file can be crafted.

Running the ELF file will not show any output.

Using the strings command (or looking into the binary file with the hexadecimal editor) will reveal the flag:

61 63 63 65 73 73 64 65 6E 69 65 64 7B 63 30 6C 30 72 35 5F 61 72 33 5F 61 77 33 73 30 6D 33 7D
accessdenied{c0l0r5_ar3_aw3s0m3}

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.