Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 23 guests and 2 members online
 
Free Business and Tech Magazines and eBooks

You are here: Home
EH-Net
May 26, 2013, 03:56:28 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
  Home Help Calendar Login Register  
  Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 37
61  Ethical Hacking Discussions and Related Certifications / General Certification / Re: OSCP and Pentesting 101 on: April 09, 2012, 03:45:27 PM
++1

Multitasking is essential, both in real-world pentesting, and in these courses.  You WILL NOT complete the exams in OSCP, if you remain single-threaded...

sil's advice is spot on.

Real world is funny and sometimes fool around with the admins watching me perform my tests thinking they're going to do something stupid like stop me. Before I even start most tests, I fire off dozens of decoys (sometimes including their IP space) so they don't turn around and block me. Once I'm running though, I usually blend right since people will be so confused by the amount of stuff they're seeing.
62  Ethical Hacking Discussions and Related Certifications / General Certification / OSCP and Pentesting 101 on: April 09, 2012, 03:21:35 PM
I wanted to take some time to give those taking the OSCP and similar exams, a bit of food for thought when taking these exams. The food will come via taking time to create a repeatable framework in order to perform necessary objectives on the road to "owning the box." Be it Windows, Linux, BSD, the flavor is irrelevant. I urge anyone taking the exam to go over the PTES (Penetration Testing Execution Standard) as it more detailed than what you will see here.

The OSCP exam seems to eat up a lot of time for a lot of individuals taking the exam. Time is crucial in this exam as you are going to be allotted 24 hours. In the real world, your SOW will also have a cut off time. So how can you maximize your time without having your work all over the place. The answer is to create
yourself a framework.

In the following mindmap (http://www.infiltrated.net/mgz/oscp.jpeg), I have a target and the tasks I would take in trying to exploit the target. In the enumeration/identification step, I will begin with, but not rely on, NMAP. I try to use p0f whenever possible since it offers a better mechanism of identifying a target.

I try to use p0f especially when identifying webservers, since I can use a proxy server to connect without triggering anything out of the ordinary. In the following snippet, I will connect from my desktop (FreeBSD 9.0) to a forensic workstation I created using Ubuntu, on port 80.

Code:
[root@kenji ~]# uname -a
FreeBSD kenji 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Mar 20 10:42:10 EDT 2012     root@kenji:/usr/obj/usr/src/sys/SARU  i386
[root@kenji ~]# nmap -sS -P0 -sV -T2 -vvv 10.4.4.86

Starting Nmap 5.61TEST5 ( http://nmap.org ) at 2012-04-09 14:47 EDT
NSE: Loaded 16 scripts for scanning.
Initiating Parallel DNS resolution of 1 host. at 14:47
Completed Parallel DNS resolution of 1 host. at 14:47, 0.03s elapsed
DNS resolution of 1 IPs took 0.03s. Mode: Async [#: 3, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating SYN Stealth Scan at 14:47
Scanning 10.4.4.86 [1000 ports]
Discovered open port 22/tcp on 10.4.4.86
Discovered open port 80/tcp on 10.4.4.86
Completed SYN Stealth Scan at 14:54, 401.81s elapsed (1000 total ports)
Initiating Service scan at 14:54
Scanning 2 services on 10.4.4.86
Completed Service scan at 14:54, 6.38s elapsed (2 services on 1 host)
NSE: Script scanning 10.4.4.86.
NSE: Starting runlevel 1 (of 1) scan.
Nmap scan report for 10.4.4.86
Host is up (0.00038s latency).
Scanned at 2012-04-09 14:47:38 EDT for 409s
Not shown: 998 closed ports
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 5.8p1 Debian 7ubuntu1 (protocol 2.0)
80/tcp open  http    Apache httpd 2.2.20 ((Ubuntu))
Service Info: OS: Linux; CPE: cpe:/o:linux:kernel

Read data files from: /usr/local/share/nmap
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 408.69 seconds
           Raw packets sent: 1000 (44.000KB) | Rcvd: 1000 (40.008KB)


NMAP states this is Ubuntu, what does p0f state?

Code:
[root@kenji ~]# p0f -o /tmp/p0f.output

.-[ 10.4.4.72/16070 -> 10.4.4.86/80 (syn) ]-
|
| client   = 10.4.4.72/16070
| os       = FreeBSD 9.x
| dist     = 0
| params   = none
| raw_sig  = 4:64+0:0:1460:65535,6:mss,nop,ws,sok,ts:df,id+:0
|
`----

.-[ 10.4.4.72/16070 -> 10.4.4.86/80 (mtu) ]-
|
| client   = 10.4.4.72/16070
| link     = Ethernet or modem
| raw_mtu  = 1500
|
`----

.-[ 10.4.4.72/16070 -> 10.4.4.86/80 (uptime) ]-
|
| client   = 10.4.4.72/16070
| uptime   = 20 days 2 hrs 47 min (modulo 49 days)
| raw_freq = 999.93 Hz
|
`----

.-[ 10.4.4.72/16070 -> 10.4.4.86/80 (syn+ack) ]-
|
| server   = 10.4.4.86/80
| os       = Linux 3.x
| dist     = 0
| params   = none
| raw_sig  = 4:64+0:0:1460:mss*10,4:mss,sok,ts,nop,ws:df:0
|
`----

.-[ 10.4.4.72/16070 -> 10.4.4.86/80 (mtu) ]-
|
| server   = 10.4.4.86/80
| link     = Ethernet or modem
| raw_mtu  = 1500
|
`----

.-[ 10.4.4.72/16070 -> 10.4.4.86/80 (http request) ]-
|
| client   = 10.4.4.72/16070
| app      = ???
| lang     = English
| params   = none
| raw_sig  =
1:Host,User-Agent,Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8],Accept-Language=[en-us,en;q=0.5],Accept-Encoding=[gzip,deflate],Accept-Charset=[ISO-8859-1,utf-8;q=0.7,*;q=0.7],Keep-Alive=[115],Proxy-Connection=[keep-alive],?If-Modified-Since,?If-None-Match:Connection:Mozilla/5.0
(X11; U; FreeBSD i386; en-US; rv:1.9.2.27) Gecko/20120314 Firefox/3.6.27
|
`----

.-[ 10.4.4.72/16070 -> 10.4.4.86/80 (http response) ]-
|
| server   = 10.4.4.86/80
| app      = ???
| lang     = none
| params   = none
| raw_sig  = 1:Date,Server,?ETag,?Vary:Content-Type,Connection,Keep-Alive,Accept-Ranges:Apache/2.2.20 (Ubuntu)
|
`----

We can validate whether or not out nmap output is accurate but we can assess how long the server has been running and get an idea of the patch level of a machine. Now, in order to minimize time, I might sweep a subnet for specifics: HTTP, SMTP, POP and so forth. The reasoning for this, is that when under time constraints, it allows me to focus specific attacks and probes against those specific targets that I know are running the service. This allows me to spend time elsewhere (running other nmap sweeps, etc)

For example, I can sweep a /24 for ONLY port 80, begin launching more probes in the background, while I launch other scans and other probes at another service.

Code:
printf "Enter host\n\n"
read HOST

WEB=`nmap -sS -p80 $HOST -v | awk '/open port/{print $2}' |grep -vi dis`


if [ "$WEB" == open ]

then

nikto -host $HOST

fi 


exit 0

In any event, if you're doing ONE thing and ONE THING only on the OSCP exam, you're wasting time. There is nothing stopping you from opening a terminal and creating your own little framework for doing this exam:

Code:
mkdir {HTTP-OUTPUT,HYDRA-RECON,NIKTO-OUTPUT,SNMP-OUTPUT}

printf "Enter host\n\n"
read HOST

WEB=`nmap -sS -p80 $HOST -v | awk '/open port/{print $2}' |grep -vi dis`


if [ "$WEB" == open ]

then
cd HTTP-OUTPUT
nikto -host $HOST > $HOST.nikto,output
echo "Completed Nikto" | wall
fi 


exit 0

Get the picture?

1) Make relevant directories (way beforehand)
2) Enter a target
3) Go check if the target is running anything on port 80
4) If it is, then run nikto against it
5) When done write it everywhere in case I am on 50 different terminals

You can continue something like this to fire off dozens of tests, probes, and so on. What you do with your time is always going to be critical since time is irreplaceable. Same applies when performing real world testing. You may be in a bind for time, if you're waiting on the output of one tool, you're wasting time. Moving back to the mindmap, take some time to think about a structured way to attack this exam. There is no reason you cannot fork off processes way before you even get started. Practice in your own environment:

Code:

if $THIS_TARGET is running SNMP
then run hydra
else if $THIS_TARGET is running HTTP
then use $TOOL_OF_CHOICE
fi


Same applies in the real world. When performing tests, it is critical that not only you perform necessary testing, but it is also critical you manage your time while doing so. (Time is money) Creativity goes a long way in this field (pentesting) however, it makes no sense to throw paint on a canvas and once done, determine you are now going to start painting the Mona Lisa. Planning goes a long way

Food for though
63  Ethical Hacking Discussions and Related Certifications / General Certification / Re: guidence on: April 09, 2012, 07:40:31 AM
Here is a starting point:

http://infiltrated.net/TechnicalSecurityRoadmap.html
64  Ethical Hacking Discussions and Related Certifications / General Certification / Armando / ELearn Security staff on: April 06, 2012, 07:25:31 AM
Shoot me a message with any and all certs and what area of security they're in. So far solely found eCPPT, want to add it correctly to the security certification roadmap I'm making
65  Ethical Hacking Discussions and Related Certifications / OSCP - Offensive Security Certified Professional / Re: Windows 2008 SP1 - Ways to exploit? on: April 05, 2012, 03:47:07 PM
...trunkspotting (you read it here first from me Wink)

Indeed.  Never heard the term before and Google only has one result for "trunkspotting vlan": this thread haha

I make crap up as I go along. VLANSPOTTING to me is the ability to determine the VLANs used in a network, and which machines in the network are trunked into other VLANs. Wink Those are the ones I like... Trunked VLAN access especially when there is no port security or filtering Wink
66  Ethical Hacking Discussions and Related Certifications / OSCP - Offensive Security Certified Professional / Re: Windows 2008 SP1 - Ways to exploit? on: April 05, 2012, 11:19:44 AM
Depends on what they're using for NAC. If its something stupid like MAC addresses, I may try to fire something on the wire to check for someone elses MAC if possible, spoof that, it all depends. To fiddle around and tamper with NAC, it all depends on what I'm doing, what they're using for NAC and so forth. I have PacketFence lying around on a VM machine and have fiddled with it a but have never had to attack this head on... I look for workarounds all the time though Wink Same applies for VLANs (VLAN hopping, trunkspotting (you read it here first from me Wink)
67  Ethical Hacking Discussions and Related Certifications / OSCP - Offensive Security Certified Professional / Re: Windows 2008 SP1 - Ways to exploit? on: April 05, 2012, 09:36:47 AM
Do you ever find yourself testing on networks that have NAC? Most decoy / noise activities typically get you shut down quickly. Beyond low-and-slow, do you have alternate strategies for those situations?

Client sides. I am a stickler for spelling things out from the jump. When we meet with clients, I often take the time to explain to them the differences in attacks and attackers. I always explain to them the realities and costs associated with an attack because there is a cost for an attacker, and there are different types of attackers.

Once a client understands the differences (an INTENT attacker - someone who wants in no matter what the cost) they almost always allow me to try anything and everything. So most of the times I perform 4 types of tests. I've documented those different tests in the document I wrote for the RWSP (outside attacker, outside attacker w/creds, insider, insider w/creds). By insider, it does not solely mean: "Joe who works for the IT department" it extends to the social engineerer who'll find a way onto the environment and work blindly as well as that same social engineerer who managed to get credentials.

It all boils down to your SOW and your presentation way beforehand to get your client to agree to full blown testing
68  Ethical Hacking Discussions and Related Certifications / OSCP - Offensive Security Certified Professional / Re: Windows 2008 SP1 - Ways to exploit? on: April 05, 2012, 09:04:18 AM
When I did my exam, I created literally a script to do the entire thing and at the last minute, many of my machines were firewalled, bastille linux'd, etc., so I have to modify it and parse out sections on the fly. I submitted the script to them as well and explained what it was I did and why. Unsure if that gave me brownie points heh....

So an approach would be something like:

if [ this scan shows http ]

then

run these http based tools against those

else

if [ this scan show snmp ]

then

run these snmp based tools

else

if [ this scan shows http login forms ]

then

run hydra using this wordlist and dictionary list

fi
fi
fi

I would throw in wall's after each command so you'll know step X was finished
69  Ethical Hacking Discussions and Related Certifications / OSCP - Offensive Security Certified Professional / Re: Windows 2008 SP1 - Ways to exploit? on: April 05, 2012, 07:59:41 AM
Come on guys, I've been studying this training for the last 2 /12 weeks and I am still beginning the smtp (My record show me 19 hours)

How fast do you move with the material? I am trying to assimilate all the info and do all the labs and extra miles but I am not sure if 90 days will be enough.



Here is something I will give a tip on concerning the OCSP and others like it: If you're machine is doing only one thing, and your focused on one thing... You're doing it wrong.

You're capable of opening up the amount of terminals allowed by the amount of memory on your machine to perform functions. If you're doing the exam or others like it using a Unix based system, I suggest creating desktops for specific tasks, e.g:

Desktop 1 - Scanning and Enumeration
Desktop 2 - brute forcing / password cracking
Desktop 3 - Web applications
etc
etc

This allows you to go back and forth and perform multiple tasks without getting lost. Scripting helps, e.g.:

nmap -sS -sV -O this.block/24 -oX this.block-scan.xml ; printf "\n\nDone"|wall

You don't necessarily have to wait for nmap to finish to perform another task. You can move on and do what you need to do. Let's better this example:

Code:
[root@kenji ~]# uname -a
FreeBSD kenji 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Mar 20 10:42:10 EDT 2012     root@kenji:/usr/obj/usr/src/sys/SARU  i386
[root@kenji ~]# nmap -sS -sV -p 80 -v 10.4.64.89

Starting Nmap 5.61TEST5 ( http://nmap.org ) at 2012-04-05 08:47 EDT
NSE: Loaded 16 scripts for scanning.
Initiating Ping Scan at 08:47
Scanning 10.4.64.89 [4 ports]
Completed Ping Scan at 08:47, 0.20s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 08:47
Completed Parallel DNS resolution of 1 host. at 08:47, 0.08s elapsed
Initiating SYN Stealth Scan at 08:47
Scanning 89.64.4.10.in-addr.arpa (10.4.64.89) [1 port]
Discovered open port 80/tcp on 10.4.64.89
Completed SYN Stealth Scan at 08:47, 0.21s elapsed (1 total ports)
Initiating Service scan at 08:47
Scanning 1 service on 89.64.4.10.in-addr.arpa (10.4.64.89)
Completed Service scan at 08:47, 6.00s elapsed (1 service on 1 host)
NSE: Script scanning 10.4.64.89.
Nmap scan report for 89.64.4.10.in-addr.arpa (10.4.64.89)
Host is up (0.0010s latency).
PORT   STATE SERVICE VERSION
80/tcp open  http    VMware Server 2 http config
Service Info: Host: 89.vonworldwide.com

Read data files from: /usr/local/share/nmap
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 6.72 seconds
           Raw packets sent: 6 (240B) | Rcvd: 2 (72B)

This is fine, but a waste of time. My goal is to find whether or not this host was running a webserver. Simply because I needed to enumerate it after the fact. Maybe with dirbuster or Nikto. I know that I need to do something AFTER the fact, and I don't want to sit around waiting for this to finish to get to the next stage.

Code:
[root@kenji ~]# uname -a
FreeBSD kenji 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Mar 20 10:42:10 EDT 2012     root@kenji:/usr/obj/usr/src/sys/SARU  i386
[root@kenji ~]# nmap -sS -sV -p 80 -v 10.4.64.89 | awk '/open/ {
>   print a[NR%2] "\n" a[(NR+1)%2]
>   print;getline;print;getline;exit
> }
> {a[NR%2]=$0}
> '|awk '/open port/{print $6}'
10.4.64.89
[root@kenji ~]#

Now that this solves one problem, I can create a script that does something like:

if [ this server runs http ]

then

run nikto using this directory list I created

fi

Let's see it in action:

Code:
[root@kenji ~]# nmap -sS -sV -p 80 -v 10.4.64.89 | awk '/open/ {
  print a[NR%2] "\n" a[(NR+1)%2]
  print;getline;print;getline;exit
}
{a[NR%2]=$0}
'|awk '/open port/{print "nikto -host "$6}'|sh
- Nikto v2.1.4
---------------------------------------------------------------------------
+ Target IP:          10.4.64.89
+ Target Hostname:    10.4.64.89
+ Target Port:        80
+ Start Time:         2012-04-06 08:53:41
---------------------------------------------------------------------------
+ Server: No banner retrieved
+ Root page / redirects to: https://10.4.64.89/
+ No CGI Directories found (use '-C all' to force check all possible dirs)
^C[root@kenji ~]#

I killed it as it was only an example. In exams like this where time is a factor, don't get bogged down with waiting on anything. There is nothing stopping you from automating a lot of tasks to narrow down the information you will need. This applies in the REAL world of penetration testing. Most times, I have automated scripts ready to roll the minute I pop a sessions. The reason for this is to allow me to get in and out and get as much data as quickly and silently as possible. When I say silent, if you've read any of my posts before, I use a LOT of decoys Wink I also tend to use alternative means for extracting data. E.g., I will use DNS, ICMP UDP, SSL tunnels at a rate limited speed. I will throw data into comments on a webpage, then view the webpage and parse out the comments. Think outside the box. For some of these exams, its not always about an 0day either. There is escalation and so forth. Config files, sniffing the wire from one machine to another. I would add: "Try DIFFERENTLY" to their Try Harder motto
70  Ethical Hacking Discussions and Related Certifications / General Certification / Re: Security Certification Roadmap on: April 04, 2012, 03:02:46 PM
Now in a situation like this (mile2, SU. SecurityCertified) I don't even wanna pull a trump card because they have their place in the industry that I don't want to get involved in. None of the three map to any DoD 8750 so the reality is, I won't bother. Aside from that, I wouldn't want anyone coming around to me saying: "man that really sucked", "they robbed me blind", etc., etc., etc. Bad enough I threw ECC up there
71  Ethical Hacking Discussions and Related Certifications / General Certification / Re: Security Certification Roadmap on: April 04, 2012, 01:30:04 PM
I have mile2 CSWAE and truly it's not even worth mentioning (even if it is padding my sig)

Smiley I was trying to be politically nice Wink
72  Ethical Hacking Discussions and Related Certifications / General Certification / Re: Security Certification Roadmap on: April 04, 2012, 11:31:03 AM
Dont forget the Security University and Mile2 certs. Depending on how full you want to have the tree.

also the International Association of Computer Investigative Specialists (IACIS) cert for forensics.

Not willing to bother with Mile2 and this is why:

* Certified Penetration Testing Engineer (formerly CPTS)
* Certified Penetration Testing Consultant (formerly old CPTE)

Which would you perceive I should post? CPTC

They are a bit too scattered for me to browse through their information. I will go over Security University's offerings, but they too are a bit scattered for me. I will check out IACIS however, my list is based on a few criteria: I have heard about it, read about it, it is in demand (visible in say a Dice.com or Monster.com search) and it makes sense to me. There should be no reason why I would have to go to a "certification" giver and try to make sense of what they're offering. Under: http://mile2.com/mile2-courses.html they state one thing, then on the other page they state another: Course: CPTE followed by.... "formerly old CPTE" which is it? Let them sort it out.
73  Ethical Hacking Discussions and Related Certifications / General Certification / Re: Security Certification Roadmap on: April 03, 2012, 03:16:07 PM
I would place (likely going to) under Incident Response and Forensics as thats where it belongs Wink I haven't started on Network Security yet because I am likely going to do something NO ONE WILL LIKE and that is to post information relevant to CCNA/CCDP which teaches A LOT about networking from the protocol on up and includes security. While it is vendor specific, those two courses will teach you more about NETWORK security than the GCIA would. A network to me are OSI layers 1 - 4 and function outside of Windows/Linux, etc. Networking will also be forked into specifics, likely Firewalls, IDS/IPS and "Broad" for other certs like SANS' GCED, etc. still working on it.
74  Ethical Hacking Discussions and Related Certifications / General Certification / Re: Security Certification Roadmap on: April 03, 2012, 02:32:13 PM
As much as I write, I hate writing. A book from me would be incoherent since I come from different areas of security. I actually started a book two years ago but it was so scattered I gave up. Wink Besides the things I would write about would likely get me put on watchlists or some other form of trouble

ADDED (forgot to mention):
Updated the page with links... Still working on it
75  Ethical Hacking Discussions and Related Certifications / General Certification / Re: Security Certification Roadmap on: April 03, 2012, 01:43:28 PM
Working on the others when time allows, like I said just started... I will likely add links directly from a cert to the proctors site, then tree it to suggested reading, etc.
Pages: 1 ... 3 4 [5] 6 7 ... 37
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.182 seconds with 21 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.