HackTheBox IRCWare Writeup
Explore the basics of cybersecurity in the IRCWare Challenge on Hack The Box. This easy-level Challenge introduces encryption reversal and file handling concepts in a clear and accessible way, perfect for beginners.
https://app.hackthebox.com/challenges/212
Description
During a routine check on our servers we found this suspicious binary, although when analyzing it we couldn’t get it to do anything. We assume it’s dead malware, but maybe something interesting can still be extracted from it?
Exploitation
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
#!/usr/bin/env python3
from pwn import *
def main():
try:
l = listen(8000)
print("Listening on port 8000...")
conn = l.wait_for_connection()
print("Got connection!")
conn.settimeout(3)
conn.sendline(b'NICK ircware_0411')
conn.sendline(b'USER ircware 0 * :ircware')
conn.sendline(b'JOIN #secret')
conn.sendline(b'PRIVMSG #secret :@pass ASS3MBLY')
conn.sendline(b'PRIVMSG #secret :@flag')
while True:
try:
line = conn.recvline().decode()
print(line, end='')
if 'HTB{' in line:
break
except:
break
except Exception as e:
print(f"Error: {e}")
finally:
conn.close()
if __name__ == "__main__":
main()
Run the PoC, and then execute ircware
to connect to the local service.
Summary
The IRCWare Challenge on Hack The Box is an easy-level cybersecurity challenge that introduces beginners to reverse engineering and network interaction. Participants are tasked with analyzing a suspicious binary file suspected to be dead malware. The challenge involves setting up a local listener, sending IRC (Internet Relay Chat) commands to the binary, and extracting the hidden flag from its responses. By leveraging basic scripting and network communication, the challenge demonstrates practical techniques for interacting with and extracting data from seemingly inactive binaries. It’s an excellent introduction to malware analysis and reverse engineering for newcomers to cybersecurity.