Jun 24, 2017 - TMCTF : OSINT 300

Author: dade

Publish Date: 2017-06-24

Category: IOT/OSINT/SCADA

Points: 300

Description:

Within the ICS enviroment there has been some odd behavior with one of the network switches. You have asked your Network Administrators to see if they could pull some traffic from their packet capture solution. They dug into the issue and couldn't make sense of whats going on but think that there may be an attacker that has figured out a backdoor into the system based off an SSH connection.

Figure out how the attacker was able to exploit the system, and utilize the backdoor to SSH into the system

To submit the flag, you'll have to wrap the backdoor into TMCTF{}

Download the file (https://s3-ap-northeast-1.amazonaws.com/trendmicro-ctf-2017/2VjxmQSdV3uBQvReFLea/files19.enc)
Decrypt the downloaded file by the following command.


> openssl enc -d -aes-256-cbc -k lnlzeirDTOWxKBdpBTsz -in files19.enc -out files19.zip
> unzip files19.zip

Investigation

Once we’ve got a pcap, I got started by exporting http objects in wireshark. One thing I noticed in the http streams is a file named exploit.tar.gz. Let’s look at that conversation and export the data as raw from wireshark.

Once we’ve extracted that, we can run tar zxvf exploit.tar.gz and one of the more interesting files that popped out was /etc/passwd

The obvious thing that stands out in /etc/passwd is this line:

TMCTF:MFzbJnLcqzlvo:0:0:Hold the backdoor:/home/admin:/bin/sh

Let’s take that password, which is probably crypt(), and run it through John the Ripper.

john --wordlist=/usr/share/wordlists/rockyou.txt ./etc/passwd
admin:wibble:101:101:Switch Administrator:/home/admin:/usr/local/bin/adminsh
cli:wibble:102:101:Switch Administrator CLI:/home/admin:/usr/local/bin/cfgcli
TMCTF:odagirih:0:0:Hold the backdoor:/home/admin:/bin/sh
sertest:NO PASSWORD:99:99:Factory Test:/:/usr/local/bin/loopsertest /dev/ttyS00

Hmm, let’s try TMCTF{odagirih}.

No luck with that, I wonder if the password was meant to be longer and it got truncated (DES uses a 56 bit key, where passwords are truncated to 8 characters and coerced into 7 bits each).

$ cat /usr/share/wordlists/rockyou.txt | grep odagirih
odagirihayato

Flag

TMCTF{odagirihayato}

Jun 24, 2017 - TMCTF : OSINT 200

Author: dade

Publish Date: 2017-06-24

Category: IOT/OSINT/SCADA

Points: 200

Description:

A customer suspects that his email account is being targeted to be hacked. He has asked you to investigate and trace his attacker's real name (flag).

During your talk, he mentioned a suspicious email that he received about a bank transfer from someone he doesn't know. He actually tried to investigate by himself and found out the email was crafted to hide the real sender. He was able to go as far as finding a related facebook account by adding "tmctf" to the name he found from the email and that was as far as he got. Unfortunately he deleted the email after this, thinking it was just a random phishing email. He provided you with pcap logs from his machine to start your investigation.

ZIP password : virus

Download the file (https://s3-ap-northeast-1.amazonaws.com/trendmicro-ctf-2017/Pi1T3ou0CquyBbYosgng/files18.enc)
Decrypt the downloaded file by the following command.
> openssl enc -d -aes-256-cbc -k PYJU8G1k0fNKwacSJghz -in files18.enc -out files18.zip -md md5
> unzip files18.zip

Investigation

Let’s start by issuing a unzip pcap_record.zip. Loading up the pcap in wireshark, you can filter for pop and look at mail.

Looking through the mail packets, we can see this tcp.stream eq 307 looks interesting. Let’s follow that. tcp.stream eq 307

We’re told that there’s a facebook page related, so let’s search for mario dboro tmctf on facebook.

From here we can see he belongs to tmctfcommunity, so let’s message that page and see what happens.

“Thanks for messaging us. You are half way in your challenge. In order to proceed, you need to find the magic string “854FJD922KA” in social media post. Goodluck!”

facebook message

I searched facebook for this string with no luck. So I took to twitter, my favorite social media network. I made the following google query: site:twitter.com "854FJD922KA", which yielded https://twitter.com/dboro18673.

There were many tweets that were possibly interesting here, and I’ll let you know that I certainly exhausted every single one of those links.

Tweets of Interest

“the account of Mr. Johnson is CVD12345”

This link (goo.gl/bO9wfS) takes us to https://pastebin.com/71KhaaMK

Contents of pastebin. Pastebin is posted by Johndeculayan. email address of interest: [email protected]

He links to this website http://texttt-01.super-schlank2013.org/

“a lot of people has voted for this man http://bit.ly/11eJDlt

List of possible names

I was keeping a running list of possible names that this person could be, as well as a note to remind me where that name came from.

Liz Fanning Holdorf (fake email name)
Mario Dboro (facebook name/email name)
Mikhailov Kosovo (twitter name)
Jon Rebutang (pastebin contents)
John Deculayan (pastebin username)
Mr. Johnson

After like 2 hours of banging my head against the keyboard, I realized that I hadn’t seen any linkedin yet tonight, and so I took to linkedin. LinkedIn

Now we have Jon Kravitsky Rebutang, let’s give that a shot as the flag.

Flag

TMCTF{Jon Kravitsky Rebutang}

Nov 20, 2016 - RC3 CTF : Music to my Ears

Author: dade

Publish Date: 2016-11-20

Category: Misc

Points: 400

Description:

Captain's Log:

Morale is low.
We were trying to jam to some sick tunes earlier today but it seems there was a lot of interference on our Sirius XM. We got our computer to record a part of it, if only we had an IT guy on this ship.

Download link:
https://drive.google.com/file/d/0B-dTcj6HTULxS01MTW9oOE1EdVE/view?usp=sharing

-- Your friendly neighborhood webadmin

Investigation

Looking at the beepboop file in audacity, a few stand out obviously. First is the waveform that is very big, and the others are the short bursts that are interlaced. Those ones are easy to check out, and they both tell us they are not the flag.

Luckily I’m a big fan of The Modern Rogue and happened to recognize the “whoa” track as Slow Scan Television (or SSTV) when I listened to it.

I’ll isolate the whoa channel in audacity, and set audacity to output to my virtual audio cable. Then, I’ll set my default input device to the same virtual audio cable. This will help minimize noise in the image. I decided to use RX-SSTV v2.0.0 to receive the transmission from the whoa track.

Once I click the receive button, I turn on audacity and let it play. I just let it play all the way through, but you might be able to speed it up to slow scan twice as fast. I don’t know. But nonetheless, the flag is in the image that was transmitted.

Flag

RC3-2016-BEAMMeUP