Saturday, August 18, 2012

OSCP Certified

So, I know this is kinda late, but im now OSCP certified!

I ended up staying up late one night (about 2 days back) and at like 3 am I check my email and see this:

Congratulations, you have been certified :)

*extra stuff here*

blah blah blah

you should get your certification mailed to you within 80 days.

*my address and sensitive information here*

end

Yep :) So i should get it mailed to me soon. The only downside is that i will have to mail it to my parents first and then get it mailed to my colledge in england. Nothing I can really do about this unless I want further delays.

Anyway, may or may not be active on here. Kinda busy getting ready for colledge atm + getting the mindset right. If you want to talk to me atm im pretty active on IRC. You can find me on the #offsec or #intern0t sections of Freenode.


Well i'll see ya guys around,

-tekwizz123

Thursday, August 16, 2012

PWB Exam Review and Insights

Okay I guess a blog post has been looong overdue by this point. Looking back I see the last post I made was a month ago. Let me explain what happened between now and then:

Ok basically after I got stuck in that two week rut, I come to realize that I should ask for help. So basically what happens is that I end up asking people for help, and in exchange I help them out with their problems on #offsec. This actually works quite well, as I end up reinforcing the information that I already learned while learning what I am doing wrong with new ones.

Unfortunetly I have a bit of a problem after that. I got into another 4-5 hosts but I realize I need to do better. Too bad then, because right in the middle of all of this, I have another vacation for a week. To be honest, in retrospect I think I needed that vacation because when I came back from learning how to scuba dive on said vacation, my mind was so much more refreshed and focused.

Anyway, that aside I come back from the vacation and I realize I only have like 3 days left. This then turns into a mad rush as I focus on getting as many last hosts as I can and ask people for help, giving what I can in return. I realize that many of these hosts were not that hard, and that I had just been approaching it from the wrong angle (ex performing brute force on the wrong service or overlooking a simple detail that I underestimated the importance of).

So I end up hacking like another 5-6 hosts in those last few days. And to be honest, I feel rather sad. Why? Well several reasons:

  1. I'm out of lab time. Those labs were fun damn it!
  2. I don't know if I'm really ready at all.
  3. I don't know what hosts I should practice attacking in preparation for the exam.
  4. I didn't get into the Dev or Admin network, only the IT one.
  5. People generally f****d up the host that connected the student network to the dev one.
* On a side note I will say that the decision to take the exam a bit earlier than I planned was not mine. I have college coming up in case you haven't already noticed, and once I get in I am sure as hell not doing something like this on top of course work. So once I realized this, I had to quickly draw up a plan that would allow me to get a retake if necessary and still give me time to pack up my stuff for England.*

Back to the story...

So I have about a week off before I start the exam. So I book it for Wednesday, and start studying. I find a site called boot2root.info which is hosted by g0tmi1k (amazing guy) where I found pretty much every boot2root you will ever need. Ever.

No I wasn't kidding.

EVER.

So after i'm done jumping around the room like a crazed ape, I decide to download a few challenges. Some them I did before, but I thought it would be good to do them again. So I went through Kioptrix 1, then Kioptrix 2, Kioptrix 3 and then WackoPiko. WackoPiko was tbh interesting. I got a web shell in a few minutes (easy one to do tbh) but I got stuck escalating to root. I kept getting mmap not allowed errors.

 All of a sudden I hit on one that works. For some reason, the mmap from this one was allowed and I get my root shell :) w00tw00t! I kid you not, that gave me the most immense high of the entire course. And it wasn't even one of their machines :P Idk why, but it just did. The feeling of defeating what looks to be a brick wall is one that never gets old.

Anyway Tuesday rolls around and I wake up and start my day normally. At about 12 pm I check my email and this is pretty much what happens:

*Login in*
Ooh email from offsec.
Wait....hold on...exam?
*click exam pack email*
WHAT THE MOTHER ********!?
IT WAS TODAY?
HOLY.....
*runs to pc and downloads everything*
*runs to other pc and prints out guide*
F*** F*** F*** F** F*** F*** F***

Yeah it was that bad. I had lost 6 hours of my lab time, not realizing that I had booked it for Tuesday. The exam warning email even said this, but I had mistakenly not checked the date (which is sent to you in a format like M/D/Y, and not like Tuesday 12th June 2012.)

So I start the exam. I start running the scans and then damn it, then internet cuts off. Connect back to internet and continue scans...

I gather all the information I can about all the ports available + run any information scans I can run. I keep one file open for my scans, and another for each of the steps that I took.

I then read over the lab guide while waiting for the scans to run. Looking it over I realize that the exploit-dev one will most likely take the longest and decide to start on that one first.

*5 hours later*

I test the exploit. I realize it doesn't quite work yet. Modify the exploit

* 5 1/2 hours later*

I get a system shell on the first host and gather the information I need to prove I hacked it.

The next one falls rather easily, though I end up using a metasploit lifeline on it....hmm nothing here that I can use on the other hosts. I gather all the information I can and attempt the next one.

The next 3 go rather slowly. One of them I end up giving up too early and find what I need after trying all possibilities. From there I get stuck again. After a suggestion from a friend I get in, and get stuck trying to do my privilege escalation. Nothing seems to work. Once again, bouncing ideas off of a friend helps clear my head and I get root on the system.

The same goes for the other one.

The last one I manage to get a shell on the system, but I am unable to root it. In the last hour I attempt to crack the SSH login for one of the users, but of course the time runs out. And when I mean runs out I mean at 24 hours they literally cut you off and force you out. No oh...you can get 10 more minutes. When they say 24 they mean 24. No more, no less.

In the end I end up getting 4 systems down and 1 partially compromized, scoring more than enough points to potentially pass. I crash into bed, which actually turns out to be a rather sleepless night, as I keep tossing and turning. Not that im scared about anything tbh, but my body is still on the "We are Tron. We do not stop. We do not falter. Continuing the hack....w00tw00t found....shell time mode..." kind of mode.

Anyway next day I wake up, and I just generally fool around with some British comedy for the next hour or so. Eventually I get my mind focused and get down to it. It ends up taking a hell of a lot longer than I thought. I must have gone from about 10 am to about 9 pm. No joke. Then again I was on Skype and IRC some of the time so that's probably why. But still, I feel ashamed. So 9 pm roars its messed up son of a gun face and I find out via IRC that I need to add in the exploit details for each exploit. Ok no problem. So I go and get that done. Wait....what about the URL for each and every exploit? Oh god...

So I go on a very long quest to get that done. And believe me, doing that as the last thing on the report is NOT FUN AT ALL. It annoyed me. It taunted me. But I got it done in the end.

11 PM

God time moves fast. I pm rAWjAW. I ask him how big the file size needs to be. He says 10 MB per attachment.

Ok np. Lets compress this baby.....or not? I find it only goes down 1 MB after I attempt to compress it.

* One hasty convo with connection later....*

I find out I really aught to do it in PDF. But PDF is 16 MB....meh i'll try the other method.

So I take my .ODT file and try and split that into multiple files.....

*Some long minutes later*

OOPS. Google doesn't allow sending more than 25 MB in attachments. And my .odt report is 31 MB.

I go and fetch the .pdf file and split it up into parts. All good. Upload and send.

And then I wait....

And I wait.....

And eventually I wait an hour.

I get tired of waiting and PM rAWjAW again.

"Hey mate, did you get the email?"

"We will check now, give us a sec"

By this point im so tired im not thinking straight.

"Yep we got it, should recieve an email soon"

And what do I do? Look at soon, think oh....lets wait some more.

2 AM

Eventually I look at that message again and think...oh I aught to check it now.

*checks*

Yep its there.

I shut everything down for the night and head to bed.


And now here we are the day after all of this, and I have to wait around 3 days for the results to come back. Should be good :)

So thats my entire journey put to an end.

If you liked this, +1

If not, tell me why.

If neither of these, I guess you didn't read it.

That or your just completely neutral and never have an opinion :P

Anyway its 12 am here. Time to head to bed.

-tekwizz123

Tuesday, July 10, 2012

Future Developments

This is more of a question than anything else for you guys.

I'll probably be busy with PWB for the next few weeks until I get to college. In the mean time I'm interested in what you guys are interested in hearing from me.

Here are some of my ideas:

1. iOS Security (would have to be after PWB or around exam time due to time needed to setup and other things)
2. Daily Life and Thoughts
3. More fuzzing and exploitation info.
4. My life in colledge as I learn a hacking degree.
5. *Insert your item here*

Leave a comment below and let me know what you think :)

-tekwizz123

Saturday, July 7, 2012

PWB Update

Hey guys,

So its been a while. I apologize for that but between traveling and trying to work on this course I haven't given this blog too much thought until now. So time to make up for all of that.

So the course is actually getting much harder now. At present I now have about 9 hosts left in the student labs, I have one on the IT labs and I have yet to get into the admin or dev networks. Oddly though I did find a host that was dual homed, but it doesn't seem to have a network-secret.txt file anywhere to be found, which is a bit odd; makes me wonder if I got into the Dev networks or not. I only have about 25 days left so its starting to get a bit tight. I always seemt o wonder if I will get into anymore hosts, and then I prove myself wrong.

That being said I have recently had a period where I just felt like giving up. I couldn't see any way of getting into these hosts at all. Again this is where enumeration comes in handy, because yesterday I found that I actually was able to get into one, through the sheer luck of testing a random exploit and finding that it worked. I had overlooked that the website was running a piece of software that was still using a default password and thus allowed me to gain top level privileges on the system.

Anyway I won't be touring as much now, this week i will mostly be in one place.

In other news, if any of you are going to the HOPE conference in New York, please, please leave a comment below. I would love to meet you guys in person and have a chat. I know most of you probably won't be in the area (or the country even) but if you are going it would be a pleasure. Details can be found on the website www.hope.net.


Monday, June 25, 2012

A Complete Agglomeration of Fail

Well I guess you could make that two fails now that I look back on this. First fail: I havn't been blogging nearly as much as I thought I would. Then again that might be a good thing considering how much time has been required for this lab and getting the info + hosts I have gotten so far.

But so far is now only a relative term. Because guess what? I deleted my stuff.

How?

Here's how:

rm -rf * (the directory I wanted to delete instead)

Guess what that equates to? This:

rm -rf *

So poor little me lost about a good 70% of his work in about 10 seconds. Yay. Shall I give a little overview?

Downsides:
  • Lost all scans and most of my notes.
  • Lost all my pictures.
  • All files downloaded from machines are now gone.
  • All dumped hashes are now gone.
  • The notes on the actual exploits for each machine are now gone.
  • Pretty much f***ing everything is now deleted or is not available to me.

Plus Sides:
  • For some odd reason, shutter happens to save each photo that you take as a snapshot before you choose the save as button and save it elsewhere. So I still have all my photos, just in a different place.
  • My memory for things is good, so I should be able to remember most of the exploits for the various hosts.
  • Downloaded files are actually not that big of a problem. Most of them were just downloaded because I could, a few actually mattered though.
  • The outline format for the notes still exists, so I know what information needs to go where, I just have to get the info first.

Yeah, so my 20-22 or so hosts that I exploited have to be redone again by hand. Double yay.

/end rant

In other news, I will be heading off to America soon to tour countries with my bro for colledge. Internet will be intermittent so if you have me on Skype just know that I won't be on very often. Because ontop of repairing all this damage I also have to try and wrap up the labs and exploit the last couple of hosts. To add to that I will also be traveling around quite a lot, and thus on those 6 hour car rides you can be sure as hell I won't have internet then.

Anyway, just giving an update on what happened and giving you your daily lolz.

-tekwiz123

Saturday, June 9, 2012

Try Harder :)

So its now been 1 week since I first started this course and I must say its starting to kick me in the ass in some places. A prime example of this was today.While I obviously can't release all the details of the challenge, the specific challenge that I was struggling with was the extra mile challenge from chapter 6 of the lab. 

The second one was actually very hard to do. First off, the exploit must end in "}" for the exploit to be triggered, making it rather interesting to find out where to located your shellcode and how it would fit into the provided space. Second off, as noted in one of the fourms, you had to use a DLL from the application itself and not from the OS to get the POP POP RET to work for the SEH. This caused much frustration and confusion for me...though in actually it was pretty obvious that I should have done that as its standard to check application DLLs first, then OS DLLs as this makes the exploit more reliable (the application DLLs load in the same place across OS versions, where as many OS DLLs do.)

The third challenge was getting all of the bad characters sorted out. To do this I used generatecodes.pl and sent this as the payload, then manually checked the results. This allowed me to find that an extra character was also causing problems in addition to the standard ones I had already filtered out, and thus made the application execute the standard SEH handler as per normal.

The fourth and hardest challenged that faced me though was the limited space available for the shellcode. While I can't tell you what I did to go about it, I can say that Corelan's tutorials definitely helped here, and I was able to craft some shellcode that ultimately resulted in a bind shell on port 4444, created via a fairly standard msfpayload encoded to remove all the bad characters.

The main thing I want to point out here is that all of this was possible because when one faces the wall, you really do have to try harder. What I found works best is working at it in chunks. I worked till I felt like I was about to give up, tried a thing or two more, and, wait for the magic...., took a break. Yep. A break really does help, and it lets you calm down and think things through more. This last exploit took me literally a day to create (from 12 am to about 10 pm) on and off so it was a lot of work but the breaks helped to make things clearer.

Well thats all I have for now. :)

-tekwizz123

Wednesday, June 6, 2012

4 Days In

Yep thats all it took. 4 days in and i broke my machine somehow..... busy backing it up atm, so I thought it would be a good time to give an overview of my thoughts on this course.

So far its been an amazing course. I know im going to be reflecting the thoughts of others here but even if I don't pass, the amount of info and the clarity of its presentation is simply top notch for the most part (a few videos went a bit fast for me, but so far its only been 1-2)

Futhermore the extra mile challenges are, well, actually quite a challenge. So far i have done all of them except for the DNS extra mile challenge, which i skipped because i was too tired to do it then...will have to come back to that one.

As for the actual exploiting part, i managed to get a few boxes on the first day, followed by 1-2 a day on Monday and Tuesday. From there its kinda stopped, and i know have about 6 boxes so far. The total number of boxes in the lab is about 45 or so, so i still have a long way to go.

One of the most interesting things about this course though is that although they don't tell you how to exploit any of the machines, they do give you some help by walking you though how to do different enumeration techniques in the videos, and then ask you to perform these on the labs. This makes for a very enjoyable experience as you get to learn how Mutts would go about doing it, and then your given the opportunity to recreate that in the lab, both learning the skills and gaining knowledge that you will need for later pentests.

Now one of the many things that is asked when taking this course is how much programming language that you need. From my personal experience, walking into this course I had known some programming from my exploit development and Grey Hat Python book, but i had no experience in Bash whatsoever. Personally speaking, I do think you need a bit of programming knowledge to understand some sections reguarding Python if you don't want to get caught up and have to look everything up, but then again you could enter this course without any experience in it; it just might hinder your progress a little bit.

As for the bash side, if you don't know it don't worry. So long as you know how to move around and do basic things in Linux, you will be fine. Honestly I didn't know how the cut command worked at all, and Muts provided one of the best examples of it, and know I love it. /being lame comment Bash has sort of become my new best friend in a way /end lame comment

Overall, very very good course. Unfortunetly I can't say much more as im only beginning module 6 + I don't want to spoil the course for you guys who might be considering taking it.


Now im going to go fix this dang pc...........raaaaaagh.....i think i might also have some cookies with that ;)

-tekwizz123 (*munch*)