<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator><link href="http://essentialexploit.com/feed.xml" rel="self" type="application/atom+xml" /><link href="http://essentialexploit.com/" rel="alternate" type="text/html" /><updated>2020-01-09T04:03:05+00:00</updated><id>http://essentialexploit.com/feed.xml</id><title type="html">RabbidByte</title><subtitle>RabbidByte's Random Bytes</subtitle><author><name>RabbidByte</name></author><entry><title type="html">The New Phish</title><link href="http://essentialexploit.com/TheNewPhish.html" rel="alternate" type="text/html" title="The New Phish" /><published>2019-06-06T07:00:00+00:00</published><updated>2019-06-06T07:00:00+00:00</updated><id>http://essentialexploit.com/TheNewPhish</id><content type="html" xml:base="http://essentialexploit.com/TheNewPhish.html">&lt;h2 id=&quot;microsoft-platform-for-phishing--microsoft&quot;&gt;Microsoft platform for Phishing … Microsoft&lt;/h2&gt;

&lt;p&gt;Scams and phishing are continually getting more creative, and today I came across one phishing attack that really kinda amazed me.  The attack uses a legitimate Microsoft login page that will POST credentials to a malicious server.  I have not seen anything like this in the past so I thought that it would definitely be worth looking into.&lt;/p&gt;

&lt;p&gt;The attack starts as most do … an email.  The subject line is “Unblock Messages for [email address]” and the email claims that the portal (labeled by the email’s domain) has blocked some emails and that the user must release them.  The phishing email is not very convincing as it starts with Dear [username] and finishes with Regards, [domain] among other red flags.  But the URL is where things get quite interesting.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/phish/phish-01.PNG&quot; alt=&quot;alt text&quot; title=&quot;phish-01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The initial hyperlink went to https://[redacted]/some/directory/redirect.aspx?url=https://[redacted].z6.web.core.windows.net/?username=anemailaddress  The attack initially uses an open redirect vulnerability on a website to push the user to a Microsoft login page.  This bypasses most if not all URL rewriting controls on emails and gets the user to the “payload” page.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/phish/phish-02.PNG&quot; alt=&quot;alt text&quot; title=&quot;phish-02&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/phish/phish-03.PNG&quot; alt=&quot;alt text&quot; title=&quot;phish-03&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The login page is crazy neat!  It is a real Microsoft login page with an additional gotcha.  During the login process it adds an extra POST that sends the entered username and password to the attacker’s server.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/phish/phish-04.PNG&quot; alt=&quot;alt text&quot; title=&quot;phish-04&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/phish/phish-05.PNG&quot; alt=&quot;alt text&quot; title=&quot;phish-05&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/phish/phish-06.PNG&quot; alt=&quot;alt text&quot; title=&quot;phish-06&quot; /&gt;&lt;/p&gt;</content><author><name>RabbidByte</name></author><summary type="html">Microsoft platform for Phishing … Microsoft</summary></entry><entry><title type="html">Offensive Security AWAE</title><link href="http://essentialexploit.com/AWAE.html" rel="alternate" type="text/html" title="Offensive Security AWAE" /><published>2019-05-05T07:00:00+00:00</published><updated>2019-05-05T07:00:00+00:00</updated><id>http://essentialexploit.com/AWAE</id><content type="html" xml:base="http://essentialexploit.com/AWAE.html">&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;A few months ago registration for BlackHat USA19 kicked off, and for the third year in a row I just missed getting into Offensive Security’s Advanced Web Attacks and Exploitation (AWAE) training.  This was frustrating as hell because I only know of it being offered once a year in North America.  The story doesn’t end there though.  A couple weeks after the disappointment I received an email from OffSec offering early access to OffSec Alumni to the online version of the AWAE training before it is publicly available!  Normally I would be shit outta luck because I don’t really have extra cash laying around for stuff like this but I do work for a kick ass employer who took care of the bill!  So it was game on.&lt;/p&gt;

&lt;p&gt;March 9th I received my training material and lab access.  I was not initially impressed as my last OffSec experience was the PWB training in 2013 and the AWAE lab was much smaller.  Don’t judge a book by it’s cover I guess cause the handful of machines in the lab gave me one hell of a good time.&lt;/p&gt;

&lt;p&gt;Layout is similar to the PWK (formally PWB) training.  You get a PDF textbook, a collection of videos, and access to the lab.  In the lab there is a control panel where you can revert your machines, you will need it cause ya pooch em hard sometimes.  The main difference with the AWAE was the inclusion of a WiKi in the lab and access to the applications, machines, and source code.  I was taken back a bit as I was expecting a blackbox approach to the training but it is completely the opposite.  This training is completely based around the idea of whitebox testing.&lt;/p&gt;

&lt;h2 id=&quot;content&quot;&gt;Content&lt;/h2&gt;

&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Completely necessary but dry.  Just like all housekeeping it has to be done and if ignored the student will not get the full experience from the course.  Just read it, pay attention, and take a couple notes of where things are.&lt;/p&gt;

&lt;h3 id=&quot;tools--methodologies&quot;&gt;Tools &amp;amp; Methodologies&lt;/h3&gt;
&lt;p&gt;After reading this I thought that the AWAE was going to be a waste of money.  Isn’t this supposed to be an advanced class?  Ugh, either way they go through BURP Suite, some basic Python with sockets, .NET decompilation, and Java decompilation.  Aside from the .NET stuff none of this was new to me but you go through it, and you may or may not learn something new.&lt;/p&gt;

&lt;h3 id=&quot;atmail-mail-server-appliance-from-xss-to-rce&quot;&gt;Atmail Mail Server Appliance: from XSS to RCE&lt;/h3&gt;
&lt;p&gt;Finally you get to some fun stuff here.  They ease you into the training starting with a basic XSS vulnerability.  Then you start to see what will be the trend in the rest of the material.  Just because you have a vulnerability that you can exploit, don’t stop until you can get RCE.  From the XSS vulnerability multiple examples were given on how to leverage this to further progress deeper into the system.  The best part here was creating a PoC that would chain multiple actions together to make a single XSS turn into RCE.&lt;/p&gt;

&lt;h3 id=&quot;atutor-authentication-bypass-and-rce&quot;&gt;ATutor Authentication Bypass and RCE&lt;/h3&gt;
&lt;p&gt;You can’t have a web attack class without SQLi … this was the first instance, at least it was blind.  The material goes on to touch on input sanitation bypass, data exfiltration, authentication bypass, file upload vulnerabilities, path traversal, and of course getting RCE.  The best part of this module was following the source and seeing why the application worked the way it did.  Oh and hand crafting the zip payload was just plain old fashioned fun!&lt;/p&gt;

&lt;h3 id=&quot;atutor-lms-type-juggling-vulnerability&quot;&gt;ATutor LMS Type Juggling Vulnerability&lt;/h3&gt;
&lt;p&gt;This is where it got a bit tough for me.  Type juggling was something that I have never done and after this training it has opened up a whole new realm of tests that I will be running.  Not only was the concept of type juggling introduced to me here but also the concept of magic hashes.  Very cool material in this module.&lt;/p&gt;

&lt;h3 id=&quot;manageengine-applications-manager-sqli-to-rce&quot;&gt;ManageEngine Applications Manager SQLi to RCE&lt;/h3&gt;
&lt;p&gt;I was not looking forward to having to work with Java applications, just because its unfamiliar to me, but here it was.  The content was exceptional though to help with understanding Java web applications.  From source recovery, tracking down how to call which servlets, great coverage of postgresql including user defined functions and large objects, input sanitation bypass, multiple ways to exploit the same vulnerability, and one hell of a challenging “Extra Mile”.&lt;/p&gt;

&lt;h3 id=&quot;bassmaster-nodejs-arbitrary-javascript-injection&quot;&gt;Bassmaster NodeJS Arbitrary JavaScript Injection&lt;/h3&gt;
&lt;p&gt;NodeJS … really?  I wanted to punch my LCD.  More Java and a bastardized version (according to a Java dev I know) at that.  Just more unfamiliar territory for me, but that is what learning is about.  This module went by pretty quick though as I am pretty familiar with RegEx and python.  Then at the end of the material there is a great “Extra Mile” that took me a very long time to finally crack through.  More on the extra mile things below.&lt;/p&gt;

&lt;h3 id=&quot;dotnetnuke-cookie-deserialization-rce&quot;&gt;DotNetNuke Cookie Deserialization RCE&lt;/h3&gt;
&lt;p&gt;Just as soon as I get through all the Java stuff I was uneasy with they through .NET at you.  This took me a few read through’s as I was not familiar with deserialization vulnerabilities, other than hearing about them.  Not to mention I don’t know as much as I should on how a .NET web application works.  This is where the value of the course really started coming out for me.  You spend a good portion of your time in Visual Studio with C# and understanding serialization, thank gawd as I really needed it.  Once you get a handle on serialization the concept of changing the type is introduced with vulnerable code.  Then in true OffSec style you build the payload by hand with really detailed explanations.  Then the extra mile …&lt;/p&gt;

&lt;h2 id=&quot;the-extra-mile&quot;&gt;The Extra Mile&lt;/h2&gt;

&lt;p&gt;Every concept introduced in the training is followed up with exercises that you complete.  Not much different than any other training.  They aren’t hard, the answers are pretty much given to you, and are there to re-enforce the concepts presented.  Then there are what are called “Extra Mile” challenges.  These varied from very “Mickey Mouse” to taking over a week to accomplish.  I will highlight the few that stick out in my mind.&lt;/p&gt;

&lt;h3 id=&quot;type-juggling&quot;&gt;Type juggling&lt;/h3&gt;
&lt;p&gt;This is the first instance in the training where the student is asked to find a vulnerability.  Simple hints of where to look are given but that is it.  As type juggling was new to me this challenge was interesting but far from a hard challenge.  What it did do for me was really drive home the concept of type juggling and improved my ability to follow through code looking for potential vulnerabilities.&lt;/p&gt;

&lt;h3 id=&quot;manageengine-jsp&quot;&gt;ManageEngine JSP&lt;/h3&gt;
&lt;p&gt;This challenge was definitely just that for me, a huge challenge.  I followed many red herrings trying to exploit the system using a JSP payload but time after time it just wouldn’t work.  I ended up finding some other students chatting about this and getting a hint from the conversation.  It then took me a couple days to finally pull the exploit together.  This was a great challenge making the student think of alternative ways of doing things and chaining multiple “steps” together to obtain full RCE.&lt;/p&gt;

&lt;h3 id=&quot;nodejs-jailbreak&quot;&gt;NodeJS Jailbreak&lt;/h3&gt;
&lt;p&gt;How could I forget this one.  It took me over a week to finally crack this bad boy.  Why, most people will ask.  Well let’s just say that even if you have a working exploit and it is coded perfectly the delivery of the payload makes all the difference.  I’m still kicking myself in the ass for this one.  Either way in the end it was really great and I came away with a pretty good understanding of “Context” in NodeJS and how to reach up through the process stack to get what you want.  I am sure that doesn’t make sense to anyone who hasn’t done this challenge.&lt;/p&gt;

&lt;h3 id=&quot;net-deserialization&quot;&gt;.NET Deserialization&lt;/h3&gt;
&lt;p&gt;I was running out of lab time.  I asked my family to give me the weekend to work on this challenge and the final remaining one.  I was able to get through it in just over 10 hours of straight pounding away.  Basically OffSec “introduced” a secondary .NET deserialization vulnerability into DNN.  Yeah that’s basically what you were told, go find it, and exploit it.  Hands down the hardest part for me was finding the vulnerability but detail-oriented people will find the same “clues” that were there to help you.  I’ll tell ya I was jumping around when I finally popped this shell.  What a great challenge!&lt;/p&gt;

&lt;h3 id=&quot;java-deserialization&quot;&gt;Java Deserialization&lt;/h3&gt;
&lt;p&gt;I have this one in here as it was the final challenge in the training and it had an interesting twist.  Although deserialization vulnerabilities were covered it was all done in .NET.  This challenge has you go back to ManageEngine and find the Java Deserialization vulnerability and exploit it.  This was crazy fun and now that the pressure was off of me to complete the training in time I spent hours making a fully automated PoC in python that was multithreaded and handled everything for the attacker.  This was just plain fun and a great way to end the training.&lt;/p&gt;

&lt;h2 id=&quot;where-offensive-security-got-it-right&quot;&gt;Where Offensive Security got it Right&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;The material is very in-depth, and I love how it walks you through the code step by step so you understand why web applications work the way they do.&lt;/li&gt;
  &lt;li&gt;Even though it made me uneasy the training wouldn’t have been the same without touching every different backend technology from PHP, JAVA, NodeJS, .NET, and various different database technologies.&lt;/li&gt;
  &lt;li&gt;The “Extra Mile” challenges make this true OffSec training and they make you “Try Harder”.  Once a student accomplishes these challenges they have a feeling of accomplishment and have went out and studied the technology/vulnerability on their own.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;where-offensive-security-got-it-wrong&quot;&gt;Where Offensive Security got it Wrong&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;I was in the Beta version of this training, so I am sure that the grammar in some of the extra mile challenges will be corrected.  There was confusion on what exactly some of the challenges were asking of the student.&lt;/li&gt;
  &lt;li&gt;At certain points of the training the student is forced to work on a windows machine in the lab through RDP.  These were slow most times I was on them and I can’t count the number of times I ran out of memory while debugging DNN.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;final-verdict&quot;&gt;Final Verdict&lt;/h2&gt;

&lt;p&gt;Offensive Security training has always been hands down HARD the absolute best security training I have ever received.  You don’t just read and do exercises.  You are forced to understand the concepts to complete the extra mile.  If any student says that the AWAE training is not worth while they are either 1. Way smarter than I am (it doesn’t take much) or 2. They did not attempt the extra mile.&lt;/p&gt;</content><author><name>RabbidByte</name></author><summary type="html">Summary</summary></entry><entry><title type="html">Hacker0x01 50m_ctf</title><link href="http://essentialexploit.com/Hacker0x01-50m_ctf.html" rel="alternate" type="text/html" title="Hacker0x01 50m_ctf" /><published>2019-03-27T07:00:00+00:00</published><updated>2019-03-27T07:00:00+00:00</updated><id>http://essentialexploit.com/Hacker0x01-50m_ctf</id><content type="html" xml:base="http://essentialexploit.com/Hacker0x01-50m_ctf.html">&lt;p&gt;&lt;br /&gt;
&lt;img src=&quot;/assets/images/50mCTF/main.png&quot; alt=&quot;alt text&quot; title=&quot;Main Image&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;So I have never done write-ups for CtF’s before but I am taking the information that I have and putting it all together in some posts.  This post and CtF posts before this date are going to be lacking as I never intended to write them up for a blog so don’t be suprised when they don’t meet your expectations.&lt;/p&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary:&lt;/h2&gt;

&lt;h3 id=&quot;discovery-of-the-application&quot;&gt;Discovery of the application:&lt;/h3&gt;
&lt;p&gt;The h1Thermostat application was discovered by extracting the bit.do URL from the image at &lt;a href=&quot;https://pbs.twimg.com/media/D0XoThpW0AE2r8S.png:large&quot;&gt;https://pbs.twimg.com/media/D0XoThpW0AE2r8S.png:large&lt;/a&gt;. The URL &lt;a href=&quot;https://bit.do/h1therm&quot;&gt;https://bit.do/h1therm&lt;/a&gt; then led to a Google Drive where the Android application file (h1thermostat.apk) could be downloaded &lt;a href=&quot;https://drive.google.com/file/d/1u5Mg1xKJMrW4DMGaWtBZ1TJKPdvqCWdJ/view&quot;&gt;https://drive.google.com/file/d/1u5Mg1xKJMrW4DMGaWtBZ1TJKPdvqCWdJ/view&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/50mCTF/png_steg.png&quot; alt=&quot;alt text&quot; title=&quot;Steg&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;disassembly-of-the-apk&quot;&gt;Disassembly of the APK&lt;/h3&gt;
&lt;p&gt;The file h1thermostat.apk was loaded into the Android SDK for analysis. The thermostat application requested a username and password to access the services. The APK code was extracted and it was found that the system would proceed past the login screen if the server responded with ”success”:true in a JSON object.&lt;/p&gt;

&lt;h3 id=&quot;use-of-defaultweak-administrative-credentials&quot;&gt;Use of default/weak administrative credentials:&lt;/h3&gt;
&lt;p&gt;The thermostat application was loaded into the Android SDK and executed. When the application started it requested a username and password to access the services. The application accepted the credentials:&lt;/p&gt;

&lt;p&gt;Username: admin&lt;/p&gt;

&lt;p&gt;Password: password&lt;/p&gt;

&lt;p&gt;Although some luck is involved in guessing this username and password combination it can easily be automated as there is no rate limiting or account lockout enabled on the application.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/50mCTF/weak_creds.png&quot; alt=&quot;alt text&quot; title=&quot;APK Login&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;sql-injection-vulnerability&quot;&gt;SQL Injection Vulnerability&lt;/h3&gt;
&lt;p&gt;Looking into the APK code further using jadx-gui the LoginActivity class calls the PayloadRequest class when a user signs in. The process takes the username and password and combines it with a command field in a JSON object. The login JSON object contains the username, password, and command field.&lt;/p&gt;
&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;err&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;“password”:”password”&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;“username”:”admin”&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;”cmd”:”getTemp”&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This text string is then encrypted with AES/CBC/PKCS5 and then ran through a base64 encoder. The server (35.243.186.41) then checks the credentials and replies with an encrypted JSON object&lt;/p&gt;
&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;err&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;“success”:&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;”temperature”:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;73&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It was found that the field “username” in the JSON object was vulnerable to an SQLi attack. A custom Java application was written that would create a JSON object with the desired fields filled in and parse the server’s response. The SQLi vulnerability was blind, meaning that inference was needed to determine what was happening on the server side. It was found that when the success field in the JSON object was true the SQL query completed successfully. When the query was incorrect and failed the sever responded with success as false and the error was “Unknown”. Finally, if the query completed successfully but it returned 0 rows, success would be false and the error that was returned is “Invalid username or password”.&lt;/p&gt;

&lt;p&gt;Using the different error messages returned by the server the SQLi vulnerability could be exploited to dump contents from the database. A custom &lt;a href=&quot;https://github.com/RabbidByte/h1heat&quot;&gt;Java application&lt;/a&gt; was written to pull the information out of the database using the following queries with the password of “password”:&lt;/p&gt;
&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;admin&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;' AND user() LIKE ‘%’;--
admin'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;database&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;LIKE&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;‘&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;’&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;--&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;admin&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;' AND (SELECT table_name FROM information_schema.tables WHERE table_schema=database() LIMIT 1 OFFSET 1&quot;) LIKE '&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;’&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;--&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;admin&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;' AND (SELECT column_name FROM information_schema.columns WHERE table_schema=database() AND table_name='&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;' LIMIT 1 OFFSET 1) LIKE '&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;’&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;--&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;admin&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;' AND (SELECT password FROM users LIMIT 1 OFFSET 0) LIKE '&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;’&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;--&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The Java application would cycle through every printable character until a right answer was found. Once the first character was found the next character would be attacked. This would continue until the end of the string.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/50mCTF/sqli.png&quot; alt=&quot;alt text&quot; title=&quot;SQLi&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;information-disclosure&quot;&gt;Information Disclosure:&lt;/h3&gt;
&lt;p&gt;The users table holds a single record. The id is 1, the username is admin, and the password is 5f4dcc3b5aa765d61d8327deb882cf99. It was found that the data stored in the password field is an md5 hash of the word “password”. If there were more accounts stored in the table these could easily be reversed using various methods.&lt;/p&gt;

&lt;p&gt;Once the devices table was dumped it was found that all IP addresses in the devices table were in reserved blocks and unrouteable. These addresses fell within the following ranges except for the record with the id 85.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;10.0.0.0–10.255.255.255&lt;/li&gt;
  &lt;li&gt;100.64.0.0–100.127.255.255&lt;/li&gt;
  &lt;li&gt;127.0.0.0–127.255.255.255&lt;/li&gt;
  &lt;li&gt;169.254.0.0–169.254.255.255&lt;/li&gt;
  &lt;li&gt;172.16.0.0–172.31.255.255&lt;/li&gt;
  &lt;li&gt;192.0.0.0–192.0.0.255&lt;/li&gt;
  &lt;li&gt;192.0.2.0–192.0.2.255&lt;/li&gt;
  &lt;li&gt;192.88.99.0–192.88.99.255&lt;/li&gt;
  &lt;li&gt;192.168.0.0–192.168.255.255&lt;/li&gt;
  &lt;li&gt;198.18.0.0–198.19.255.255&lt;/li&gt;
  &lt;li&gt;198.51.100.0–198.51.100.255&lt;/li&gt;
  &lt;li&gt;203.0.113.0–203.0.113.255&lt;/li&gt;
  &lt;li&gt;224.0.0.0–239.255.255.255&lt;/li&gt;
  &lt;li&gt;240.0.0.0–255.255.255.254&lt;/li&gt;
  &lt;li&gt;255.255.255.255&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The record with the id “85” in the devices table had an IP address of 104.196.12.98. This was the only accessible IP address in the table. When the address was visited with a web browser it displayed an administrative login page for “FliteThermostat”.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;shitty image from cellphone, sorry.&lt;/em&gt;
&lt;img src=&quot;/assets/images/50mCTF/login.jpg&quot; alt=&quot;alt text&quot; title=&quot;login&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;timing-attack&quot;&gt;Timing Attack:&lt;/h3&gt;

&lt;p&gt;The JavaScript used to send the username and password from the webpage to the server took the user inputted values and combined them with the hex characters ‘\x05\x00\x06’ between the two values. Once this string was created it was ran through a custom “hashing” function and sent off to the server for authentication.&lt;/p&gt;

&lt;p&gt;It was found through running a dictionary type attack that some responses from the server were much slower than others. This indicated that the hash could be cracked using a timing attack (and a helpful push in the right direction by 0xc0ffee).&lt;/p&gt;

&lt;p&gt;The hash was broken by brute forcing the string by two hexadecimal characters (1 byte) at a time and observing response times from the server. The longer response time that was received it was determined that the more likely the two characters were the next in the series of the string. The attack started with a series of 64 “0”’s and was brought down to the actual string using the response times from the server. After all 255 possible combinations were sent to the server the top 10 – 15 strings were replayed to eliminate false positives. When the string was found to replicate the same response time the process was started again on the next two characters.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/50mCTF/hash.png&quot; alt=&quot;alt text&quot; title=&quot;BURP&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The best results were found to be from a virtual machine replaying the POST with Burp although very slow. Settings were configured to only a single thread with 25 milliseconds for throttle. Once again this could be made more difficult by adding a rate limiting or account lockout control within the system.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;f9865a4952a4f5d74b43f3558fed6a0225c6877fba60a250bcbde753f5db13d8
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The hash was then sent to the server and the response gave a redirect and a Session ID. The session ID was added to a browser with the console command&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;javascript:void(document.cookie=-“SessionID=valuereturnedbyserver”);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and this enabled access to the web application showing the pages: control, main, update, and diagnostics.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;another shitty cellphone picture, sorry.&lt;/em&gt;
&lt;img src=&quot;/assets/images/50mCTF/loggedin.jpg&quot; alt=&quot;alt text&quot; title=&quot;logged in&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;thermostat-update-page&quot;&gt;Thermostat Update Page:&lt;/h3&gt;

&lt;p&gt;The thermostat page was intended to download and install updates for the application. It was found that the port where the server was sending requests to could be changed by sending the parameter PORT=[port#] in the URL. After a portscan of 65,535 ports on the system and multiple other attempts I ran out of time here.&lt;/p&gt;

&lt;p&gt;This CtF was amazing and I would like to thank everyone who helped build it! I learnt so much in this experience including probably the most important lesson of not jumping on the first vulnerability and thinking it is the end. This will help me in future CtF’s and more importantly in bounty hunting.&lt;/p&gt;

&lt;h2 id=&quot;the-ctf-source&quot;&gt;The CtF Source&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/Hacker0x01/FliteCTF&quot;&gt;https://github.com/Hacker0x01/FliteCTF&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;better-write-ups-than-mine&quot;&gt;Better Write-Ups than mine&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/manoelt/50M_CTF_Writeup&quot;&gt;https://github.com/manoelt/50M_CTF_Writeup&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://ajxchapman.github.io/security/2019/03/26/h1-702-ctf-2019.html&quot;&gt;https://ajxchapman.github.io/security/2019/03/26/h1-702-ctf-2019.html&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://abdilahrf.github.io/hackerone/h1-702/writeup-hackerone-50m-ctf-h1-702&quot;&gt;https://abdilahrf.github.io/hackerone/h1-702/writeup-hackerone-50m-ctf-h1-702&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://0xc0ffee.io/blog/50M-CTF&quot;&gt;http://0xc0ffee.io/blog/50M-CTF&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>RabbidByte</name></author><summary type="html"></summary></entry><entry><title type="html">KringleCon 2018</title><link href="http://essentialexploit.com/KringleCon-2018.html" rel="alternate" type="text/html" title="KringleCon 2018" /><published>2019-01-04T07:00:00+00:00</published><updated>2019-01-04T07:00:00+00:00</updated><id>http://essentialexploit.com/KringleCon-2018</id><content type="html" xml:base="http://essentialexploit.com/KringleCon-2018.html">&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;SANS puts on KringleCon and I have to say not only was it fun but some of it really made me think.  I made it to the end of this one but yet once again … I am writing this way, way after it has been completed so the content is going to lack.  Sorry in advance.&lt;/p&gt;

&lt;p&gt;So some of the “challenges” that were in KringleCon were trivial and I never took notes thinking that I was never going to write about it.  So looking through what I do have saved I will just give some quick summaries on what I have.&lt;/p&gt;

&lt;p&gt;Nope.  I just looked at the files again, and there is going to be no way I can put this one back together.  So I will give a list of the challenges that I recorded and some images.  This write up should go down in history as the worst, oh well.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Bloodhound&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/Bloodhound.PNG&quot; alt=&quot;alt text&quot; title=&quot;Bloodhound&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Dev Ops Fail&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/devops.PNG&quot; alt=&quot;alt text&quot; title=&quot;Dev Ops Fail&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Elf InfoSec&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/ElfInfoSec.PNG&quot; alt=&quot;alt text&quot; title=&quot;Elf InfoSec&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Encrypted Zip&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/encryptedzip.PNG&quot; alt=&quot;alt text&quot; title=&quot;Encrypted Zip&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Google Vent&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/google.PNG&quot; alt=&quot;alt text&quot; title=&quot;Google Vent&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;LethalForensicELFication&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/LethalForensicELFication.PNG&quot; alt=&quot;alt text&quot; title=&quot;Forensic ELF&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Packalyzer – I got nothing but I remember that this drove me crazy … I do have a very cryptic txt file … perhaps this is the lesson to take better notes?&lt;/li&gt;
  &lt;li&gt;Piano&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/piano-done.PNG&quot; alt=&quot;alt text&quot; title=&quot;Piano&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Python Jail&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/python.PNG&quot; alt=&quot;alt text&quot; title=&quot;Python Jail&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Scan-o-matic&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/Scan-o-matic_error.PNG&quot; alt=&quot;alt text&quot; title=&quot;Scan-o-matic&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Sleighbell&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/Sleighbell-win.PNG&quot; alt=&quot;alt text&quot; title=&quot;Sleighbell&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Snort&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/snort-solved.PNG&quot; alt=&quot;alt text&quot; title=&quot;Snort&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Stall Mucking&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/StallMucking.PNG&quot; alt=&quot;alt text&quot; title=&quot;Stall Mucking&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Vi – REALLY … WTF?!&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/vi.PNG&quot; alt=&quot;alt text&quot; title=&quot;vi&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Webcall&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/webcall2.PNG&quot; alt=&quot;alt text&quot; title=&quot;Web Call&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;YuleLog&lt;br /&gt;&lt;img src=&quot;/assets/images/kringlecon18/YuleLog.PNG&quot; alt=&quot;alt text&quot; title=&quot;Yule Log&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;results&quot;&gt;Results&lt;/h2&gt;

&lt;p&gt;Basically I finished … that’s it.  Plus one really painfull writeup, sorry.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/kringlecon18/done.PNG&quot; alt=&quot;alt text&quot; title=&quot;Finish&quot; /&gt;&lt;/p&gt;</content><author><name>RabbidByte</name></author><summary type="html">Summary</summary></entry><entry><title type="html">Metasploit/Rapid7 CtF: 2018</title><link href="http://essentialexploit.com/Metasploit-Rapid7-ctf-2018.html" rel="alternate" type="text/html" title="Metasploit/Rapid7 CtF: 2018" /><published>2018-12-05T07:00:00+00:00</published><updated>2018-12-05T07:00:00+00:00</updated><id>http://essentialexploit.com/Metasploit-Rapid7-ctf-2018</id><content type="html" xml:base="http://essentialexploit.com/Metasploit-Rapid7-ctf-2018.html">&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;This was the first CtF that I participated in that I actually kept files for.  This was don back in late 2018 and here I am almost 4 months later trying to write about it … yeah this will not be pretty.  Either way Metasploit / Rapid7 put on this CtF that you had to register for and basically were let loose trying to find images of playing cards.  Once you found a card the MD5 hash of the image was the flag.  Simple right?  Well I did not have nearly enough time to dedicate to this one.  I spent a whopping 3 days, which were not full days, trying to finish this and didn’t get far at all.  So let me just quickly describe what I did end up finding and my results.&lt;/p&gt;

&lt;h2 id=&quot;3-of-clubs&quot;&gt;3 of Clubs&lt;/h2&gt;

&lt;p&gt;This one was a “give me”.  Basically, all you had to do was read the rules of entry on the website.  This being my first CtF I read them just to make sure I knew what I was actually supposed to be doing.  At the end of the rules you found the following:&lt;/p&gt;

&lt;p&gt;Thanks for actually reading our terms of service.  As a show of our gratitude, please find your splendiferous reward by pointing a web browser to your Linux host on port 31063.&lt;/p&gt;

&lt;p&gt;Yeah it was that easy … that’s the 3 of Clubs.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/msf-2018/3_of_clubs.png&quot; alt=&quot;alt text&quot; title=&quot;3 of Clubs&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;3-of-diamonds&quot;&gt;3 of Diamonds&lt;/h2&gt;

&lt;p&gt;What would a CtF be without at least one SQLi vuln right?  Well this was one I found.  It was pretty easy to be honest.  Just sqlmap it and the key was sitting in the table.  Enter the key into the website and you got your flag … at least I think.  Either way that’s how I remember it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/msf-2018/3_of_diamonds.png&quot; alt=&quot;alt text&quot; title=&quot;3 of Diamonds&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;10-of-hearts&quot;&gt;10 of Hearts&lt;/h2&gt;

&lt;p&gt;This flag was found by first port scanning the Linux machine.  On TCP:8080 there was a running Apache Struts instance.  A little poking and prodding (remember I am writing this like 4 months later) we find that it is Struts 2.3.  Well Metasploit has an exploit for that … go figure right, who made this CtF?&lt;/p&gt;

&lt;p&gt;Using exploit/multi/http/struts2_code_exec_showcase you were able to pop a shell with a reverse bash payload.  Once you were in the system it was time to hunt for the flag.  Eventually I found the flag under /usr/local/tomcat/tmp.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/msf-2018/10_of_hearts.png&quot; alt=&quot;alt text&quot; title=&quot;10 of Hearts&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;my-ranking&quot;&gt;My Ranking&lt;/h2&gt;

&lt;p&gt;Pretty lame but expected for the amount of time I put into it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/msf-2018/results01.PNG&quot; alt=&quot;alt text&quot; title=&quot;Results&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;/assets/images/msf-2018/results02.PNG&quot; alt=&quot;alt text&quot; title=&quot;Results&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;/assets/images/msf-2018/results03.PNG&quot; alt=&quot;alt text&quot; title=&quot;Results&quot; /&gt;&lt;br /&gt;&lt;/p&gt;</content><author><name>RabbidByte</name></author><summary type="html">Summary</summary></entry><entry><title type="html">Hacker 101: CtF Series</title><link href="http://essentialexploit.com/hacker-101.html" rel="alternate" type="text/html" title="Hacker 101: CtF Series" /><published>2018-11-01T07:00:00+00:00</published><updated>2018-11-01T07:00:00+00:00</updated><id>http://essentialexploit.com/hacker-101</id><content type="html" xml:base="http://essentialexploit.com/hacker-101.html">&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;Hacker0x01 has a great &lt;a href=&quot;https://ctf.hacker101.com/ctf&quot;&gt;CtF series&lt;/a&gt; that is just perfect for practicing.  Although it would not be fair to release findings as there are h1 private invites being awarded for the completion of the challenges, I did think that it would be fine to make a public listing of my progress.  Below is a list of the CtF’s and my status.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;A little something to get you started&lt;br /&gt;   Difficulty: Trivial&lt;br /&gt;   Flags:&lt;b&gt; 1/1&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Micro-CMS v1&lt;br /&gt;   Difficulty: Easy&lt;br /&gt;   Flags: &lt;b&gt;4/4&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Micro-CMS v2&lt;br /&gt;   Difficulty: Moderate&lt;br /&gt;   Flags: &lt;b&gt;3/3&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Encrypted Pastebin&lt;br /&gt;   Difficulty: Hard&lt;br /&gt;   Flags: 4/4&lt;/li&gt;
  &lt;li&gt;Photo Gallery&lt;br /&gt;   Difficulty: Moderate&lt;br /&gt;   Flags: &lt;b&gt;3/3&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Cody’s First Blog&lt;br /&gt;   Difficulty: Moderate&lt;br /&gt;   Flags: &lt;b&gt;3/3&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Postbook&lt;br /&gt;   Difficulty: Easy&lt;br /&gt;   Flags: &lt;b&gt;7/7&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Ticketastic: Demo Instance&lt;br /&gt;   Difficulty: Moderate&lt;br /&gt;   Flags: &lt;b&gt;0/0&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Ticketastic: Live Instance&lt;br /&gt;   Difficulty: Moderate&lt;br /&gt;   Flags: &lt;b&gt;2/2&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Petshop Pro&lt;br /&gt;   Difficulty: Easy&lt;br /&gt;   Flags:&lt;b&gt; 3/3&lt;/b&gt;&lt;/li&gt;
  &lt;li&gt;Model E1337 - Rolling Code Lock&lt;br /&gt;   Difficulty: Hard&lt;br /&gt;   Flags: 0/2&lt;/li&gt;
  &lt;li&gt;TempImage&lt;br /&gt;   Difficulty: Moderate&lt;br /&gt;   Flags: 2/2&lt;/li&gt;
  &lt;li&gt;H1 Thermostat&lt;br /&gt;   Difficulty: Easy&lt;br /&gt;   Flags: 2/2&lt;/li&gt;
  &lt;li&gt;Model E1337 v2 - Hardened Rolling Code Lock: Expert&lt;br /&gt;   Flags: 0/1&lt;/li&gt;
  &lt;li&gt;Intentional Exercise: Moderate&lt;br /&gt;   Flags: 1/1&lt;/li&gt;
  &lt;li&gt;Hellow World!: Moderate&lt;br /&gt;   Flags: 1/1&lt;/li&gt;
  &lt;li&gt;Rend Asunder: Expert&lt;br /&gt;   Flags: 0/3&lt;/li&gt;
  &lt;li&gt;BugDB v1: Easy&lt;br /&gt;   Flags: 1/1&lt;/li&gt;
  &lt;li&gt;BugDB v2: Easy&lt;br /&gt;   Flags: 1/1&lt;/li&gt;
  &lt;li&gt;BugDB v3: Moderate&lt;br /&gt;   Flags: 1/1&lt;/li&gt;
&lt;/ol&gt;</content><author><name>RabbidByte</name></author><summary type="html">Summary</summary></entry><entry><title type="html">AWS S3: Misconfiguration, Discovery, and Abuse</title><link href="http://essentialexploit.com/AWS-S3-Misconfiguration-Discovery-and-Abuse.html" rel="alternate" type="text/html" title="AWS S3: Misconfiguration, Discovery, and Abuse" /><published>2017-06-20T07:00:00+00:00</published><updated>2017-06-20T07:00:00+00:00</updated><id>http://essentialexploit.com/AWS-S3-Misconfiguration-Discovery-and-Abuse</id><content type="html" xml:base="http://essentialexploit.com/AWS-S3-Misconfiguration-Discovery-and-Abuse.html">&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;Recent news of the Verizon data leak &lt;a href=&quot;http://www.darkreading.com/cloud/verizon-suffers-cloud-data-leak-exposing-data-on-millions-of-customers/&quot;&gt;http://www.darkreading.com/cloud/verizon-suffers-cloud-data-leak-exposing-data-on-millions-of-customers/&lt;/a&gt; and a similar scenario concerning Dow Jones &lt;a href=&quot;http://www.darkreading.com/cloud/dow-jones-data-leak-results-from-amazon-aws-configuration-error/&quot;&gt;http://www.darkreading.com/cloud/dow-jones-data-leak-results-from-amazon-aws-configuration-error/&lt;/a&gt; prompted me to do a little “poking around”. The basic misconfiguration in these cases was that the administrators of the AWS S3 buckets permitted read access to “Everyone” from anywhere. So really all someone had to do was find the S3 bucket and take whatever they wanted. The interesting thing is that AWS has changed the ACL configuration on S3 buckets pretty much right after the news of Dow Jones hit the main stream media.&lt;/p&gt;

&lt;p&gt;I started to think a little bit about this situation. If administrators make the mistake to leave sensitive information out on S3 buckets with anonymous read access could they make bigger mistakes? What if an administrator left an S3 bucket open with anonymous read/write access? All that someone would need to do is find the bucket, see if they could write to that bucket, figure out what it is used for, and then manipulate content for fun/profit.&lt;/p&gt;

&lt;p&gt;FYI – I will not post my code for bots/spiders&lt;/p&gt;

&lt;h2 id=&quot;find-s3-buckets-one-way-out-of-many&quot;&gt;Find S3 Buckets (one way out of many)&lt;/h2&gt;

&lt;p&gt;Going through the net finding S3 buckets and testing them is painfully tedious if done manually and you would probably never find anything of use. You have to automate this process and the way I would go about doing this would be by creating a Spider.&lt;/p&gt;

&lt;p&gt;Create a simple spider that wonders through the web looking at the source code of webpages that have the following ‘src=’ tags.
*.s3.amazonaws.com
*.s3-[aws regions].amazonaws.com&lt;/p&gt;

&lt;p&gt;Once the spider finds these URLs in the SRC tags have it dump the value, along with the page’s URL to a log file after checking for duplicate entries. That’s it … you found an S3 bucket … whoopee, note sarcasm&lt;/p&gt;

&lt;p&gt;If you need help building a bot or spider pick up a book and learn. I recommend this one &lt;a href=&quot;https://www.amazon.com/Webbots-Spiders-Screen-Scrapers-Developing/dp/1593273975/&quot;&gt;https://www.amazon.com/Webbots-Spiders-Screen-Scrapers-Developing/dp/1593273975/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will use CNN.com as an example. I found on the main page the S3 bucket http://s3.amazonaws.com/cnn-sponsored-content&lt;/p&gt;

&lt;h2 id=&quot;check-for-write-permissions-2-different-ways&quot;&gt;Check for Write Permissions (2 different ways)&lt;/h2&gt;

&lt;h3 id=&quot;get-the-acl&quot;&gt;Get the ACL&lt;/h3&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl [s3 bucket url]/?acl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Probably the easiest and most detailed way to see if you can get anonymous write access is by reading the ACL. This has its drawbacks though as administrators could misconfigure the ACL for the bucket objects and have no access to read or write the ACL. In this case the bot would show that access is denied.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/aws2017/s3-00.png&quot; alt=&quot;alt text&quot; title=&quot;s3-00&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The example from CNN.com gives us the ACL because “Everyone” has access to read the ACL (READ_ACP). You can see this listed at the bottom of the server’s response.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/aws2017/s3-01.png&quot; alt=&quot;alt text&quot; title=&quot;s3-01&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;URI&amp;gt;http://acs.amazonaws.com/groups/global/AllUsers&amp;lt;/URI&amp;gt;&amp;lt;/Grantee&amp;gt;&amp;lt;Permission&amp;gt; WRITE&amp;lt;/Permission&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Again we don’t want to have to go through all of this manually … you got a puter … use it. Write a simple script to monitor the log file for new entries. When a new S3 bucket URL is written to the log file the script just needs to request the ACL and check for write access. This can all be done with a combination of (you don’t need them all really) curl, grep, awk, and xmllint. Don’t know how to do it? Try google, I really do not want to provide all information for someone to launch a potentially malicious bot/spider.&lt;/p&gt;

&lt;h3 id=&quot;just-try-to-write-to-the-bucket&quot;&gt;Just Try to Write to the Bucket&lt;/h3&gt;

&lt;p&gt;Another way to test to see if you have write access to an S3 bucket is just to write to it. Create a simple txt file with a couple characters in it. Then use curl to upload it to the S3 bucket. If the connection ENDS with an HTTP/1.1 100 Continue then you have write access to the bucket.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/aws2017/s3-02.png&quot; alt=&quot;alt text&quot; title=&quot;s3-02&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl -v -H acl=public-read -H key=test.txt -T test.txt http://s3.amazonaws.com/cnn-sponsored-content
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/aws2017/s3-03.png&quot; alt=&quot;alt text&quot; title=&quot;s3-03&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;abuse-what-does-the-bucket-contain&quot;&gt;Abuse: What Does the Bucket Contain&lt;/h3&gt;

&lt;p&gt;This is where it gets a tad fun. So lets say that CNN had all their videos for their website hosted in an S3 bucket called cnn_video and we successfully wrote to http://s3.amazonaws.com/cnn_video Well if you have write access in S3 you also have delete access (at least it seems that way in my testing).&lt;/p&gt;

&lt;p&gt;So if the video http://s3.amazonaws.com/cnn_video/main.mp4 was linked in www.cnn.com/index.htm then all an attacker would have to do is use the AWS REST API to delete (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html) the video in the bucket and replace it with whatever other video they wanted (just named the same). The attacker now has their video posted on CNN … hypothetically of course.&lt;/p&gt;

&lt;h3 id=&quot;note&quot;&gt;Note:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;All CNN links with the exception of the one S3 bucket are fictional&lt;br /&gt;&lt;/li&gt;
  &lt;li&gt;Yes, this was written quickly&lt;br /&gt;&lt;/li&gt;
  &lt;li&gt;Yes, this is incomplete&lt;br /&gt;&lt;/li&gt;
  &lt;li&gt;No, I will not give you the code for my spider&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>RabbidByte</name></author><summary type="html">Summary</summary></entry><entry><title type="html">HackRF: The easy way</title><link href="http://essentialexploit.com/HackRF-The-easy-way.html" rel="alternate" type="text/html" title="HackRF: The easy way" /><published>2016-04-01T07:00:00+00:00</published><updated>2016-04-01T07:00:00+00:00</updated><id>http://essentialexploit.com/HackRF-The-easy-way</id><content type="html" xml:base="http://essentialexploit.com/HackRF-The-easy-way.html">&lt;p&gt;&lt;br /&gt;
&lt;img src=&quot;/assets/images/HRF/HRF-768x280.jpg&quot; alt=&quot;alt text&quot; title=&quot;HackRF Title&quot; /&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-story&quot;&gt;The Story&lt;/h2&gt;
&lt;p&gt;Recently many different radio hacks (mousejack, drone hijacking) have hit the internet. This has spurred my interest in analogoue and digital radio. After some bindge shopping on the internet and a few days wait I have had some very nice toys show up. Once the new electronics smell and novelty of a new toy had worn off the frustration kicked in.&lt;/p&gt;

&lt;p&gt;RTL-SDR is a dirt cheap way to start playing with radio using the RTL2832U chipset. I like to do things right when I start a project so I decided to purchase a nice SDR hardware transciever that would provide all the functionality needed without breaking the bank. Enter the HackRF One from &lt;a href=&quot;https://greatscottgadgets.com/hackrf/&quot;&gt;Great Scott Gadgets&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now wanting to get up and running with this device ASAP I followed the recommendation from Michael Ossmann &lt;a href=&quot;https://greatscottgadgets.com/sdr/1/&quot;&gt;https://greatscottgadgets.com/sdr/1/&lt;/a&gt; and downloaded Pentoo Linux. This distro with the disposable laptop that I had dedicated to radio caused ALL my frustration. First off new inexpensive laptops now all come with Windows 10 … I like to keep that around for convenience. So I shrunk the partition and started the install of Pentoo. Now this HP laptop has the WORST BIOS I have ever come across. The ability to enable legacy booting is there but it lacks the option to set priority between UEFI and Legacy. Solution: Troubleshooting reboot to UEFI device from Windows EVERY TIME, then crash the boot process with USB drive, then the BIOS will let you select an OS from the MBR … so bloody painful!&lt;/p&gt;

&lt;p&gt;Finally I am logged into Pentoo … no network … and video keeps crapping out. I felt like I was working on a linux system back in 1999 hunting for drivers. Let’s make this part of the story short shall we? After about 5 hours of messing with this crap Gentoo distro and not being able to get openGL running right I almost chucked the laptop across the room. Why spend all this time trying to make a piece of junk like Gentoo working when the time could be spent building a proper box with support for HackRF?&lt;/p&gt;

&lt;p&gt;ENTER Fedora 23, yes I would much rather run RedHat however I am too cheap to pay for a subscription. I could not believe how streamlined it is to get HackRF going in Fedora so I decided to write this to save others time and pain with a crappy ass Gentoo distro. Oh and did I mention that Fedora 23 has UEFI support? Makes everything so much nicer.&lt;/p&gt;

&lt;p&gt;This is not the officially recommended way to install gnuradio. I encountered issues with PyBOMBS and version numbers. This supposedly was fixed &lt;a href=&quot;https://github.com/gnuradio/pybombs/pull/246&quot;&gt;https://github.com/gnuradio/pybombs/pull/246&lt;/a&gt; although it didn’t work for me. I decided to go with dnf and see what I could do with the repositories and was pleasantly surprised.&lt;/p&gt;

&lt;p&gt;My recommendations for HackRF One:
..* DON’T use Pentoo
..* Screen shots and build done on a VM, don’t do this. Load onto your hardware so that you can take advantage of the high USB speeds of the HackRF One
..* Install gqrx with Fedora. Not needed but very useful.&lt;/p&gt;

&lt;h2 id=&quot;build&quot;&gt;BUILD&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Perform a normal installation of Fedora 23 Workstation&lt;/li&gt;
  &lt;li&gt;Open the CLI and run the following:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo dnf update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;/assets/images/HRF/hrf-01.png&quot; alt=&quot;alt text&quot; title=&quot;hrf-01&quot; /&gt;&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo dnf install kernel-devel-4.2.3-300.fc23.x86_64
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;(Most likely not needed but I had to install to compile the VM additions)
&lt;img src=&quot;/assets/images/HRF/hrf-03.png&quot; alt=&quot;alt text&quot; title=&quot;hrf-03&quot; /&gt;&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo dnf install gnuradio
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;/assets/images/HRF/hrf-04.png&quot; alt=&quot;alt text&quot; title=&quot;hrf-04&quot; /&gt;&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo dnf install gr-osmosdr
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;/assets/images/HRF/hrf-05.png&quot; alt=&quot;alt text&quot; title=&quot;hrf-05&quot; /&gt;&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo dnf install gqrx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;/assets/images/HRF/hrf-06.png&quot; alt=&quot;alt text&quot; title=&quot;hrf-06&quot; /&gt;&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hackrf_info
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;(Used to check if all is good)&lt;br /&gt;
&lt;img src=&quot;/assets/images/HRF/hrf-07.png&quot; alt=&quot;alt text&quot; title=&quot;hrf-07&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;You are done … yup that’s it. Way easier than Pentoo.
&lt;img src=&quot;/assets/images/HRF/hrf-08.png&quot; alt=&quot;alt text&quot; title=&quot;hrf-08&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;additional-reading&quot;&gt;Additional Reading&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/The-Hobbyists-Guide-RTL-SDR-Software-ebook/dp/B00KCDF1QI&quot;&gt;The Hobbyist’s Guide to the RTL-SDR: Really Cheap Software Defined Radio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.arrl.org/files/file/Technology/tis/info/pdf/020708qex013.pdf&quot;&gt;A Software-Defined Radio for the Masses, Part 1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.eas.uccs.edu/~mwickert/ece4670/lecture_notes/Lab6.pdf&quot;&gt;ECE 4670 Spring 2014 Lab 6 Software Defined Radio and the RTL-SDR USB Dongle&lt;/a&gt;&lt;/p&gt;</content><author><name>RabbidByte</name></author><summary type="html">The Story Recently many different radio hacks (mousejack, drone hijacking) have hit the internet. This has spurred my interest in analogoue and digital radio. After some bindge shopping on the internet and a few days wait I have had some very nice toys show up. Once the new electronics smell and novelty of a new toy had worn off the frustration kicked in.</summary></entry><entry><title type="html">Transfer Any Binary into a Protected Network</title><link href="http://essentialexploit.com/Transfer-Any-Binary-into-a-Protected-Network.html" rel="alternate" type="text/html" title="Transfer Any Binary into a Protected Network" /><published>2013-06-24T07:00:00+00:00</published><updated>2013-06-24T07:00:00+00:00</updated><id>http://essentialexploit.com/Transfer-Any-Binary-into-a-Protected-Network</id><content type="html" xml:base="http://essentialexploit.com/Transfer-Any-Binary-into-a-Protected-Network.html">&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;Well this is another old trick that still works today.  It still gets past all edge security and antivirus … well that is until you pull the executable out again.  I find myself using this trick when I need to bring penetration testing tools into a network.  Most of the time antivirus or edge security devices will stop the transfer of these executables.  So what can you do to get them in?&lt;/p&gt;

&lt;p&gt;The first is very obvious, just zip them up and encrypt them.  This will get the package into some networks but not all.  Many networks now configure edge devices and email security systems to block and/or alert on encrypted attachments.  This would probably blow your cover and game over.&lt;/p&gt;

&lt;p&gt;Another way to get executables into networks is by using a system called &lt;a href=&quot;https://github.com/RabbidByte/TransHex&quot; title=&quot;TransHex Download&quot;&gt;TransHex&lt;/a&gt; written while I was running essentialexploit.com.  As of now this has not been released but it will be very soon (&lt;em&gt;update&lt;/em&gt; TransHex is now released).  This application requires a web server on the internet that dynamically converts binary to hex and then gives you a text file that you can download.  Once you have the text file the TransHex client will put that back into a binary for you.&lt;/p&gt;

&lt;p&gt;The simplest way to get an executable into a network is to email it or just download it.  However as we mentioned earlier most edge devices will stop the download and alert the admins.  Not something that you want to have happen, however with a little prep you can hide any binary into another file and just bring it on into a network.  Here is how it works.&lt;/p&gt;

&lt;h2 id=&quot;how-to-do-it&quot;&gt;How To Do It&lt;/h2&gt;

&lt;p&gt;You must know beforehand which executibles you want send.  This is the downside.  If you forget about a program that you need you will have to have access to the outside system again to send it.  Sometimes this could delay your penetration testing by quite a few hours, and sometimes it is not a problem at all.  So here’s what you do.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;On an external windows system take a harmless picture file and your executable and drop them in the same folder so that it’s easy to work with them&lt;/li&gt;
  &lt;li&gt;Compress your executable (no encryption needed) into a zip file&lt;/li&gt;
  &lt;li&gt;Open up a windows command prompt&lt;/li&gt;
  &lt;li&gt;Navigate into the folder where your files are located&lt;/li&gt;
  &lt;li&gt;Run – copy /B [image file] + [zip file] [new image file]&lt;/li&gt;
  &lt;li&gt;Now there is a new file in your folder that looks exactly like your original image&lt;/li&gt;
  &lt;li&gt;This new file is the image file with the zip in binary appended to the end of the file&lt;/li&gt;
  &lt;li&gt;Now send this file into the protected network either by email, http … whatever&lt;/li&gt;
  &lt;li&gt;On the internal windows system open up 7zip&lt;/li&gt;
  &lt;li&gt;Under “File” select “open” and find your image file&lt;/li&gt;
  &lt;li&gt;Once 7zip opens the image … you see your package!  Extract it and away you go, but beware of local antivirus because once the exe is extracted it will most likely be scanned.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;images-from-testing&quot;&gt;Images From Testing&lt;/h2&gt;
&lt;p&gt;The command&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/transhex/command.png&quot; alt=&quot;alt text&quot; title=&quot;The Command&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The files&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/transhex/file_listing.png&quot; alt=&quot;alt text&quot; title=&quot;The Files&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Scan the attachment (just to show that it was malicious)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/transhex/scan-1.png&quot; alt=&quot;alt text&quot; title=&quot;Scan 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Scan the malicious image&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/transhex/scan-2.png&quot; alt=&quot;alt text&quot; title=&quot;Scan 2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Extracting the package from the image&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/transhex/zip.png&quot; alt=&quot;alt text&quot; title=&quot;Zip&quot; /&gt;&lt;/p&gt;</content><author><name>RabbidByte</name></author><summary type="html">Summary</summary></entry><entry><title type="html">Offensive Security PWB (OSCP) - A Review</title><link href="http://essentialexploit.com/PWB-OSCP.html" rel="alternate" type="text/html" title="Offensive Security PWB (OSCP) - A Review" /><published>2013-05-29T07:00:00+00:00</published><updated>2013-05-29T07:00:00+00:00</updated><id>http://essentialexploit.com/PWB-OSCP</id><content type="html" xml:base="http://essentialexploit.com/PWB-OSCP.html">&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;h3 id=&quot;reposted-from-another-one-of-my-blogs&quot;&gt;Reposted from another one of my blogs&lt;/h3&gt;

&lt;p&gt;Let’s start off on the right foot shall we?  I don’t want to be rude but – I am a computer geek, my writing skills are not so great.  So if you don’t like the way I write just quit reading.  So let’s get on with the story shall we?&lt;/p&gt;

&lt;p&gt;2013 was just starting and every year I have the opportunity to request training from my employer so I went out in search for a challenge.  In 2012 I received the CISSP certification and after reading all the horror stories about the exam on the internet I was not impressed.  For someone with a diverse technical background the CISSP was “Mickey Mouse” and pretty much a cake walk.  Don’t get me wrong I am quite proud to call myself a CISSP but I wanted a challenge … something that didn’t just take time and effort, but something that would drag my mind through hell.  I found this challenge in the form of the Offensive Security PWB course and OSCP challenge.&lt;/p&gt;

&lt;h2 id=&quot;in-the-beginning&quot;&gt;In The Beginning&lt;/h2&gt;

&lt;p&gt;Once I decided that the PWB course was my training for the year I had to research the training, Offensive Security, and write a proposal so that the funds for the course could be approved.  Offensive Security was no stranger to me, I have been using BackTrack since the days of version 2 and it has been my Linux distro of choice since for pentesting (Currently Kali has been released).  Any group that could put out a distribution like BackTrack definitely could teach me something.&lt;/p&gt;

&lt;p&gt;The PWB course on the other hand was more difficult to put into terms for management.  Going through review after review of the training and challenge I found terms like “sleep deprived”, “frustrated”, and “hellish” repeated over and over again.  I thought they were all over exaggerating and it was the same story as the CISSP.  Wow was I ever wrong.&lt;/p&gt;

&lt;p&gt;So the proposal was written, funds were approved, and I wasted no time to sign right up and get started.  The registration and payment process I remember was quite odd and did not flow very well.  Offensive Security does not use fancy web pages for account creation, management, and credit card processing.  Why?  Obvious I thought, why expose that type of thing to the internet with a static URL if you don’t need to.  I thought that it was a very smart move, but still I was frustrated a bit going through the process.&lt;/p&gt;

&lt;p&gt;Then the material showed up.  Excitement rushed through me and I dug in right away.  The table of contents in the pdf gave me the impression that it wasn’t going to be that hard.  I know my programing skills are far from good, but hey how hard could this really be?&lt;/p&gt;

&lt;p&gt;I read through the lab guide and watched all the videos.  The quality in the material was definitely there.  For the cost of the course at this point I was thinking that the labs had to be a joke.  I pretty much already got my money worth out of the training.  Considering how other similar courses cost 2 times as much or even more.&lt;/p&gt;

&lt;h2 id=&quot;the-lab&quot;&gt;The Lab&lt;/h2&gt;

&lt;p&gt;Back to the beginning of the guide I went to start working through the exercises, attacking boxes, and recording findings.  The VPN to the lab is amazing, the high speeds and reliability couldn’t have been better.  However other students reverting boxes on you when you’re just about to crack a system was quite frustrating.&lt;/p&gt;

&lt;p&gt;My first sweep of the lab … This can’t be right.  Ping sweep again.   Holly crap, this lab is huge! The first part of the lab had 35 machines waiting to be attacked!  And this was only 1 of 4 networks in the lab.  I couldn’t believe it, I definitely had my work cut out for me.  Later on I found that the other networks were smaller consisting of 4 – 10 machines each.  Offensive Security definitely did an outstanding job creating this hacking utopia.&lt;/p&gt;

&lt;p&gt;Boxes started to fall left and right.  I am pretty good at this I thought.  Metasploit here, MS06-086 there, and a quick meterpreter “getsystem” (my biggest mistake and regret).  Easy.  Maybe this isn’t going to be such a challenge.  Well that was the beginning, the low hanging fruit quickly fell and the frustration set in.  Some boxes just were not going down without a fight.  2 days passed without rooting another box … then another 3 days.  What am I doing wrong I thought.  I needed help.&lt;/p&gt;

&lt;p&gt;IRC (haven’t used it in so long but it was good to be back) communication to Offensive Security staff is provided with the PWB course so I thought that now would be a great time to try it out.  Needless to say you know where this is going if this isn’t the first PWB review you’ve read.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Me &amp;gt; ping op
[some op] &amp;gt; pong Me
**go into private messaging**
Me &amp;gt; am I doing something wrong?  I have tried every exploit on [insert any machine name here] and nothing is working.  Can you help me?
[some op] &amp;gt; try harder
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;WTF!? really, no shit.  Well if that aint just a kick in the ass.  Makes your frustration level go straight through the roof!  You cave, admit that you need help, you go ask for it and you get “try harder”.  This was the first time I got this response and definitely it was not the last.  Why would “teachers” do this to a person I thought.  Well I learnt through the “try harder” process that it is the best way to learn.  Don’t get me wrong it’s also the most frustrating way to learn.&lt;/p&gt;

&lt;p&gt;Let’s put it this way.  You want to learn how to do something.  So you go ask your buddy to teach you.  He/she shows you exactly step by step how to accomplish the task.  Great, you know how to do it.  Now don’t perform that task for a year, do you still remember how to do it?  With the “try harder” approach, lessons that you learn through frustration, tears, and pure agony stay with you.  I will NEVER forget the lessons that I learnt through Bob, Carrie, and that stupid freakn’ OTRS box.  So basically try harder = An op not trying to piss you off, but helping you to learn the lesson, not the solution.&lt;/p&gt;

&lt;h2 id=&quot;the-united-students-of-offsec&quot;&gt;The United Students of Offsec&lt;/h2&gt;

&lt;p&gt;As much as try harder was working for me it didn’t solve all my issues and I was quickly seeing my 90 days of lab time run out.  Who can help me out?  My friends and co-workers either don’t have the time or knowledge to help me.  Crap!  I can foresee myself not completing the lab.  Wait this is 2013, communication globally has never been easier.  Off to Twitter I went and basically sent out a distress signal with some hash tags and prayed for a response.  I also responded to another student’s distress signal.&lt;/p&gt;

&lt;p&gt;I quickly found out that my feelings of hopelessness were shared amongst others within the PWB community.  Emails started flying back and forth and information was being shared.  Don’t misunderstand this.  We were sharing information not giving answers away.  At this point we were all trained in the “try harder” methodology and were not about to break it.  You work extremely hard to get some boxes and you just aren’t about to give it away.&lt;/p&gt;

&lt;p&gt;We the students were united in our common goal to take down every single system in the lab.&lt;/p&gt;

&lt;p&gt;Along with IRC Offensive Security also provides students access to an online forum.  These forums are full of great info.  You know the normal stuff “Bob is laughing at you”, “try harder”, and then the helpful information.  However being regulated by Offensive Security I don’t think that you will find any good hints or solutions to the labs in there.  Again it’s about learning the lesson and not achieving the goal.&lt;/p&gt;

&lt;p&gt;Lab time was coming to an end and I had my challenge already booked.  Just a few days left and I decided to quit working in the lab and get the lab report completed.  I felt horrible.  I was unable to get Pain, Sufferance, and Jack (in the admin lab).  What a ride, and it wasn’t over yet.  With the challenge that weekend I couldn’t waste time worrying about what I didn’t do.  Over the 90 days I learnt a lot and achieved quite a bit.&lt;/p&gt;

&lt;h2 id=&quot;the-challenge&quot;&gt;The Challenge&lt;/h2&gt;

&lt;p&gt;The OSCP challenge is a 24 hour test of what you have learnt.  You are given access to a new lab that the student has no previous knowledge of and they are challenged to gain administrative access to the 5 machines in 24 hours.  Machines are rated at different point levels and points are gained when access is obtained by the student.  To pass the challenge a total of 70 points must be achieved out of a possible 100.  When the 24 hours is up the student then has another 24 hours to write the report in the format of a pentest report and submit it to Offensive Security.  Oh and there is one catch … remember way back at the beginning of this write up my biggest mistake and regret in the lab?  You guessed it.  You can’t use metasploit in the challenge (with some exceptions, it is laid out quite nicely in the challenge package).&lt;/p&gt;

&lt;p&gt;7:00 AM on Saturday May 4th 2013 I am sitting at my desk waiting for my exam package.  Nothing.  7:05 .. 7:15 still nothing.  What the hell?  Yeah so long story short I screwed up with the time zones and booked my exam for 8:00 AM.  Even worse I did this again scheduling the next exam as well.&lt;/p&gt;

&lt;p&gt;Finally I get the exam package and I am off to the races.  I had no plan, no schedule, and no idea what I was going to do.  Worst battle plan ever.  So yeah lets sum up this challenge attempt to WTF Why Did I Show Up?&lt;/p&gt;

&lt;p&gt;I worked from 8AM to midnight straight with no breaks.  Then I gave up.  I was beat, and there was nothing else left in me.  Only one box rooted and 2 limited shells.  I knew right away there was no possible way I passed.  I went home defeated, feeling like crap … a failure.  I whimpered to myself a little before I went to bed and then raised the white surrender flag.  I had no intension to wake up and try any more.&lt;/p&gt;

&lt;p&gt;Family and friends were needed to pick me up the next day.  Words of encouragement and long talks convinced me that I could do this.  Really this is the challenge that I was originally looking for.  Now I have found that challenge and I am going to quit because it’s not easy?  Hell no.  I wrote up the lame pentest report and sent it off to Offensive Security.  2 days later that dreaded you failed email came.  I knew it was coming but man did it ever hurt.  Someone else out there knows how poorly I did.  Ouch.  Funny thing is I found out that you can’t rebook your challenge until you get that rejection email.  Wonder if I was the first one to try and reschedule before finding out for sure if they failed?&lt;/p&gt;

&lt;p&gt;I rescheduled for the soonest weekend that fit into my schedule.  I did this for one main reason.  It kept me extremely focused and made me get over the failure very quickly.  Hell who’s got time to feel sorry for themselves when you got to do the challenge again?  Offensive Security is very kind and has priced the challenge retake very low.  Thank you, because this one I had to pay for myself.  Again together with other PWB students a plan was formed, code was compiled and a strategy was formed.&lt;/p&gt;

&lt;p&gt;Over the next 2-3 weeks many test machines were created, and exploited.  I had figured from other reviews on the internet that I was not going to face the same challenge as the first time so I’d better be ready.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Linux and Windows Privilege Escalation “Libraries” were built&lt;/li&gt;
  &lt;li&gt;A detailed 24 hour plan was created with structured breaks and machine rotation
    &lt;ul&gt;
      &lt;li&gt;First 3 hours were reconnaissance&lt;/li&gt;
      &lt;li&gt;Then 1.5 hours per machine in a rotation&lt;/li&gt;
      &lt;li&gt;Whiteboard was prepped to keep notes on important machine details like OS and kernel ver.&lt;/li&gt;
      &lt;li&gt;A list of questions was made to help me think when I got stuck on machines&lt;/li&gt;
      &lt;li&gt;A very detailed procedure was created with commands for recon work.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Saturday May 25th, 2013 – 7:00 AM …. I screwed up the time zone thing again.  Wait until 8:00 AM.  The exam package came in.  A huge break the “buffer overflow” box was repeated in this challenge.  This was the only box I rooted in the previous attempt.  Thank the gods I haven’t even started typing and I know I have 25 points.&lt;/p&gt;

&lt;p&gt;I followed my plan.  Recon work, then break, did the buffer overflow box.  Bingo! 25 points, only 45 more needed and I am only 3 hours in.  Then limited shells on 2 boxes.  When I stopped for my lunch break (away from my computer) I was feeling good.  I should have this done in time to get to bed at a decent time.&lt;/p&gt;

&lt;p&gt;After my lunch I hit a wall.  Nothing was working and I just couldn’t make progress.  Then at around 5:30 PM I got another box!  That really picked me up and I was starting to feel energized again.  But no more progress was made, I broke my schedule and skipped my dinner break … oh no, things were starting to fall apart and failure was looking like a reality again.&lt;/p&gt;

&lt;p&gt;10:00 PM I went home I was going to sleep until 2:00 AM and get back at it.  However I was still wide awake at 10:45 PM … I wasn’t going to sleep.  Back to the office I went.  Crazy good luck ensued and by 2:00 AM I had another box and another limited shell.  However that was all that I was to get that night.  6:00 AM I went back home and slept … for a whopping 2 hours when I was woken by a phone call.  So back to the office, I was awake anyway and I needed to write that report.&lt;/p&gt;

&lt;p&gt;I looked at what I had done and with access to the challenge lab cut off I could do no more work.  Am I gonna make it?  I knew I had a solid amount of points but how does Offensive Security give partial points, and will the report be good enough to get all of the points for the work I did?  I wrote the report and put as much detail in it as I could.  I was even thinking of attaching some kind bribe on the report.  Is there a way to attach a couple hundred “pay pal” bucks to a pdf?  Well either way I packaged it all up ( no bribe included ), said a little prayer and hit send.&lt;/p&gt;

&lt;p&gt;I waited … waited … and even though the reply was in, in just over 24 hours it felt like an eternity.  Then 3 minutes before I was to leave work for the day I got the email.  Holly crap I passed!  My eyes started tearing up a little and I was ecstatic!  I learnt the lessons, I fought a good fight, I didn’t make it by a lot I know … but the point was I made it.  I wanted the challenge, it was presented to me, and I had risen up and proved myself.&lt;/p&gt;

&lt;p&gt;Once a student has passed the challenge they are given access to a new area in the forum where discussing the challenge is permitted.  I looked up where I fell short immediately.  Go figure the first box I didn’t get … I had that exploit already compiled in my library … what the hell?  So I went back to my notes and some how I didn’t try it.  Another reason to make a detailed attack strategy with a sequence to follow.  The second box I missed well let’s just say I want to kick my own ass for not getting that.  So obvious that I completely ignored it thinking that they wouldn’t make it that easy.   So the interesting thing is the points that I missed was not due to lack of knowledge but because I did not follow a strict procedure to gain access.&lt;/p&gt;

&lt;p&gt;I now hold the OSCP certification and I hold it above all other certs.  I put in close to 400 hours of my time into this course, broke 2 keyboards in frustration, and almost lost one LCD.  It is not that this cert means more than the others, it is because this cert was truly earned.  I worked hard for this one and in the process learnt a lot about pen testing, exploitation, and myself.  It is an experience that I will never forget.&lt;/p&gt;

&lt;h2 id=&quot;what-students-should-know&quot;&gt;What Students Should Know&lt;/h2&gt;

&lt;p&gt;From my entire experience here is what I wish I found on the net before I started.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;When in the labs use metasploit, but every time you do make sure you can exploit the machine by hand as well&lt;/li&gt;
  &lt;li&gt;Do every extra mile exercise, they really do help you learn the material&lt;/li&gt;
  &lt;li&gt;Play in the Offsec lab’s hacking utopia as long as you can and have fun with it at the same time&lt;/li&gt;
  &lt;li&gt;Reach out to other students.  Peer support is worth so much.  To the guys that supported me thank you!  I couldn’t have done it without you.&lt;/li&gt;
  &lt;li&gt;When working through the lab keep all exploits you have used on your local machine, neatly organized, and leave yourself readme files of where you found the exploit and which systems it will work on&lt;/li&gt;
  &lt;li&gt;Even though enumeration isn’t as fun and exciting as exploitation PRACTICE it and have good notes.  The challenge is pretty much built to fail you if you don’t have good enumeration techniques&lt;/li&gt;
  &lt;li&gt;Go into the challenge with a solid attack strategy&lt;/li&gt;
  &lt;li&gt;Make lists and notes to keep yourself on track in the challenge&lt;/li&gt;
  &lt;li&gt;If you are working from a virtual machine, take snapshots of it … you never know when it will break&lt;/li&gt;
  &lt;li&gt;Don’t update metasploit when connected to the labs … for some reason it seems to really break it.  This happened to myself and one other student that I talked with&lt;/li&gt;
  &lt;li&gt;If you are married or are in a relationship you better hope they are understanding or you will be single by the end.  A big thanks to my wife, family, and friends who helped me through this!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;what-employers-need-to-know&quot;&gt;What Employers Need To Know&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;The OSCP certification is hard to get.&lt;/li&gt;
  &lt;li&gt;If you are looking for a technical security guy/gal or pen tester, look for an OSCP.  If you are looking for a policy writer or manager then get a CISSP.&lt;/li&gt;
  &lt;li&gt;OSCP holders have proven that they have a solid understanding of penetration testing and computer security on multiple platforms&lt;/li&gt;
  &lt;li&gt;From my experience and what I have read an OSCP will be more technical and have a better understanding of penetration testing than a CEH (my opinion only)&lt;/li&gt;
  &lt;li&gt;The OSCP is one of a handful of certifications that is achieved through hands on scenario testing rather than multiple choice.  You can guess a, b, c, or d and have a %25 of getting it right.  Lab scenarios there is no guessing.&lt;/li&gt;
  &lt;li&gt;For the most part I think students that have went through the PWB course and achieved the OSCP certification show dedication and exceptional work ethic (again my opinion only) or they are truly gifted and just breezed through it&lt;/li&gt;
  &lt;li&gt;For everyone who thinks IT Certification is a joke and not worth while – re-evaluate VPN scenario based testing.  I see this as the future testing standard for all IT certifications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So what’s next?  Well that OSCE is looking pretty tough and I still have some hair left to pull out …&lt;/p&gt;</content><author><name>RabbidByte</name></author><summary type="html">Summary Reposted from another one of my blogs</summary></entry></feed>