Challenge
HV19.H1 Hidden Three
1 |
Not each quote is compl |
Solution
During the Day 11 challenge HV19.11 Frolicsome Santa Jokes API, we decide to do some novice penetration testing on the server whale.hacking-lab.com.
We attempt many things including a port scan with nmap with default settings:
1 |
nmap whale.hacking-lab.com |
We find some open ports:
1 2 3 4 5 6 7 8 |
PORT STATE SERVICE 17/tcp open qotd 22/tcp open ssh 80/tcp closed http 443/tcp closed https 2222/tcp closed EtherNet/IP-1 4444/tcp closed krb524 5555/tcp closed freeciv |
Port 17 seems very interesting as it is an uncommon port. We do some research and discover it belongs to the Quote of the Day protocol.
We try to get the quote of the day using this command:
1 |
nc whale.hacking-lab.com 17 < /dev/null |
Unfortunately, this spits out a single character r which did not make much sense. However, recall the clue that Not each quote is compl. Thus we have to wait until a new letter is given to us! As it turns out a new letter which belongs to the final flag is given to us every hour. As a result, we write a little cron job which logs the date and QOTD result every 15 minutes (to be safe) and decide to check back on it later.
Cron job:
1 |
0,15,30,45 * * * * (date;nc whale.hacking-lab.com 17 < /dev/null) >> /home/mo/hackvent/h3.txt |
After waiting a full day and checking back our log file looks like this:
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
Wed Dec 11 22:45:00 AEDT 2019 r Wed Dec 11 23:00:00 AEDT 2019 _ Wed Dec 11 23:15:00 AEDT 2019 _Wed Dec 11 23:30:01 AEDT 2019 _ Wed Dec 11 23:45:01 AEDT 2019 _ Thu Dec 12 00:00:01 AEDT 2019 D Thu Dec 12 00:15:01 AEDT 2019 D Thu Dec 12 00:30:01 AEDT 2019 D Thu Dec 12 00:45:02 AEDT 2019 D Thu Dec 12 01:00:01 AEDT 2019 A Thu Dec 12 01:15:01 AEDT 2019 A Thu Dec 12 01:30:01 AEDT 2019 A Thu Dec 12 01:45:01 AEDT 2019 A Thu Dec 12 02:00:01 AEDT 2019 I Thu Dec 12 02:15:01 AEDT 2019 I Thu Dec 12 02:30:01 AEDT 2019 I Thu Dec 12 02:45:01 AEDT 2019 I Thu Dec 12 03:00:01 AEDT 2019 L Thu Dec 12 03:15:01 AEDT 2019 L Thu Dec 12 03:30:01 AEDT 2019 L Thu Dec 12 03:45:01 AEDT 2019 L Thu Dec 12 04:00:01 AEDT 2019 Y Thu Dec 12 04:15:01 AEDT 2019 Y Thu Dec 12 04:30:01 AEDT 2019 Y Thu Dec 12 04:45:01 AEDT 2019 Y Thu Dec 12 05:00:02 AEDT 2019 _ Thu Dec 12 05:15:01 AEDT 2019 _ Thu Dec 12 05:30:02 AEDT 2019 _ Thu Dec 12 05:45:01 AEDT 2019 _ Thu Dec 12 06:00:01 AEDT 2019 f Thu Dec 12 06:15:01 AEDT 2019 f Thu Dec 12 06:30:01 AEDT 2019 f Thu Dec 12 06:45:01 AEDT 2019 f Thu Dec 12 07:00:01 AEDT 2019 l Thu Dec 12 07:15:01 AEDT 2019 l Thu Dec 12 07:30:01 AEDT 2019 l Thu Dec 12 07:45:01 AEDT 2019 l Thu Dec 12 08:00:01 AEDT 2019 4 Thu Dec 12 08:15:01 AEDT 2019 4 Thu Dec 12 08:30:01 AEDT 2019 4 Thu Dec 12 08:45:01 AEDT 2019 4 Thu Dec 12 09:00:01 AEDT 2019 g Thu Dec 12 09:15:01 AEDT 2019 g Thu Dec 12 09:30:01 AEDT 2019 g Thu Dec 12 09:45:01 AEDT 2019 g Thu Dec 12 10:00:01 AEDT 2019 } Thu Dec 12 10:15:01 AEDT 2019 } Thu Dec 12 10:30:01 AEDT 2019 } Thu Dec 12 10:45:01 AEDT 2019 } Thu Dec 12 11:00:01 AEDT 2019 H Thu Dec 12 11:15:01 AEDT 2019 H Thu Dec 12 11:30:01 AEDT 2019 H Thu Dec 12 11:45:01 AEDT 2019 H Thu Dec 12 12:00:01 AEDT 2019 V Thu Dec 12 12:15:01 AEDT 2019 V Thu Dec 12 12:30:01 AEDT 2019 V Thu Dec 12 12:45:01 AEDT 2019 V Thu Dec 12 13:00:01 AEDT 2019 1 Thu Dec 12 13:15:01 AEDT 2019 1 Thu Dec 12 13:30:01 AEDT 2019 1 Thu Dec 12 13:45:01 AEDT 2019 1 Thu Dec 12 14:00:01 AEDT 2019 9 Thu Dec 12 14:15:01 AEDT 2019 9 Thu Dec 12 14:30:01 AEDT 2019 9 Thu Dec 12 14:45:01 AEDT 2019 9 Thu Dec 12 15:00:01 AEDT 2019 { Thu Dec 12 15:15:01 AEDT 2019 { Thu Dec 12 15:30:01 AEDT 2019 { Thu Dec 12 15:45:01 AEDT 2019 { Thu Dec 12 16:00:01 AEDT 2019 a Thu Dec 12 16:15:01 AEDT 2019 a Thu Dec 12 16:30:01 AEDT 2019 a Thu Dec 12 16:45:01 AEDT 2019 a Thu Dec 12 17:00:01 AEDT 2019 n Thu Dec 12 17:15:01 AEDT 2019 n Thu Dec 12 17:30:02 AEDT 2019 n Thu Dec 12 17:45:01 AEDT 2019 n Thu Dec 12 18:00:01 AEDT 2019 0 Thu Dec 12 18:15:01 AEDT 2019 0 Thu Dec 12 18:30:01 AEDT 2019 0 Thu Dec 12 18:45:01 AEDT 2019 0 Thu Dec 12 19:00:02 AEDT 2019 t Thu Dec 12 19:15:01 AEDT 2019 t Thu Dec 12 19:30:01 AEDT 2019 t Thu Dec 12 19:45:01 AEDT 2019 t Thu Dec 12 20:00:01 AEDT 2019 h Thu Dec 12 20:15:01 AEDT 2019 h Thu Dec 12 20:30:02 AEDT 2019 h Thu Dec 12 20:45:01 AEDT 2019 h Thu Dec 12 21:00:01 AEDT 2019 e Thu Dec 12 21:15:01 AEDT 2019 e Thu Dec 12 21:30:01 AEDT 2019 e Thu Dec 12 21:45:01 AEDT 2019 e Thu Dec 12 22:00:01 AEDT 2019 r Thu Dec 12 22:15:01 AEDT 2019 r Thu Dec 12 22:30:02 AEDT 2019 r |
Putting all this together gives us our flag!
Flag: HV19{an0ther_DAILY_fl4g}