De-ICE has another challenge in its "vulnerable-by-design" series - even though the naming gets more confusing with every release! It's been a while since the last release, level 2-disk 1 (back in 2007). The students of "HackingDojo" were challenged to put together their own exploitable LiveCD, and it was released under the de-ice name. This is "version a", and should be not confused with "version B" (de-ice-1.120-1.0b.iso aka Level 1-Disk 3-Release 1-Version B), as these are NOT the same challenge - it's a different setup.
Watch video on-line:
Heorot.net release's (in date order):
De-ICE - Level 1 - Disk 1 (hxxp://forums.heorot.net/viewtopic.php?f=16&t=13)(de-ice.net-1.100-1.1.iso) De-ICE - Level 1 - Disk 2 (hxxp://forums.heorot.net/viewtopic.php?f=16&t=13)(de-ice.net-1.110-1.0.iso) De-ICE - Level 2 - Disk 1 (hxxp://forums.heorot.net/viewforum.php?f=18)(de-ice.net-2.100-1.1.iso) pWnOS (hxxp://forums.heorot.net/viewtopic.php?f=21&t=149)(pWnOS v1.0.zip) Hackerdemia (hxxp://forums.heorot.net/viewtopic.php?f=42&t=203)(hackerdemia-1.1.0.iso) De-ICE - Level 1 - Disk 3 - Version A (hxxp://forums.heorot.net/viewtopic.php?f=16&t=482)(de-ice-1.120-1.0a.iso) De-ICE - Level 1 - Disk 3 - Version B (hxxp://forums.heorot.net/viewtopic.php?f=16&t=482)(de-ice-1.120-1.0b.iso)
- Pre-setup (configured IP as the host has a static IP in 192.168.1.0/24 range)
- Scan network for the host (nmap)
- Port scanned host (unicornscan)
- Enumerated running services running open ports (nmap)
- Discovered a SQL Injection (Firefox)
- Dump all usernames & passwords to the database (sqlmap)
- Tested for any repeated logins with known usernames & working passwords (hydra)
- Escalated privilege by incorrectly configured settings (sudo)
de-ice-1.120-1.0a.iso- (MD5: E8FB66760ADDF85896DB3F78F278F7D2)
- Spare or a virtual machine - (Example: Virtual Box or VMware Player)
- nmap – (Can be found on BackTrack 5).
- unicornscan – (Can be found in BackTrack 5 repository).
- sqlmap – (Can be found on BackTrack 5).
- hydra – (Can be found on BackTrack 5).
A quick "ping" scan with nmap, shows which hosts are connected to the network. Once the target had been discovered a detailed port scan (TCP & UDP) was taken by using unicornscan. To check the results another detailed TCP port scan was done, though this time it was done using nmap. Unicornscan uses a lot less time to do a port scan compared to nmap (especially with UDP scanning). However, nmap has the advantage of being able to do more than just "port scanning" by "information gathering". The attacker uses the "-a" option, which allows for "OS detection", "version detection of services", "a collection of script scanning", and "traceroute details" as well as increasing the scan speed by "-T4". nmap also confirms TCP port 80 is open, which is the default port for a web server, as well as detecting basic information regarding the configuration of the server.
The attacker then interacts with the web server and is presented with a "Data Entry" site. There isn't any protection on the server, which allows for the attacker to add a new product into the system. Upon doing so, the attacker notices the URI of the current page, "products.php?id=1". By using the ID variable, the server selects the requested item. The attacker tries to inject their own code allowed with it.
The attacker uses sqlmap to speed up the injection process as it is designed to test multiple injection methods. sqlmap has pre-built commands which allows the attacker to find common sensitive information (such as; the running services and versions, current user and the database admin, user privileges as well as viewing every table along with the contents). The attacker chooses to capture all the users and their passwords to the database services. The passwords used in the database are encrypted, however, they use a well-known scheme which is easily cracked. The result of this, gives the attacker 50 working usernames as well as 49 known passwords too.
The attacker then checks to see if any of the users have reused their passwords (or if they have used someone else known password, any blank passwords or their usernames as the passwords), by brute forcing the SSH remote login. The result of this action, gives the attacker remote access to the system with 50 credentials.
On the list of credentials, the attacker notices a few usernames which they have seen before from previous pentests for the company. The attacker then logs into their accounts and views their personal folders. Upon accessing "ccoffee" account, there was a directory (scripts) located inside. In this folder, there was a file which was only accessible to the super user account, root. The attacker then checks to see if any privileges have been assigned to the user for this file-they have been. The attacker then backups the file and replaces it with their own file - which is a shell prompt.
The attacker highlights the fact that the full path has to be specified for sudo to allow access to the file. After this command has been executed, the attacker now has complete access to the system. The attacker collects a bit of information about the system (IP addresses, user hashes and accesses the personal folder for the root account).
As the attacker now has access to the complete system, they access every user folder at once and view random files at their choosing; a selection of them are sensitive to the company. (Note: I skipped the majority of them out for two reasons: 1.) It's boring watching me cat'ing them all and 2.) It allows you to view them for yourselves).
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
- De-ICE.net v1.2a has a static IP address of 192.168.1.120. Make sure you are on the same subnet as it!
- When booting De-ICE it will randomly assign the passwords to the usernames - so it's different each time!
- Each time you start De-ICE.net v1.2a it will generate fresh SSH keys - so it's different each time!
- I made a couple of mistakes in the video (For example: /devnull) - it's worth checking the commands subsection!
Video length: 07:40
Capture length: 29:31