Beruflich Dokumente
Kultur Dokumente
Lab M a n u a l
Intrusion D e t e c t i o n S y s t e m
A n in tr u s io n d e te c tio n s y s te m a n d /o r ( ID S ) is a d e ric e o r s o ftw a re a p p lic a tio n m a lic io u s a c tiv itie s th a t
m o n ito rs
n e tir o r k
s y s te m
a c tiv itie s f o r
o r p o lic y
I CON
[ Z 7 V a lu a b le
KEY
L a b S c e n a r io
in fo rm a tio n
T est your k n o w le d g e
W e b e x e rc is e
W o r k b o o k r e v ie w
Due to a growing number of intrusions and since the Internet and local networks have become so ubiquitous, organizations increasingly implementing various systems that monitor IT security breaches. Intrusion detection systems (IDSes) are those diat have recently gained a considerable amount of interest. An IDS is a defense system that detects hostile activities 111 a network. The key is then to detect and possibly prevent activities that may compromise system security, 01 a hacking attempt 111 progress including reconnaissance/data collection phases that involve, for example, port scans. One key feature of intrusion detection systems is their ability to provide a view of unusual activity and issue alerts notifying administrators and/or block a suspected connection. According to Amoroso, intrusion detection is a process ot identifying and responding to malicious activity targeted at computing and networking resources. 111 addition, IDS tools are capable ot distinguishing between insider attacks originating from inside the organization (coming from own employees or customers) and external ones (attacks and the threat posed by hackers) (Source: http://www.windowsecurity.com)
111 order to become an expert penetration tester and security administrator, you must possess sound knowledge of network intrusion prevention system (IPSes), IDSes, malicious network activity, and log information.
L a b O b je c tiv e s
& Too ls
D e m o n s tra te d in th is lab a re lo c a te d a t D:\CEHT oo ls\C E H v8 M o du le 17 Evading IDS, F ire w a lls , and H o n eyp o ts
The objective ot tins lab is to help students learn and detect intrusions network, log, and view all log tiles. In tins lab, you will learn how to: Install and configure Snort Run Snort as a service Log snort log files to Kiwi Syslog server IDS
111
To earn out tins lab, you need: A computer mnning Windows Seiver 2012 as a host machine A computer running Windows server 2008, Windows 8, 01Windows 7 as a virtual maclnne WniPcap drivers nistalled 011 the host maclinie
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
Notepads-+ installed 011 the host machine Kiwi Svslog Server installed 011 the host machine Active Perl installed 011 the host machine to mil Perl scnpts Administrative pnvileges to configure settings and run tools A web browser with Internet access
L a b D u r a t io n
Time: 40 Minutes
O v e r v ie w o f In tr u s io n D e te c tio n S y s te m s
An intrusion detection system (IDS) is a device 01 software application that monitors network and/01 system activities for malicious activities 01 policy violations and produces reports to a Management Station. Some systems may attempt to stop an intrusion attempt but tins is neither required 1101 expected of a monitoring system. 111 addition, organizations use intrusion detection and prevention systems (IDPSes) for other purposes, such as identifying problems with security policies, documenting existing threats and deterring individuals from violating security policies. IDPSes have become a necessary addition to the security infrastructure of nearly even* organization. Many IDPSes can also respond to a detected threat by attempting to prevent it from succeeding. They use several response techniques, which involve the IDPS stopping die attack itself, changing the security environment. IDPSes are primarily focused 011 identifying possible incidents, logging information about diem, attempting to stop them, and reporting them to security administrators.
O v e rv ie w
Pick an organization diat you feel is worthy of your attention. Tins could be an educational institution, a commercial company, 01perhaps a nonprofit charity. Recommended labs to assist you 111 using IDSes: Detecting Intrusions Using Snort Logging Snort Alerts to Kiwi Svslog Server Detecting Intruders and Worms using KFSensor Honeypot IDS HTTP Tunneling Using HTTPort
L a b A n a ly s is
Analyze and document the results related to tins lab exercise. Give your opinion 011 your targets security posture and exposure.
Ethical Hacking and Countermeasures Copyright by EC-Council A ll Rights Reserved. Reproduction is Stricdy Prohibited.
PLE A SE
TA LK
TO
Y O U R IN S T R U C T O R IF Y O U R E L A T E D TO T H IS LAB.
H A V E
Q U E ST IO N S
Ethical Hacking and Countermeasures Copyright by EC-Council A ll Rights Reserved. Reproduction is Stricdy Prohibited.
D e l e c t i n g
Intrusions u s i n g S n o r t
I C ON
/ V a lu a b le
KEY
L a b S c e n a r io
in fo rm a tio n
T est your k n o w le d g e
W e b e x e rc is e
W o r k b o o k r e v ie w
The trade of die intrusion detection analyst is to find possible attacks against their network. The past few years have witnessed significant increases in DDoS attacks 011 the Internet, prompting network security to become a great concern. Analysts do tins by IDS logs and packet captures while corroborating with firewall logs, known vulnerabilities, and general trencUng data from the Internet. The IDS attacks are becoming more culuired, automatically reasoning the attack scenarios ni real time and categorizing those scenarios becomes a critical challenge. These result ni huge amounts of data and from tins data they must look for some land of pattern. However, die overwhelmnig dows of events generated by IDS sensors make it hard for security adnnnistrators to uncover hidden attack plans.
111 order to become an expert penetration tester and security administrator, you must possess sound knowledge of network IPSes, IDSes, malicious network activity, and log information.
&
Too ls
D e m o n s tra te d in th is lab a re lo c a te d a t D:\CEHToo ls\C E H v8 M o du le 17 Evading IDS, F ire w a lls , and H o n eyp o ts
L a b O b je c tiv e s
The objective of tins lab is to familiarize students widi IPSes and IDSes.
111 tliis lab, you
need to:
Install Snort and verify Snort alerts Configure and validate snort.conf file Test the worknig of Snort by carrying out an attack test Perform mtmsion detection Configure Omkmaster
L a b E n v ir o n m e n t
Ethical Hacking and Countenneasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
A computer running Windows Server 2012 as a host machine Windows 7 running on virtual macliuie as an attacker macliuie WmPcap dnvers installed on die host machine Notepad++ installed on the host macliuie Kiwi Svslog Server installed on the host macliuie Active Perl installed on the host machine to nui Perl scripts Administrative privileges to configure settings and run tools
L a b D u r a t io n
Time: 30 Minutes
O v e r v ie w In tr u s io n
Y ou can also download Snort from http://www.s rt. g.
o f
In tr u s io n
P r e v e n tio n
S y s te m s
a n d
D e te c tio n S y s te m s
110 01
A11 IPS is a n e tw o r k s e c u rity appliance that m o n ito rs a network and system activities for m a lic io u s activity. The main functions of IPSes are to id e n tify malicious activity, log in fo rm a tio n about said activity, attempt to b lo c k /s to p activity, and report activity. A11 IDS is a device or software application that m o n ito rs network and/or system activities for m a lic io u s activities or p o lic y v io la tio n s and produces re p o rts to a Management Station. It performs intrusion detection and attempt to s to p detected possible in c id e n ts .
L a b T a s k s 1. 2.
Start W in d o w s
S e rv e r 2 0 1 2
In s tall S nort
Snort_2_9_3_1_ln staller.exe
4. Accept the L ic en se A g re e m e n t and install Snort with the diat appear step -b y-step 111 the wizard.
l__ Snort is an open source network intrusion prevention and detection system (ID S / IP S ).
C lose
In s ta lla tio n
window.
Ethical Hacking and Countemieasures Copyright by EC-Council A ll Rights Reserved. Reproduction is Stricdy Prohibited.
' I
Snort also requires WinPcap 4.1.1 to be installed on this machine, WinPcap can be downloaded from: http://www.winpcap.org/
It would also be wise to tighten the security on the Snort installation directory to prevent any malicious modification of the Snort executable.
Next, you must manually edit the 'snort.conf file to specify proper paths to allow Snort to find the rules files and classification files.
OK
7. Snort requires W in P ca p to be installed on your machine. 8. Install W inPcap by navigating to D :\C EH -Tools\C EH v8
IDS, F ire w a lls , and HoneypotsM ntrusion 4 1 _2.exe. C:\Snort M o du le 17 Evading Too ls\S no rt, D e te c tio n
and
10. Register on die Snort website h ttp s ://w w w .sn o rt.o rg /sig n u p 111 order to download Snort Rules. After registration comples it will automaticallv redirect to a download page. 11. Click die G et R ules button to download die latest mles. 1 1 1tins lab we have downloaded sn o rtru les-sn ap sh ot-2931 tar.gz. 12. Extract die downloaded rales and copy die extracted folder 111 tins padi:
D:\CEH -Tools\C EHv8 M o du le 17 E vading IDS, F ire w a lls , and H o n eyp o ts\ln tru sio n D e te c tio n Tools\Snort.
folder
111
M o du le 17 Evading IDS, F ire w a lls , and H o n eyp o ts\ln tru sio n D e te c tio n T o o ls\S n o rt\sn o rtru les\e tc
of die extracted Snort rales, copy die s n o rt.c o n f tile, and paste diis tile 111 C:\Snort\etc.
C:\Snort\etc;
15. The S n o rt.c o n f file is already present 111 die Snort rales S n o rt.c o n f file.
M o du le 17 Evading
C:\Snort.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
r u le s
M o du le 17
Evading IDS, F ire w a lls , and HoneypotsM ntrusion D e te c tio n T oo ls\S no rt\sn o rtru les
to C:\Snort\rules.
C m d H ere
TASK
19. Now navigate to C:\Snort and right-click folder bin, and click trom die context menu to open it 111 a command prompt. 20. Type sn o rt and press E nter.
Administrator: C:\Windows\system32\cmd.exe - snort C:\Snort\bin/snort Running in packet dunp node
V e rify S n ort A le rt
In it ia liz in g Snort In it ia liz in g Output Plugins? pcap DAQ configured to passive. The D AQ uersion does not support reload. Acquiring network t r a f f i c fron "\Deuice\NPF_<0FB09822-88B5-411F-AFD2-FE3735A9?7B B> _ Decoding Ethernet -- In it ia liz a t io n Conplete -- > Snort? <* Uersion 2.9 .3 .1-WIN32 GRE <Build 40) By Martin Roesch 8 r The Snort Tean: http://www.snort.org/snort/snort-t Copyright < C > 1998-2012 So u rce fire, In c ., et a l. Using PCRE uersion: 8.10 2010-06-25 Using ZLIB uersion: 1.2.3
To print out the T C P / IP packet headers to the screen (i.e. sniffer mode), type: snort v.
o' an
21. The In itia liza tio n C o m p le te message displays. Press C trl+C. Snort exits and comes back to C:\Snort\bin. 22. Now type sn o rt -W . Tins command lists your machines physical address, IP address, and Ediernet Dnvers, but all are disabled by default.
Administrator: C:\Windows\system32\cmd.exe
Snort exiting C:\Snort\bin snort -W -*> Snort! <* Uersion 2.9.3.1-WIN32 G R E (Build 40> By Martin Roesch 8 r The Snort Team: http://www.snort.org/snort/snort-t Copyright < C > 1998-2012 Sourcefire, Inc., et al. Using P C R E version: 8.10 2010-06-25 Using ZLIB uersion: 1.2.3 Index Physical Address IP Address Deuice N am e Description 1 00:00:00:00:00:00 disabled \Deuice\NPF_<0FB09822-88B5-41IFAFD2-FE3735A977BB> Microsoft Corporation 2 00:00:00:00:00:00 disabled \De ice\NPF_<0BFD2FA3-2E17-46E3B614-0FC19B5DDA25> 3 00:00:00:00:00:00 disabled \Deuice\NPF_<lD13B78A-B411-4325rQRA<JRFOP?JM V M 4 D4:BE:D9:C3:C3:C C disabled \Deuice\NPF_<2A3EB470-39FB-48809A79-77E5AE27E530> Realtek PCIe G B E Family Controller C:\Snort\bin>
Figure 1.3: Snort -W Command
23. Observe your Ediernet Driver in d ex n u m b er and write it down; 111 dus lab, die Ediernet Driver index number is 1 . 24. To enable die Ediernet Driver, 111 die command prompt, type sn o rt 2 and press Enter.
C E H Lab Manual Page 853
-d e v - i
Ethical Hacking and Countenneasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
25.
E 7 To specify a log into logging directory, type snort dev 1 /logdirectorylocationand, Snort automatically knows to go into packet logger mode.
You see a rapid scroll text Ethernet Driver is enabled and working properly.
111
Administrator: C:\Windows\system32\cmd.exe - snort -dev i4 C:\Snort\bin,sno rt -dev - i 4 Running in packet uu11p 1'iuut; = = In it ia liz in g Snort = = In it ia liz in g Output Plugins? pcap DAQ configured to passive. The DAQ version does not support reload. Acquiring network t r a f f i c fron "\Device\NPF_<2A3EB470-39FB-4880-9A7977 E5AE27E53
B >".
-> Snort? <*Uersion 2 .9 .3 .1-WIN32 GRE <Build 40> By Martin Roesch 8 r The Snort Tean: http://www.snort.org/snort/snort-t Copyright < C > 1998-2012 So u rce fire, In c ., et a l. Using PCRE version: 8.10 2010-06-25 Using ZLIB version: 1.2.3
Connencing packet processing <pid=2852> 11/14-09:55:49.352079 ARP who has 10.0.0.13 t e l l 10.0.0.10
26. Leave die Snort command prompt window open, and launch anodier command prompt window. 27. Li a new command prompt, type ping
g o o g le .c o m
Q Ping [-t] [-a] [-n count] [1 size] [-] [-i T T L] [-v TO S] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list
28. Tliis pmg command triggers a Snort alert in the Snort command prompt with rapid scrolling text.
Administrator: C:\Windows\system32\cmd.exe - snort -dev i 4 TTD '4.125.236.85:443 10.0.0.10:51345 < TCP TTL:56 TOS:0x0 ID:55300 IpLen:20 DgnLe 95 nM .flP.M M Seq: 0x81047C40 Ack: 0x4C743C54 Win: 0xFFFF TcpLen: 20 7 03 02 00 32 43 3F 4C 22 B4 01 69 AB 37 FD 34 2C?L . . i. 7 . 4 IF 3F 70 86 CF B8 97 84 C9 9B 06 D7 11 6F 2C 5B .? p o ,[ D 8A B0 FF 4C 30 5B 22 F4 B9 6C BD AE E8 0E 5A L0[ . . l Z F F6 7D 55 31 78 EF ..>Ulx. 11/14-09:58:16.374896 D4:BE:D9:C3:C3:CC 00:09:5 < B: AE: 24: CC type:0x800 len:0x36 10.0.0.10:51345 -> 74.125.236.85:443 TCP TTL:128 TOS:0x0 ID:20990 IpLen:20 DgnLe n:40 DF Seq: 0x4C743C54 Ack: 0x81047C77 Win: 0xFB27 TcpLen: 20 .1/14-09:58:17.496035 ARP who-has 10.0.0.13 t e l l .1/14-09:58:18.352315 ARP who-has 10.0.0.13 t e l l .1/14-09:58:19.352675 ARP who-has 10.0.0.13 t e l l
To enable Network Intrusion Detect ion System (N ID S ) mode so that you dont record every single packet sent down the wire, type: snort -dev 1 ./log-h 192.168.1.0/24-c snort.conf.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
29. Close both command prompt windows. The verification of Snort installation and triggering alert is complete, and Snort is working correcdy 111 verbose mode.
T A S K 3
30. Configure die sn o rt.c o n f file located at C :\Snort\etc. 31. Open die s n o rt.c o n f file widi Notepad++. 32. The s n o rt.c o n f file opens screenshot.
111
Notepad++ as shown
111
the following
& Make sure to grab the rules for the version you are installing Snort for.
Log packets in tcpdump format and to produce minimal alerts, type: snort -b -A fast -c snort.conf Figure 1.7: Configuring Snortconf File in Notepad++
33. Scroll down to die S te p #1: S e t th e n e tw o rk v a ria b le s section (Line 41) of snort.conf file. 111 the H O M E_N ET line, replace any widi die IP addresses (Line 45) of die machine where Snort is mnning.
*C:\Sn0ft\etc\$n0rtx0nf - Notepad+ Be Edit Search 'iict* Encoding Language Settings Macro Run Plugns frndcw o I
-! X '
I i | ! '?
10 % &
JS
* C|
* fe
33 5 |
HJ
I I
H molcwf |
X x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
Notepad++ is a free source code editor and Notepad replacement that supports several languages. It runs in the M S Windows environment.
: *cat situations
4 5 : C e l:2 5S d0
any
line as it is.
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
The element any can be used to match all IPs, aldiough any is not allowed. Also, negated IP ranges diat are more general dian non-negated IP ranges are not allowed.
35. If you have a DNS Server, then make changes 111 the DNS_SERVERS line bv replacing $H O M E _N E T with your DNS Server IP address; otherwise, leave diis line as it is. 36. The same applies to SAITP_SER\TE,RS, HTTP_SER\TE.RS, SQL_SER\rERS, TELNET_SERVERS, and SSH_SER\TRS. 37. Remember diat if you dont have any servers running on your machine, leave the line as it is. DO N O T make any changes 111 diat line. 38. Scroll down to R U LE_PATH (Line 104). 111 Line 104 replace ../rales widi C:\Snort\rules, 111 Line 105 ../so_rules replace with C:\Snort\so rules, and 111 Line 106 replace ../p rep ro c ru les with C:\Snort\preproc rules.
Ptc\s1x x tc o n f Notepad Erie Ldit Search *1e Encoding Language SetDngi _ |a x X a i l i f l *9
Macro R u
M e
s a i i J f
ft fl| P C
ua Rule variable names can be modified in several ways. You can define metavariables using die $ operator. These can be used with the variable modifier operators ? and -
H cnoccorf | Kote r o r Wir.dowa usera: You are aavisea to r a re tm a ar. absolute pa tn . such as: c :\3 n o r t\r u le s var RU1X_PUH C :\S n o rt\ru le s v a r SO RULE PATH C :\S n o rt\a o ru le a war PRrPROC R^LE PATH C: \S n o rt\p r pro=_xrule3 10 # I f you are usin g re p u ta tio n preprocessor a c t these 1:9 # C u rre n tly tiie re i s a bug w ith r e la t iv e paths, th ey are r e la t iv e to where sno rt i3 # n o t r e la t iv e to s n o rt.c o n f lilc e the above v a ria b le s 4 Thia i s caa ple cely in c o n s is te n t w ith how oth e r ars work, BCG 5 9986 l- l t s e t th e anaciute patn a p p ro p ria te ly 1*3 v a r HHTTELISTPATH . . / r u le s 114 var BUICK_LI5T_PAIK . ./ r u le s
1 1
? * Stop gene ric decode events; c o n fig disable_decod_alerts Stop A le rta on experim ental TCP option a ccr.Tlg dl**ble_copopt_experim ent !_ 1 * 1 .* 4 Stop A lc r ta on obaolet TCP option c c r.ria d19anie_t cpo pt_cb ao le te _a ie rt :;4
1 2
1:9 1 Stop A le rts on T/TCP a le rts <i______________________ !1______________________ Ncirrwl Ltil file length: 25439 lines: 657
V
Ln: 106 Cot :iS S*1:0 UNIX ANSI > N S I
39.
111 Line
file
rules.
!o 1 MS d 83 4 * B| < ft *a -* 3 nil S *1
H noco&rf I 103 f aucn a3: c 1 \a n o rt\ru ie a 104 var RtJLEPATfl C :\3 n o rt\ru le a 105 var SC_ROLE_PAIH C :\3 n o rt\so _ ru l :06 var PREPROCRULEPATH C :\S nortN preproc_rulea 108 *.09 110 111 t*.?
l i i i i f l
f z r you are uaina re p u ta tio n preprocessor act tneae $ C u rre n tly th ere ia a bug w ith r e la t iv e paths, th ey are r e la t iv e to whereanort ia f no t r e la t iv e co n ort.co nX l i k th e above v a ria b le s Thia 1 a com pletely ine on aia ten t w ith hew eth e r vara werlr, BUG 89986 4 Smt th absolute path a p p ro p ria te ly var white L IS I PAIH c :\s n o r t\ r u ie a l
117
Etliical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
40. Navigate to C :\Snort\rules and create two tiles and name them w h ite jis t.r u le s and b la c k jis t.r u le s make sure die two tiles extensions are
The include keyword allows other rule files to be included within the rule file indicated on die Snort command line. It works much like an #include from die C programming language, reading the contents o f the named file and adding the contents in the place where die include statement appears in die file.
.rules.
41. Scroll down to S tep #4 : C o nfigure d yn am ic loaded lib ra ries section (Line 242). Configure d yn am ic loaded lib ra ries in this section. 42. At padi to dynamic preprocessor libraries (Line 247), replace /usr/lo cal/lib/sn o rt_d yn am icp rep ro cessor/ with your dynamic preprocessor libranes tolder location. 43.
111 tins lab,
C :\Snort\lib\snort_dynam icpreprocessor.
C:\Sn0 rl\etc\s1x x U 0 nf Notepad 7 Erie Ld!t Search Vie* Incoding Language Settings Macro Run P K 1 g < 1 3 ftmdew J O IM e % l l| M *a * * [E 3
H tno*.coti j
2
U 245 246 242 29 250 2252 253
Step *4: Configure dynamic loaded lib ra rie s . 70- e o ii In fo !station, see Snore Manual, Configuring 5r.cn - Dynamic Modules
pat& to dynamic preprocessor lib ra rie s f patn to dynamic preprocessor lib ra rie s dytlMacpreprocessor directory C:\Sncrt\lib\3nort dynaai ^preprocessor| * path to base preprocessor engine ciyr.anlceng 1 ne /u9r/10cal/llb/sn0rL_iynalcer.glne/ilbsr_er.gir.e.30 t path to dynamic rules lib ra rie s dynamlcdetecclon directory /u sr/local/1lb/anort_dynamlcr ulea V
H U Preprocessors are loaded and configured using the preprocessor keyword. The format o f die preprocessor directive in the Snort rules file is: preprocessor <name>: <options>.
255 ? 5 4 step fs : Contiaure preprocessors 4 For more information, see the Snort Manual, Configuring Snort Preprocesso
4 GTP Control Channle Preprocessor. For note information, see RFA2ME.OTP V preprocessor aces porta 1 2123 3386 2152 > 2 f In lin e packet normalization. For mozt information, see RAD2. normalize 4 Does notfting in IOS node rpr0c110r nornmlixe_ip4 preprocessor r.crmai1 se_top 1 1p9 eon scream preprocessor norma lie e ic m p i czeproceaaor normalize lp
2 < 5 i
N.mul ut file
length: 25 44 S linttt: 6 5 7
UNIX
ANSI
1
NS
44. At padi to base preprocessor (or dvnamic) engine (Line 250), replace /usr/lo cal/lib/sn o rt_d yn am icen g in e/lib sf_en gin e.so witii your base preprocessor engine C :\Snort\lib\snort_dynam icengine\sf_engine.dll.
Preprocessors allow the functionality o f Snort to be extended by allowing users and programmers to drop modular plug-ins into Snort fairly easily.
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
45.
C o m m en t (#) die dynamic rules libraries line as you already configured die libraries 111 dynamic preprocessor libraries (Line 253).
C:\Snort\et*V r c f < f Notepad Be Ldit Scorch View Encoding Language Settings Macro Run Piugns ftndcvr Z o x
o 'He 1 !3 * 0^
g|
1[f3
b is b
^ ! ,9
Note: Preprocessor code is nrn before the detection engine is called, but after the packet has been decoded. The packet can be modified or analyzed in an out-of-band manner using this mechanism.
. * r
* Step *4 : C onfinure dynamic loaded lib r a r ie s . t For core ln lc rm a cio n , see Snore Manual, C on figu rin g Snort - Dynanlc Modules # ***# # ***** **tM M # # # # # # # **# # **M ****M M *# # t**** **
* * * * * * * * * * * * * * * m w m * * * * * * * * * * * * * * * * * * * * * * * * * * *
249 250
* r a th to base preprocessor engine dyr.anu.ceng in - C :\3 n o rt\lib \s n o rt_ d y n s n 1 ic e n g in e \s f_ e n g in e .d ll path to dynamic ru le s lib r a r ie s > dynagu.c ;lccclon d lr c to r y /u s r/lo c a l/'llb /s n o rt^ a y n a .-v l::!. 11
V step *M C onriaurc preprocessors * Por more m fonkaeion, see the Snore Manual, C o n figu rir.c Snort Preprocesso
* GTP C on trol C h.n nl Preprocessor. For * o r . in fo rw a tio n , RZASME.OTP * preprocessor 0 -c : p o rts ( 2123 3386 2152 ) I In lin e packet n o rm a liz a tio n . For store in on aa tlon , sec ?* 1 ! .norm alize * Does no tm na in IDS mode preprocessor norm elize_ip4 preprocessor r.c rx a l 1 ze_ cp: ip s ecr. 3 rear: preprocessor n c r o l 1 ze_1 cmp1 preprocessor norm alize l p 6 I teal fie length :25446 ling :557 Ln:253 Col ;3 Sd :0 I
46. Scroll down to S te p #5: C o nfigure P reprocesso rs section (Line 256), die listed preprocessor. Do nothing 111 IDS mode, but generate errors at mntime.
IPs may be specified individually, in a list, as a C ID R block, or any combination o f die duee.
111
befo re
C:\Sn0 rt\etc\snort conf Notepad* L3t Search View Encoding Language Settings Macro Run Plugre Aatdcw I
1* 1
* t * T f W T W W W W T f T r f T * T T T T W T T r -
> REAnJE.GTP
4 I
preprocessor norjralire ic m p C
In lin e packet n o rm a liz a tio n . For 1 Does noth in g in ZDS node preprocessor normal1ze_1p4 preprocessor n o rm a lis e tc p : ip s e! preprocessor normalize_lcmp4 preprocessor normal1 se_1 p 6
Target-based IP de fragm entation. For more information, see BLADME. frag3 preprocessor tra g 5 _ g lo b a l: max_Irags 6SSS6 preprocessor troa3 engine: p o lic y windows dete ct_a r.* 1 a i 1 es cverlap_ 1 1 a n t 10 ann_fra 01r.cnt_length 100 tim eout V la r g c t s is c a scacecul insp e ctio n /o trca m reassembly. preprocessor sereaS_global; tr a c k e c p yes, \ tr*ck_u dp yaa, \ tra c k _ 1 cnc no, \ fo r xcrc m ro ra tio n , ace RLADKt.streanb
Many configuration and command line options o f Snort can be specified in the configuration file. Format: config <directive> [: <value>]
MX_tcp 3 6 2 1 4 4 ,\
m y th :2 5 4 5 6 lin e .:5 5 7
1:269 Col:3 Sd 0
48. Scroll down to S te p #6 : C o nfigure o u tp u t plugins (Line 514). 111 tins step, provide die location of die c la s s ific a tio n .c o n fig and re fe re n c e .c o n fig files. 49. These two files are 111 C :\Snort\etc. Provide diis location of files 111 configure output plugins (111 Lines 540 and 541).
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
lit
0
CASnort\ett\snmconf Notepad* idit Jjcareh view Incoding Language Settings Macro Run Plugns ftmdcw
'- I
)"B ncCcorf step 46: cor.riou re c utpu t p lu gin s 4 5 *j ?or more in fo rm a tio n , see Snort Manual, C on figu rin g Snort - Output Modules[ 5!
=j r il< "
51fl 519 520 521 Si'i4 523 524
* u n ifie d ? 4 aeeonsenaaa r c r !cost i n s t a lls 4 c u tp u t u n ifie d 2 : filenam e m erged.log, l i m i t 128, nosts3r, wpl3_CTrent_type3, vlan_event_type3 A d d itio n a l c o n fig u ra tio n fo r s p e c ific tjp e s o f i n s t a lls # c utpu t a le rt_ u n i ie d 2 : filenam e s n o r t.a le r t , l i i a i t 125, nosCaap f o u tp ut lo g un1r1ed2: rilenarae sn a re .lo o , l i m i t 123, ncatamp
ca
4 oatafcass 4 ou tp ut database: a le r t , <db_type>, us?r<usernan!> pa3 3w=rd <pa3svord V c u tp u t aatacasei 100, <dto_typ>, u9er< uacma&e> paaav:rs< Eaaavord>
lii
* c ta d a ti rercrcr.ee aata. do not * e a itv te include C:\Snarc\ece\elas31f1eat1on.e0nt10l lac lu d # C; \Sac r \ c c \r Crnc. co n f i g_| length :25482 lina:6S7________In :541 Co) :22 S*l:0
Figure 1.15: Configuring Snort.coiif File in Notepad++ lrigure 1 .i : Uonngunng inort.com rile in !Notepad^ 1
50.
this s te p #6 , add the line o u tp u t dump all logs 111 die a le rts .id s file.
111
o
0
for Snort to
* ^ * |&% C )| 9 c
*H nc< corf b.A 4 step te : c on no ure outp ut p lu gin s 515 4 For more in fo rm a tio n , see Snort Manual, C on figu rin g Snort 517 '*.fi 519 S?0 521 525 524
4 u n ifie d : V ;ccorr.cr.ici cor !coat i n s t a lls 4 o u tp ut u n ifie d 2 : filenam e merged. 100, l i m i t 128, n03ta*p p ls _ e ^ n t_ ty p e s , vlan_event_types
A d d itio n a l c o n fig u ra tio n fo r s p e c ific types o f in s t a lls 4 c utpu t a lo rt_ u n ifi d 2 : fila n a a a n o r c .a le r t, l i m i t 129, r.oxaap 4 cu tp u t lo g un1E1ed2: rilenarae s n o r t.is o , l i m i t 126, r.: axt
N ote: ipvars are enabled only with IPv6 support. W ithout IPv6 support, use a regular var.
- -533 534
4 oatafcass 4 c utpu t database: a le r t , <db_type>, uaer-<usemane> pe a3 *:rc<fa3sw ord 4 c u tp u t ia ta 3 3e: lo o , <db type>, u3er=<uaemaEe> pa33wcr2=<pa33word>
|c-; . p u t le r t _ fa 3 t : a le r t s . id s | 4 metadata refe re nce da ta , do not m odify tcese lin e s inc lu d e C :\S no rt\ecc\cla 33 1f1 cat1o n.c0 nf1 0 ln c lu d a C :\3nQ rt\8cc\reC arenca.conf l q
1 6 ?5:
Co<:30 Sl:0
51. By default, die C:\Snort\log folder is empty, widiout any files 111 it. Go to die C:\Snort\log folder, and create a new text file with die name alerts.ids.
Ii=yj Frag3 is intended as a replacement for die &ag2 defragmentation module and was designed with the following goals: 1. Faster execution than frag2 with less complex data management. 2. Target-based host modeling anti-evasion techniques.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
log
v C
Search log
alerts.ids
Libraries
)=
1 item
53.
die s n o rt.c o n f tile, find and replace die ip v ar string widi var. By default die string is ipvar, which is not recognized by Snort, so replace it widi die v a r string.
111
N o te: Snort now supports multiple configurations based 011 VLAN Id 01 IP subnet widiui a single instance of Snort. Tins allows administrators to specify multiple snort configuration files and bind each configuration to one 01 more VLANs or subnets radier dian ninning one Snort for each configuration required.
Replace
Three types o f variables may be defined in Snoit: Var Portvar ipvar
I IMatch ra s e @ W rae around Search Mode (> Normal C Extended Op, V, \t, V O , \x ...) O Regular expression Q L m atches newline Direction O u> Dawn 0 Transparency () On losing focus O Always = 0=
Find
Replace
Find in Files | Mark | S |v a r in selection Find Next Replace Replace A|l Replace All in All Opened Documents
v l
54. Save die sn o rt.c o n f file. 55. Before running Snort you need to enable detection niles 111 die Snort niles file; for diis lab we have enabled ICMP mle so diat Snort can detect any host discovery ping probes to die system running Snort. 56. Navigate to
++.
C :\Snort\rules
57.
Uncom m ent
Ethical Hacking and Countenneasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
C:\5nort\rules\icmp info.rules Nofepad E*e Edit Search View Encoding Language SetDngs Macro Run Plugns 0 I >
1 H ft
4m* r!| P c* ft * ta t
SEXTERNAL_NET any > SHOMEKET any $ S X IE R N A 1 _ N E Tany >$ H O K E _ N E T any SEXTERNAL_NET any -> SH0HE_KET any SEXTERNALNET any -> SH0KE_NET any
r |, T,[ | S i l i f l
(msg: ICXP-IKyC IRDP (nsg :'I-X ^-IK F C FUJG (r\sg: ICMP INF0 PING (osg: IS 'P-INTC PING
>
alert isrsp $ EXIE R N A L _ N E T an y>$ H 0 K E _ N E T an y cnsj:IC X E-IN FC I R E P router advertisem ent"; 1type:9; rereren29 * a le r t leap 3 0 # a le r t leap 31 * a le r t lc n p 32 * a le r t i=r^> 34 # a le r t icnj? 36 * a le r t ic n p ro u te r s e le c tio n "; ity p e :1 0 ; reference : *H IX; lcype :S ; co n te n t : 1 13 12 1 1 1 1 0 BSDtype"; 1 ty p e : 8 ; c o n te n t:| O0 09 OA 0 1 BayR3 R ou ter"; ity p e : 8 ; co n te n t: | 01 02
3 3 * alert re s SE X IE R N A L_N E Tan y>$ H 0 K E _ N E T an y (m 3 ?:"X C X PlN FOrIUG SeOSI.x"; ltype:8; content:"| Q Q0 00 00 3 5 # alert leap $ E X T E R N A L _ N E Ta n y
SEXTERNAL_NET any -> H0KE_NET any (nsg: ICM?-IK7C ?IUG Cisco Type. x " ; ity p e :8 ; co n te n t:"|A B CD
3 alert icnp SE X T E R N A LN E Ta n y>SH O K E N E Ta n y (x a s g :IC X P-IK 7 CP IN G IP H etM onitor M acintosh ;itype:B; c o n t 3 8 t alert 1st $exiernal_net an y> Shoke_n ei an y cn3g:1cxp -lK F0pibg li2tjx/35d ;d 3 1ze:8; 1 d :1 3 1 7 0 ;1 type:8
SEXTERNAL~NET any -> SH0HE~NET any (msg: ICHP-INF0 PIHG Flo*pom t2200 o r Network Management Scf
a le r t ic n p SEXTERNAL_NET any -> SH0XE_NET any (msg:*ICKP-IK?C PIHG M ic ro s o ft X indovs"; i ty p e : 8 ; c o n te n t:"0 40 I a le r t lea p $EXIERNA1_NET any -> $HOXE_KET any (nsg : I3 (P XKFC POTG network Toolbox 3 Window* ; l type : 8 ; coi * a le r t ic n p SEXTERNAL_NET any > SH0KE_NET any (msg: ICMP-INF0 PIHG Pmg-O-HeterWindows"; ity p e :0 ; content: 42 a le r t ict*> SEXTERNAL~NET any > SH0KE~NET any (rasg: ICKP-IKFC PIHG Pinger Windows"; it y p e : 8 ; c o n te n t: "Oata 43 * a le r t 1 cnp cexie rn a l_ n e t any > Shoke_nei any (cs 3 : 1 cxp- 1 k fo pih c seer windows"; 1 ty p e i 8 ; con t e n t 1 8 a 04 44 a le r t 1 a 1p SEXTERNAL NET any > SHOKE NET any (msg: ICKP-INF0 PING O racle S o la n s "; ds 18 e : 8 ; 1 type 8 ; clas. 45 f a le r t lea p $EXTERNAL_NET any -> $H0XE_KIT any ( n g :2 CXff-IKFC PIHG Window ; lc y p e : 8 ; co n te n t: abcdergfcljk. 9 a le r t !;rap SEXIERNAI_NEI any > SH0KE_KEI any !f a :*1 a tP -lN fC tra c e ro u te 1 ; svce: 8 ; t t l i l ; c la a a t ! t t : a t t c n a le r t icnp SFXTERXAL NFT any -> SHO XR_KET any (mag: TCMP-IKFC PINO ; ic o d e :0 ; ity p e : 8 ; e la s s ty p - : ia c - a c tiv 1 | a le r t isno SHOKEJJET any -> CEXTERNAL_NET any ( n a a i- io t f - 1K5C Address mask R ly "> ic o d c io ; lt v p e u s ; cia. 49 a le r t 1 cnp SEXTERNAL_NET any > SH0KE_NET any (msg: ICKP-INF0 Address Maslr Reply undefined code"* 1 eode:>0 50 t a le r t lea p $SXTERKAL_NET any -> $K0XE_KET any ( e * g : 2 (^ P-Z>:FC Add:a Kak Rvquaat"; lc o d :0 ; lty p e :1 7 ; cl 51 a le r t 1 SEXIERNAL_NET any > $H0KE_NET any (ns 3 : ICJ4 PIN f 0 Address Mask Reaucst undetined code! ; code::
5 2 alert S E X T E R N A L ~ N E Ta n y>$ H O K E ~ N E Ta n y (M gr-ICVP-IKFCAlternate H o t A d d re ;icode:0; itype:6; c f alert isnp exiernal_net an y >ho k e _net an y (nsg:1c x p 1 N F CAlternate H o st A d aress u n d erm ed c o d e ;ic e d
* a le r t 1 cnp SEXTERNAL_NET any -> 8H0KE_NET any (e1sj:*IC H P INF0 Dataarati Conversion E r r o r "; icodesO; 1 ty p e :3 f a le r t lea p fEXTERNAL NET any -> <H0KE NET any (tasg: ZCXP-IKFC Satagraa Converalon E rro r undefined code"; i v 1 1 1 >
>4 55 <|
NcinwlUxlfile
UMX
ANSI
IM S
58. Now navigate to C:\Snort and nght-click folder bin, select die context menu to open it in die command prompt.
V a lid a te C o n fig uratio ns
C m d H e re
from
59. Type
as cii
and press E n te r to start Snort (replace number; 111 dus lab: X is 1).
60. If you enter all the command information c o rre c tly , you receive a g rac efu l e x it as shown 111 the following figure.
y To run Snort as a daemon, add -D switch to any combination. Notice that if you want to be able to restart Snort by sending a S IG H U P signal to die daemon, specify the full path to die Snort binary when you start it, for example: /usr/local/bin/snort -d 192.168.1.0/24 \-l /var/log/snordogs -c /usr/local/etc/snort.conf s-D
61. If you receive a fa ta l error, you should first ve rify diat you have typed all modifications correcdy into the s n o rt.c o n f tile and then search dirough the tile for e n trie s matching your fatal error message. 62. If you receive an error stating Could n o t c r e a te run the command prompt as an A d m in is trato r.
th e re g is try ke y ,
then
-11
Administrator: C:\Windows\system32\cmd.exe
tasks
S ta rt Snort
111
snort
Ethical Hacking and Countenneasures Copynght by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
64. Snort starts rumung in IDS mode. It first initializes output plug-ins, preprocessors, plug-ins, load dynamic preprocessors libranes, nile chains of Snort, and dien logs all signatures.
GO
C:\Snort\etc\snort.conf is the location o f the configuration file Option: -l to log the output to C:\Snort\log folder Option: -i 2 to specify die interface
65. After initializing interface and logged signauires, Snort starts and waits for an attack and tngger alert when attacks occur on the machine.
Uersion 2.9.3.1-UIN32 G R E <Build 40> B y Martin R oesch 8 r The Snort Team : http://www.snort.org/snort/snort-t Copyright < C > 1998-2012 Sourcefire, Inc., et al. Using P C R E version: 8.10 2010-06-25 Using ZLIB version: 1.2.3 Rules Engine: S F _ SN O R T_ D E TE C T IO N _E N G IH E Uersion 1.16 <Build 18> F _S S LP P Uersion 1.1 <Build 4> Preprocessor Object S F _ S S H Uersion1.1 <Build 3> Preprocessor Object S F .S M T P Uersion 1.1 <Build 9> Preprocessor Object S Preprocessor Object SF_SIP Uersion1.1 <Build 1> F.S D F Uersion1.1 <Build 1> Preprocessor Object S F _R E P U T A T IO N Uersion 1.1 <Build 1> Preprocessor Object S F _ P O P Uersion1.0 <Build 1> Preprocessor Object S F _ T 1 0 D B U S Uersion 1.1 <Build 1> Preprocessor Object S F _IM A P Uersion1.0 <Build 1> Preprocessor Object S F _ G T P Uersion1.1 <Build 1> Preprocessor Object S F JF T P T E LN E T Uersion 1.2 <Build 13> Preprocessor Object S F _ D N S Uersion1.1 <Build 4> Preprocessor Object S F _ D N P 3 Uersion 1.1 <Build 1> Preprocessor Object S F _ P C E R P C 2 Uersion 1.0 <Build 3> Preprocessor Object S C om m encing packet processing <pid=6664>
Figure 1.20: Initializing Snort Rule Chains Window
- * > Sn o rt T <*-
Run Snort as a Daemon syntax: /usr/local/bin/snort -d -h 192.168.1.0/24 \ 1 /var/log/snortlogs -c /usr/local/etc/snort.conf s- D . 01 When Snort is run as a Daemon, the daemon creates a P ID file in the log directory.
66 .
After initializing the interface and logged signatures. Snort starts and waits for an attack and trigger alert when attacks occur on the macliuie. Attack your own machine and check whedier Snort detects it or not.
M achin e).
TASK
A tta c k H o st M a c h in e
70. Open die command prompt and type ping X X X .X X X .X X X .X X X -t from die A tta c k e r M a c h in e (XXX.XXX.XXX.XX is your Windows Server 2012 IP
address;.
71. Go to W in d o w s S e rv e r 2 0 1 2 , open die Snort command prompt, and press C trl+ C to sto p Snort. Snort exits. 72. Now go to die C :\S n o rt\lo g \10 .0 .0 .12 folder and open the text file.
ICM P_EC HO .ids
Note that to view the snort log file, always stop snort and dien open snort log file.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
ICMP.ECHO.idT- Notepad
File Edit Format View Help
'x
11/14-12:24:17.131365 10.0.0.12 -> 10.0.0.10 IC M P TTL:128 T O S :0 x0 ID :31479 IpLen:20 D g m L e n :6 0 Type:8 C ode:0 ID:1 S eq:198 E C H O [**] IC H P -IN F OP IN G [**] 11/14-12:24:18.146991 10.0.0.12 -> 10.0.0.10 IC M PT T L:128 T O S :0x0 ID:31 4 8 0 IpLen:20 D g m L e n :6 0 Type:8 C ode:0 ID:1 S eq:199 E C H O [] IC M P -IN F OP IN G [**] 11/14-12:24:19.162664 10.0.0.12 -> 10.0.0.10 IC M PT T L:128 T O S :0x0 ID:3 1 4 8 1 IpLen:20 D g m L e n :6 0 Type:8 C ode:0 ID:1 S eq:200 E C H O [] IC M P -IN F OP IN G [**] 11/14-12:24:20.178236 10.0.0.12 -> 10.0.0.10 IC M P TTL:1 2 8T O S :0x0 ID :31482 IpLen:20 D g m L e n :6 0 Type:8 C ode:0 ID:1 S eq:201 E C H O [**] IC M P -IN F OP IN G [**] 11/14-12:24:21.193933 10.0.0.12 -> 10.0.0.10 IC M PT T L:128 T O S :0 X 0 ID:31 4 8 3 IpLen:20 D g m L e n :6 0 Type:8 C ode:0 ID:1 S eq:202 E C H O [**] IC M P -IN F OP IN G [**] 11/14-12:24:22.209548 10.0.0.12 -> 10.0.0.10 IC M PT T L:128 T O S :0x0 ID:31 48 4 IpLen:20 D g m L e n :6 0 Type:8 C ode:0 ID:1 S eq:203 E C H O
Figure 1.21: Snort Alertsids Window Listing Snort Alerts
73. You see that all the log entries are saved 111 die ICM P_EC HO .ids hie. Tins means that your Snort is working correctly to trigger alert when attacks occur 011 your machine.
L a b A n a ly s is
Analyze and document die results related to diis lab exercise. Give your opinion 011 your targets security posture and exposure.
PLE A SE
TA LK
TO
Y O U R IN S T R U C T O R IF YO U R E L A T E D TO T H IS LAB.
H A VE
Q U E ST IO N S
Tool/Utility Snort
Q u e s t io n s
1. Determine and analyze die process to identify and monitor network ports after intnision detection.
C E H Lab Manual Page 863 Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
2. Evaluate how you process Snort logs to generate reports. Internet Connection Required Yes Platform Supported 0 Classroom 0 !Labs
Ethical Hacking and Countermeasures Copyright by EC-Council A ll Rights Reserved. Reproduction is Stricdy Prohibited.
Lab
L o g g i n g S n o r t Alerts to K i w i S y s l o g S e r v e r
S n o / t is a n o p e n s o u rc e n e tw o rk in tr u s io n p r e v e n tio n a n d d e te c tio n s y s te m ( ID S /IP S ) .
I CON
___ V a lu a b le
KEY
L a b S c e n a r io
in fo rm a tio n
T est your k n o w le d g e
W e b e x e rc is e
W o r k b o o k r e v ie w
Increased connectivity and the use ot the Internet have exposed organizations to subversion, thereby necessitating the use ot mtnision detection systems to protect information systems and communication networks from malicious attacks and unauthorized access. An intrusion detection system (IDS) is a security system diat monitors computer systems and network traffic, analyzes that traffic to identity possible security breaches, and raises alerts. A11 IDS tnggers thousands of alerts per day, malting it difficult for human users to analyze them and take appropriate actions. It is important to reduce the redundancy of alerts, uitelligendy integrate and correlate diem, and present lugh-level view of the detected security issues to the administrator. A11 IDS is used to inspect data for malicious 01 anomalous activities and detect attacks 01unaudionzed use of system, networks, and related resources.
111 order to become an expert penetration tester and security administrator, you must possess sound knowledge ot network intrusion prevention system (IPSes), IDSes, identify network malicious activity, and log information, stop, or block malicious network activity.
L a b O b je c tiv e s
H Too ls
The objective of tins lab is to help smdents learn and understand IPSes and IDSes.
111 tins lab, you need
d e m o n s tra te d in th is lab a re lo c a te d a t D:\CEHToo ls\C E H v8 M o du le 17 Evading IDS, F ire w a lls , and H o n eyp o ts
to:
Install Snort and configure snort.conf file Validate configuration settings Perform an attack 011 the Host Machine Perform an intrusion detection Attempt to stop detected possible incidents
Ethical Hacking and Countenneasures Copyright by EC-Comicil All Rights Reserved. Reproduction is Stricdy Prohibited.
L a b E n v ir o n m e n t
To carry-out tins lab, you need: A computer running Windows Server 2012 as a host machine Windows 8 running on virtual machine as an attacker machine WinPcap drivers installed on die host machine
7 You can also download K iw i Syslog Server from http://www.kiwisyslog.co m
Kiwi Svslog Server installed on die host machine Admnnstrative privileges to configure settings and nin tools
L a b D u r a t io n
Tune: 10 Minutes
O v e r v ie w o f o f IP S e s a n d ID S e s
An intrusion detection system (IDS) is a device or s o ftw a re application diat monitors network and/or system activities for m a lic io u s activities or polio, violations and produces reports to a management station. Intrusion detection and prevention systems (IDPS) are primarily tocused on identifying possible incid en ts, logging information about them, attempting to stop diem, and reporting diem to s e c u rity administrators.
S TASK 1
L a b T a s k s
1. Navigate to
H o n eyp o ts\ln tru sio n D e te c tio n T o o ls\K iw i Syslog S e rv e r K iw i_ S ys lo g _S erve r_ 9.3.4.E va l.se tu p .ex e
double click on
and install
K iw i Syslog S erve r
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
3.
111
die
Choose O p e ra tin g M o de
S e rv e r as an A p p lic a tio n
In s ta ll K iw i Syslog
so larw ind s
O In stall Kiwi S yslog S e iv e i a s a S e iv ic e This option installs Kiwi Syslog Server as a Windows service, alowing the program to run without the need for a user to logn to Windows. This option also retails the Kiwi Syslog Server Manager which is used to control the service.
|(* In stall Kiwi S yslog S e iv e r a s a n A pplication | This op bon retails Kiwi Syslog Server as a typical Windows appkcabon, requnng a user to login to Windows before r i m n g the application.
&
Too ls
SolarWinds, Inc.
d e m o n s tra te d in th is lab a re lo c a te d a t D:\CEH Too ls\C E H v8 M o du le 17 Evading IDS, F ire w a lls , and H o n eyp o ts
4.
111
W eb A c c e s s
solarw ind s
Kiwi Syslog Web Access can be enabled in the licensed or evaluation versions of Kiwi Syslog Server.
SolarWinds, Inc.
Choose C o m p o nents
wizard and
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
I I
a ant
solarwinds
to
Select the type o f install: Or, select the optional components you wish to instal:
Normal Program files (required) 0 Shortcuts apply to all users 0 Add Start menu shortcut b^J Add Desktop shortcut p i Add QuickLaunch shortcut O Add Start-up shortcut Description
6.
111
die C hoose In s ta ll L o c atio n wizard, leave die settings as dieir defaults and click In s ta ll to continue.
Kiwi Syslog Server 9.3.4 Installer
C h o o s e Install L ocation
so larw ind s
Setup w l n s ta l Kiwi Syslog Server 9.3.4 n the folowng folder. To n s ta l in a different folder, dick Browse and select another folder, dick Instal to start the installation.
Destination Folder
1
Figure 2.5: Give destination folder
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
[_ I 1
< Back
Ftnoh
Cancel
8.
dialog box.
T U
Happy Syslogging...
OK
9. To launch die K iw i Syslog S e rv e r C onsole move your mouse cursor to lower-left corner of your desktop and click S tart.
Q j
a free syslog server for Windows. It receives logs, logs. Windows. displays and forwards syslog messages from hosts such as routers, switches, U N IX hosts and other syslog-enabled devices.
10.
111
die
S ta rt
K iw i Syslog S e rv e r C onsole
to launch die
app
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
' *
C o n t r P a n e lol E / y k x e f
M o jiB *
ta n g le C h io m o
S i5 1 *9
C o m m a n d
N o t e p a d
x '
Jnmtdl
s^r1091
O
M )p w Y M a n a g e !
pr
N e !a u s w e bC lie n t
R
V
KKl Package
< k
C * -T
11. Configure Syslog alerts 111 die s n o rt.c o n f file. 12. To configure Syslog (press Ctrl+C).
a le rts ,
13. Go to C :\S n ort\etc and open die s n o rt.c o n f file widi N o tep ad + +. 14. Scroll down to S te p #6: C o n fig ure o u tp u t plugins, in the syslog section (Line 527), remove # and modify die line to o u tp u t alert_syslog:
h o s t= 1 2 7 .0 .0 .1 :5 1 4 , LOG _AUTH LOG ALERT.
* Additional configuration fo r s!:eclflc types or In sta lls * output alert_unlfled2: filename s n o rt.a le rt. U n it 128, n09ta*p * output loc_3n1 r 1 ea2 : niecaae snort. I 09, lu u t 128 , rostairp flog; LO O AJIg 100 ALERT| I output log.topdja I output aatarase: I output aatanse: t-< B03tnaa1e>
The reason why you have to run snortstart.bat batch file as an administrator is that, in your current configuration, you need to maintain rights to not only output your alerts to K iw i, but to write them to a log file.
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
C:\Sn0 rt\etcVsrxyt cof't Notepad- Filf fdt Sea rch V iew fw eSrfg . 1.^ flnqi Mam Run Pluqin W in do w
- g
13H . . & | *
fe| 3 c
-) | S Cv 3 )[)
013 **#**#****#**#*##*#**#*#*****#**#*#*#** pi4 # Step *: Coaflarare output plugins pis * For *ore information, see Snort Manual, Conflouring Snore - Output Modules 5
l output uniiieai: ile:;*e se;aec.ica, lu u t 128. nostanp, npls_e5 Additional configuration for specific types 0C installs 1 output alert_unlfled2: filename snort.alert. U n it 128, nostajip output log_unlfled?: fllenaae snort.log, lljtlt 128, nostaxp
database I output database! alert, <db_typ>, users<usernane> pa8avford=<pasv0rd> test dbnaa!e-< r.a1*e> h0st*< S10atnam e3 I output databasei log. <db_typ>. usera<usernane> password<passvord> test d bn as> es< naae> bot*<hostnaae>
U .
a .li M:l
15. S av e die tile and close it. 16. Open K iw i Syslog S e rv e r Syslog Server alert logs.
R* File Edit Vic*
C onsole
and press
C trl+T.
Kiwi Syslog Server (14 Day evaluation - Version 93) Hdp Di.pl., 00 |DrfJl]
1
'
1 E
it
Dale Tun* P-oly lla*lnm1 1 14 2012 1621 30 Lwal7.DU1g 127.0.01 Kiwi Sytloy S*1vv1 T*t< latfTtayw nuaibei 0001
1 1
J
1 0 0% 1MPH 1 6 2 1 11142012 1
17. Leave die Kiwi Syslog Server Console. Do not close die window. 18. Now open a command prompt with Snort and type diis command: press E n te r (here X is index number of vour Ediernet card) .
sn o rt iX - A co n so le - c C :\S n o rt\e tc\sn o rt.c o n f - I C:\Snort\log - K a s c ii - s
and
Etliical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
Administrator: C:\Windows\system32\cmd.exe
19. Open a command prompt 111 your Windows 8 virtual machine and type tins command: ping 1 0 .0 .0 .1 0 (IP address of your host machine where Kiwi Svslog Server Console is running). 20. Go to K iw i Syslog S e rv ic e M a n a g e r window (diat is already open) and observe die triggered alert logs.
Kiwi Syslog Server (14 Day evaluation - Ve'sion 93) File Edit 1 I n 1 x '
1 \
Help D.tpk* 00 (Dvfdull) 1 4 Days left in evDluotun llo1ln1 rw Menage 127.0.01 Nvv 14 18 40.12 W1N-2N9SIOSGIEN w.ort |1 384 6| ICMP INF: PING |CUticalion. Mbc activitf) [Piiuiily. 3] (ICMP) 10.0.0.12 1000.10 1 14 (1 11 WIN 2N9!iTOSGI( N mart |1 304 C| II Ml' INI 1 1I1NG [ClauArahor Mur. nohvilyl U1 .n..ly- 3] (ICHP) 1 1 1II 111? 127 001 Nnv 14 1 10.0.0.10 4 18:40:10 WIN 2N9STOSGIEN mort |1 384 6| ICMP INFO PING (ClMstficd'ion: M.sc 0 ct1vity| (Piioiily: 3) (ICHP) 10.0.0 1 2 127.0.0 1 Nov 1 10.0.0.10 12700 1 Nuv 14 18 40 O ') WIN ?NSS10SGIFN tnurt |1 384 6| ICMP INFO PING (nnii.:4l<ar Mac adivi() (Piimily 3] (ICMP) 10 0 0 1? 10 0 n 1 n 127 001 Nov 14 11 1 4 1 1 O il WIN 2N9!:TOSUK N no* |1 304 C| 1 ( MlINI II I1NG (Clou*ration Mur. nr.hvityl [1'im trijr 3) IIIMPI 10 0 111? I0.0.U.IU 127.0.0.1 Nov 1 4 18:40:07 WIN 2N9STOSGIEN tnort |1 384 6| ICMP4NF0 PING (ClMtWcatiwi: Hite activity (Plioiity: 3] (ICHP) 10.0.0 1 2 10.0.0.10 | IfMP INm PING (CUsifirolian Mbc activity) [Piitxily: 3] IICMP) 10 0 01? 1270 0 1 Nuv 14 10 40 on WIN-?N9r.1nSG1rN tnatl |1 384 G 1000.10 127.0.0 1 Nov 1 4 10:40:0b WIN 2N91>1USGILN *noit: |l. J84:b| ILMIINI U I1NG (Llasiiication: Hue nctivitvl H'noiity: 3 1 (ICHP) 10.0.0.12 10.0.0.10 4 18:40:04 WIN-2N9STOSGIEN tnort |1:384 6| ICMP-INF0 PING (Clactcation: Hite activity [Plioiity: 3 1 {ICHP) 10.0.0.12 127.0.0.1 Nov 1 10.0.0.10 12700 1 Nov 14 10 40 01 WIN-2N9r.TOSGIFN mart |1 384 C| ICMP-INFO PING [Claxiilicatian Mbc activity] [Pliaiity: 3] (ICHP) 10 0 01? 10 00.10 127.0.0.1 Nov 1 4 18:40:02 WIN 2N9S1USGIEN tnort: |l:384:6| ICMP INFO PING [Lla**41cat10n: Mac actovitrl [Pnonty: 3] (ICHP) 10.0.0.12 10.0.0.10 127.0.0.1 Nov 14 18.40:01 WIN-2N9STOSGIEN tr.ort. [1.384.6] ICMP-INF0 PING [Cla*tcation. Mbc activity] [Piioiily: 3) (ICHP) 10.0.0.12 10 00.10 127 0.01 Nov 14 18 40:00 WIN-2N9STOSGIEN snort [1 384 6j ICMP-INFO PIHG IClasirtcahon Mbc activity! [Piioiily: 3j ilCHP110 0 0 12 10 0 0.10 127.0.0.1 Nov 1 4 18:39:53 WIN 2N9510SGIEN snort |1:384:61 ICMP INFU PING [Clat*Scatin: Mnc acbvitrl [Prioiity: 3) (ICHP) 10.0.0.12 10.0.0.10 1270 0 1 Nov 14 18 39:58 WIN-7N9STC1SGIFN tnort [1 384 6| ICMP-INFO PING [CLmificalian Mbc activity] [Plioiity: 3] (ICMP) 10 0 012 1000.10 127 001 Nov 14 1039:57 WIN 2N9S10SGICN *nort |1 304 K| ICMP INFO PIHG ICUmrfirafiorv Mur. activityl [Pnoiitjr 3] IICMP110 0 0 12 10.0.0.10 127.0.0.1 Nov 1 4 18:39:56 WIN 2N9STOSGIEN *nort [1:384:6| ICMP INFO PING [***ificalior: Mbc activilrl [Plioiity: 3] (ICMP) 10.0.0.12 100* OMFH 1 8 :4 0 1 1 142D 12
A 88
J
*
II
j
|
21.
111 K iw i Syslog,
111
Kiwi Syslog
Service Manager. 22. You have successfully output Snort Alerts to two sources.
L a b A n a ly s is
Analyze and document die results related to diis lab exercise. Give your opinion on your targets security posture and exposure.
Ethical Hacking and Countenneasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
PLE A SE
TA LK
TO
Y O U R IN S T R U C T O R IF Y O U R E L A T E D TO T H IS LAB.
H A V E
Q U E ST IO N S
Information Collected/Objectives Achieved Output: The Snort alerts outputs listed 111 Kiwi Syslog Service Manager.
1. Evaluate how you can capture a memory dump to confirm a leak using Kiwi Syslog Server. 2. Determine how you can move Kiwi Syslog Daemon to another machine. 3. Each Syslog message includes a priority value at die beginning of the text. Evaluate die priority of each Kiwi Syslog message and on what basis messages are prioritized. Internet Connection Required Yes Platform Supported
0 Classroom 0 !Labs 0 No
Ethical Hacking and Countermeasures Copyright by EC-Council A ll Rights Reserved. Reproduction is Strictly Prohibited.
D e t e c t i n g U s i n g
Intruders a n d
W o r m s I D S
K F S e n s o r H o n e y p o t
K F S e n s o r is a W in d o w s b a s e d h o n e y p o t In tr u s io n D e te c tio n S y s te m ( ID S ) .
I C ON
KEY
L a b S c e n a r io
l ^ ~ / V a lu a b le
in fo rm a tio n T est your k n o w le d g e mm
W e b e x e rc is e
ca
W o r k b o o k r e v ie w
Intrusion detection systems are designed to search network activity (we are considering both host and network IDS detection) for evidence ot malicious abuse. When an IDS algontlmi detects some sort of activity and the activity is not malicious or suspicious, tliis detection is known as a false positive. It is important to realize diat from the IDSs perspective, it is not doing anything incorrect. Its algoridim is not making a mistake. The algontlmi is just not perfect. IDS designers make many assumptions about how to detect network attacks. A11 example assumption could be to look for extremely long URLs. Typically, a URL may be onlv 500 bytes long. Telling an IDS to look for URLs longer dian 2000 bytes may indicate a denial of service attack. A false positive could result from some complex e-commerce web sites that store a wide variety of information 111 the URL and exceed 2000 bvtes.
111 order to become an expert penetration tester and security administrator, you must possess sound knowledge of network intrusion prevention systems (IPSes), intrusion detection systems (IDSes), identity network malicious activity and log information, and stop or block malicious network activity.
L a b O b je c tiv e s
H Too ls
The objective of tins lab is to make students learn and understand IPSes and IDSes.
111 tins lab,
d e m o n s tra te d in th is lab a re lo c a te d a t D:\CEHToo ls\C E H v8 M o du le 17 Evading IDS, F ire w a lls , and H o n eyp o ts
Ethical Hacking and Countenneasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
KF S en sor
M o du le 17 E vading IDS,
M eg aP in g
M o du le 0 3 S can ning
N e tw o rk s \S c a n n in g T oo ls\M eg aP ing
It vou have decided to download latest of version ol these tools, then screen shots would be differ Administrative privileges to configure settings and run tools
L a b D u r a t io n
Time: 10 Minutes
O v e r v ie w o f IP S e s a n d ID S e s
An intrusion prevention system (IPS) is a n e tw o r k s e c u rity appliance that m o n ito rs network and system activities tor m a lic io u s activity. The main functions ot IPSes are to id e n tify malicious activity, log re la te d in fo rm a tio n , attempt to b lo c k /s to p activity, and report activity. An IDS is a software device or application that m o n ito rs network and/or system activities for m a lic io u s activities or p o lic y v io la tio n s and delivers re p o rts to a Management Station. It performs intrusion detection and attempts to s to p detected possible in c id e n ts .
^ TASK
C o nfigure K F S en so r
L a b T a s k s
1. Launch W in d o w s 8 virtual machine and follow the wizard-driven installation steps to install KFSensor. 2. After installation it will prompt to reboot die system. R ebo o t the system. 3.
111 Windows 8 launch KFSensor.
To Launch KFSensor move your mouse cursor to the lower-left corner of your desktop and click S tart.
Ethical Hacking and Countermeasures Copyright by EC-Council A ll Rights Reserved. Reproduction is Strictly Prohibited.
.'crla
C*e~s
= ____
To set up common ports KFSensor lias a set of pre-defined listen definitions. They are: Windows Workstation Windows Server Windows Internet Services Windows Applications Linux (services not usually in Windows) * Trojans and worms
m o
.
F IG U R E 3.1: KFSensor Window with Setup Wizard
4. In die S ta rt menu apps, right click die K F S en so r app, and click Run A d m in is tra to r at die bottom.
S ta rt
Admin
as
m
Vriro
m
Cam ara
Google Chrome
o
services
m
M essaging W eather
1 1 I a
Store
Mozilla Firefox
H
Calfrdar
&
Internet Fpfcvr
Command Prompt
KFSensor
FI
V \ V as; (S)
edm inh*rt r
tasoon
Up W izard ,
click N e xt.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
K F S e n s o rP ro fe s s io n a l -E v a lu a tio nT ria l
File View Scenario Signatures Settings Help_______________________________________
i l ?t!l U -L
a , kfsensor - iocalhos
z ta tcp
Visitor )atagram.. The KFSensor Set Up Wizard will take you through a number of steps to Donfigure you systen. All of these can configurations can be modfied later using the menj option. You m ight like to read the rrenual at this port to team how KFSensoworks and the concepts behind t. )atagram.. )atagram.. )atagram.. )atagram.. )atagram.. )atagram.. )atagram.. n the options in th& Set Up Wizard. Wizard Heb )atagram.. )atagram.. WindowsS WIN-ULY358K WIN-D39MR5J WIN-LXQN3W WIN-MSSELG WIN-2N9STO? WIN-2N9STO? WIN-ULY358K Windows^ WINDOWS8
q * ^ ic c c d T C^
g
2 1 FTP 53 DNS 63 DHCP SO IIS POP3 110 , g 119 NNTP M i RPC 1 35 139 NET Se
..__ Tlie Set up Wizard is used to perform the initial configuration o f KFSensor.
j S 25 SMTP. ! I I j. J L
LDAP 339 ^ HTTPS 443 $ i | J4. 5-NB. T-St< i 593 CIS jjj 1028 MS Cl! 5 g 1080 SOCKi 2234 Direct! 3 ( 1433 SQL S < j 3128 IIS Pro g 3268 Global Calal
Ser/en Status
Visitors: 0
6.
c la s s e s
Port classes to include: /j Windows Workstation @ Windows Applications @ Windows Server @ Windows Internet Services 0 Linux (services not usually in Windows) @ Trojans and woims KFSensor can detect irrtiusions on many many different ports and simulate different types of services. Domain Name is tlie domain name used to identify the server to a visitor. It is used in several Sim Servers.
These ports are grouped by class. Checked classes will be added to the scenario. Unchecked classes will be removed the scenario.
Wizard Help
<Back
Next >
Cancel
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
<Back
Next >
Cancel
It you want to send K F S en so r a le rts by email and then specify die email address details and click N e xt.
Set Up Wizard - EMail Alerts
systems service is a special type o f application that Windows runs in the background and is similar in concept to a U N IX daemon.
[I
If you want KFSensor to send alerts by email then fill in the email address details
Wizard Help
<Back
Next >
Cancel
and
N e tw o rk Pro to co l A n a ly ze r
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
Wizard Help
<Back
Next >
Cancel
.
F IG U R E 3.7: KFSensor Window with Setup Wizard-options
as sy s te m s e rv ic e
Wizard Help
The Ports View is displayed on the left panel o f the main window. It comprises o f a tree structure that displays the name and status o f the KFSensor Server and the ports on which it is listening.
<Back
Cancel
Up w izard .
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
There are a number of restrictions set forthe ten day duration of the evaluation period The export functionality is unavailable and the details of some events are deliberately obscured
/ The Ports View can be displayed by selecting the Ports option from the ViewTmenu.
<B a ck
Finish
Cancel
12. Tlie K F S en so r main window appears. It displays list ol ID protocols. V is ito r and R e ce iv ed automatically when it starts. 111 the following window, all die nodes 111 die left block crossed out with blu e lin es are die ports that are being used.
i i2 C
,
Settings
K F S e n s o rP ro fe s s io n a l -E v a lu a tio nT ria l H e lp
i @ 151a
Start 9/27/2012 5:27:41 PM... 9/27/2012 S:27:3S PM . 9/27/2012 5:27:36 PM... 9/27/2012 5:27:3C PM... 9/27/2012 5:27:15 PM... 9/27/2012 5:16:15 PM... 9/27/2012 5:15:4^ PM... 9/27/2012 5:15:35 PM... 9/27/2012 5:15:3 PM... 9/27/2012 5:15:35 PM... 9/27/2012 5:15:31 PM... 9/26/2012 3:41:32 PM... 9/26/2012 3:37:16 PM... 9/26/2012 3:36:57 PM... 9/26/2012 3:36:57 PM...
4 1 tt ;1
1 3
ID 1 5 |14 1 3
g '2
a!
Duration 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 Pro... UDP UDP UDP UDP UDP UDP UDP UDP UDP UDP UDP UDP UDP UDP UDP
^
Sens... Name Visitor WIN-ULY358K WIN-LXQN3\* WIN-MSSELCI WIN-D39MR5I Window^ Windows^ WIN-ULY358K] WIN-D39MR5I WINLXQN3'A WIN-MSSELCI WIN-2N9STO< WIN-2N9STO! WIN-ULY358K Windows^ WINDOWS8 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram... 138 NBT Datagram...
TCP
-g 80 IIS
111 10__
U 9 1 8 1 7 1 6
g
g g 5
443 HTTPS j 4.15 NBT SM 8 593 CIS 1028 MS CIS 1080 SOCKS 1433 SQL Server 2234 Dircctplay 3128 IIS Proxy 3268 Gtobdl Catal..
15 14 13
m?
1 1
^ ^ J
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
The top level item is the server. The IP address o f the KFSensor Server and the name o f the currently active Scenario are displayed. The server icon indicates the state o f the server:
14.
111 die
Microsoft W in d o w sC U ersion 6.2 8400] l< c> 2 0 1 2 Microsoft Corporation All rights reserved. |C:M Jsers\Adnin)netstat -an Rctive C onnections Proto Local A ddress Foreign A ddress T C P 0.0.0.0:2 0.0.0.0:0 T C P 0.0.0.017 0.0.0.0:0 T C P 0.0.0.0:9 0.0.0.0:0 T C P 0.0.0.0:13 0.0.0.0:0 T C P 0.0.0.0:17 0.0.0.0:0 T C P 0.0.0.0:19 0.0.0.0:0 T C P 0.0.0.0:21 0.0.0.0:0 T C P 0.0.0.0:22 0.0.0.0:0 T C P 0.0.0.0:23 0.0.0.0:0 T C P 0.0.0.0:25 0.0.0.0:0 0.0.0.0:0 T C P 0.0.0.0:42 T C P 0.0.0.0:53 0.0.0.0:0 T C P 0.0.0.0:57 0.0.0.0:0 0.0.0.0:0 T C P 0.0.0.0:68 T C P 0.0.0.0:80 0.0.0.0:0 T C P 0.0.0.0:81 0.0.0.0:0 T C P 0.0.0.0:82 0.0.0.0:0
State L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G
I 35
Command Prompt
E 3 |
T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P T C P
0.0.0.0:82 0.0.0.0:83 0.0.0.0:88 0.0.0.0:98 0.0.0.0:110 0.0.0.0:111 0.0.0.0:113 0.0.0.0:119 0.0.0.0:135 0.0.0.0:139 0.0.0.0:143 0.0.0.0:389 0.0.0.0:443 0.0.0.0:445 0.0.0.0:464 0.0.0.0:522 0.0.0.0:543 0.0.0.0:563 0.0.0.0:593 0.0.0.0:636 0.0.0.0:999 0.0.0.0:1024 0.0.0.0:1028 0.0.0.0:1080 0.0.0.0:1214
0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0 0.0.0.0:0
L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G L IS T E N IN G
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
1 6 . L e a v e d ie 17.
m
KF S e n so r
t o o l r u n n in g .
F o llo w
d ie w iz a r d - d r iv e n in s ta lla t io n s te p s t o in s ta ll M e g a P in g i n
Windows
T h e V is ito rs V ie w is
displayed o n the le ft panel o f the m ain w in d o w . I t com prises o f a tree structure th a t displays the nam e and status o f the K F S ensor Server and the visito rs w h o have connected to the server.
M egaPing
m o v e y o u r m o u s e c u r s o r to d ie lo w e r - le f t c o r n e r o f
y o u r d e s k to p a n d c lic k
Start.
MegaPing
a p p 11 1 d ie
S ta rt
m e n u apps.
Start
Mo/11la Firefox
Administrator
awane
Googfc
*
m
HTTPort 3.SNFM
6
Conmand Promp*
1 *
v/ogaPrv;
Notepad*
b y the K F S ensor Server is listed. T he visito r's IP address and d om ain name are displayed.
* S
M egaPing
a p p e a rs
as
show n
in
d ie
f o llo w in g
s c r e e n s h o t.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
2*
File View Tools Help
MegaPirvg (Unregistered)
I- n ' x
A A fl (3 JA A
DNS Lookup Name J ? Finger Network Time
= 5< 3 >4 * * * * n
DNS List Hods A, ______ DNS Ust Hosts Destnabon: <None> ^ DNS List Hosts Settings
A Pin9
|| ^ ^5 % ^ f '4^ V ^ J
Traceroute Whois Network Resources Process Info System Info IP Scanner NetBIOS Scanner Share Scanner Security Scanner Port Scanner Host Monitor
Select Al I Add
ca
Port S c a n n e r
fro m
l e f t s id e o f d i e lis t . d iis la b I P a d d r e s s is
E n te r d ie I P
a d d re s s o f
W indows 8 ( 1 1 1
10 .0.0.12
m a c h in e 1 1 1 w h i c h I v F S e n s o r is r u n n i n g 1 1 1 D e s t i n a t i o n A d d r e s s L i s t a n d c lic k
Add.
7
file Yiew Tools Help
MegaPing (Unregistered)
n ^ i
A a g ai A A o 3 % 4
A DNS List Hosts * DNS Lookup Name Finger Network Time
3 4 >
Port Scanner Settings TCP and UDP v | Start
Pol Scanner
A Pin9
22 Traceroute ^ Whois 3 Network Resources <$> Process Info .J | System Info ^ IP Scanner NetBIOS Scanner Share Scanner Security Scanner Host Monitor
100 0 .12
Seiect Al
Type Keyword
Description
Vw.
F IG U R E 3.16: MegaPing: Select 10.0.0.12 fro m H ost, Press Start button 23. C h e c k d ie I P a d d re s s a n d c lic k d ie
S ta rt
b u t t o n t o s ta r t lis t e n in g t o d ie
tr a ffic 0 1 1 1 0 .0 .0 .1 2 .
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
MegaPing (Unregistered)
i ti V
<$ 0
< *
ca
V is ito r is obtained by
Port Scanner
a reverse D N S lo o k u p on the visito r's IP address. A n ic o n is displayed in dicatin g the last tim e the v is ito r connected to the server:
10 .0 .0 .12
Destnation Address L ist Ho*
a t
al 1 0 .0 .0 .1 2
Type Keyword
Description
i. A S al 1*1 A #
DNS List Hosts Jj, DNS Lookup Name Finger J i Network Time t i p'"9 f f Traceroute Whols " 3 Network Resources <3> Process Info ^ System Info f IP Scanner ^ NetBIOS Scanner ^ Share Scanner Security Scanner } Host Monitor
2 2
IF
1 0 .0 .0 .1 2
Destination Address bat Host
ap
Select Al I Add
/ T h e V is ito rs V ie w is
lin ke d to the E ve nts V ie w and acts as a filte r to it. I f yo u select a v is ito r then o n ly diose events related to th a t v is ito r w ill be displayed in d ie E vents V iew .
0 S 1 0 .0 .0 .1 2
123 ^42 f 53
Descnption Risk High Telnet Elevated | Simple Mail Transfer Elevated Host Name Server Low Domain Name Serv... Low
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
r< $
file View Tools Help
MegaPing (Unregistered)
l- T 0 *
|4. A
jS,
aj it ti 4 % 3 3
t ti V 3 y
4 4 3
T h e events are sorted in e itlie r ascending o r descending chronological order. T h is is co n tro lle d by o p tio n s o n the V ie w M enu.
DNS List Hosts DNS Lookup Name ^ Finger a i Network Time Pin9 gg Traceroute ^ Whols 13 Network Resources Process Info ^ System Info $ IP Scanner NetBIOS Scanner jj* Share Scanner <0 Security Scanner Jgj Host Monitor Ports 080 / | 1214 1433 1494 JT 1801
100 0 .12
v Sop
Select fll
I * A
[ Delete Type Keyvwrd Descnption TCP socks Socks TCP TCP ms-sql-s M crosoft-SQLSer... TCP ica Citrix ICA Client TCP
EE
'
Bepoit
Windows 8 v i r t u a l
Settings Help
m a c liu ie a n d lo o k f o r T e ln e t d a ta .
!d a > a a lfc t * I
Duration Pro... TCP Sens... Name 23 Telnet
B *-J T C P
^ 0 Closed TCP Per 0 2 Death, Trojan ... 7 Echo - Recent... *I 9 Discard - Rec... ^ 15 Daytime - R... ^ 17 Quote of the.. ^ 19 chergcn R c. 21 FTP - Recent.. ^ 22 SSH - Recen... A 123 Telnet - Reel] j 25 SMTP - Rece.. g 42 WINS Rece.. g 53 DNS Recen.. ^ 57 Mail Transfer.. g DHCP Rece... 80 IIS Recent... j 8 1 IIS 81 - Rece.. 82 IIS 82 Rece.. 83 IIS 83 - Rece.. J Keiberos - R... ^
1 31
/ T h e events th a t are displayed are filte re d b y the c u rre n tly selected ite m in the P orts V ie w o r the V is ito rs V iew .
6 8 8 8
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
0-
Duration Pro...
Sens... Name
j -^ QC lo se dT C P P ofT r
Q 1 2 Death, Trojan ...| I 7 Echo - Recent... U 9 Discard - Rec...
& 13 Daytime - R...
E x it: Shuts d o w n the KF S ensor M o n ito r. I f the KF S ensor Server i f n o t installed as a systems service then it w ill be shut d o w n as w ell.
^ ^ ^ r=| g ^ g
17 19 21 22 23 25 42 53 57
6 8
Quote of the.. chargcn - Rc... FTP - Recent... SSH - Recen... Telnet Rec... SMTP - Rece.. WINS - Rece.. DNS - Recen.. Mail Transfer.. DHCP - Rece.. IIS 81 - Rece.. IIS 82 - Rece.. IIS 83 - Rece.. Kerberos - R... y
Ser/en Running Visitors: 8
80 IIS - R ecent...
j 8 1 ^ 82 j 83 =j
8 8
Lab Analysis
A n a l y z e a n d d o c u m e n t d i e r e s u lt s r e la t e d t o d i e la b e x e r c is e . G i v e y o u r o p i n i o n o n y o u r t a r g e t s s e c u r it y p o s t u r e a n d e x p o s u r e .
P L E A S E
T A L K
T O
Y O U R
I N S T R U C T O R T O T H I S
I F
Y O U L A B .
H A V E
Q U E S T I O N S
R E L A T E D
T o o l/U tility
I n f o r m
a tio n
C o lle c te d /O b je c tiv e s
A c h ie v e d
O u tp u t: K F S e n s o r
In fe c te d P o rt n u m b e r:
H o n e y p o t ID S
1080
N u m b e r o t D e te c t e d T r o ja n s : 2
I n te r n e t
C o n n e c tio n
R e q u ir e d
Y e s
N o
P la tf o r m
S u p p o r te d
C la s s r o o m
!L a b s
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
H T T P
T u n n e lin g
U s in g
H T T P o r t
K E Y
Lab Scenario
A tta c k e rs th e y c a n a tta c k e r a tta c k e rs p r e v io u s a re a lw a y s in a h u n t b y fo r IP c lie n t s th a t c a n to be e a s ily o r c o m p r o m is e d and e n te r y o u r n e tw o r k can a re la b , get a b le p a c k e ts to s p o o fin g a fir e w a ll tr a ffic dam age b y s te a l y o u r d a ta . T h e th e IP to a d d re s s . d o in It th e
T est to u t k n o w le d g e
th ro u g h
s p o o fin g have
c a p tu re can
n e tw o rk
as y o u
le a r n e d
th e y
p e rfo rm can
T r o ja n p ro v e to
a tta c k s , be
r e g is t r y fo r
a tta c k s , an
p a s s w o rd
W e b e x e r c is e
ca
h ija c k in g
W o r k b o o k r e v ie w
a tta c k s ,
e tc ., w h ic h
d is a s tr o u s to c a p tu re
o r g a n iz a t io n s and and
n e tw o rk . A n
a tta c k e r m a y u s e p a c k e t d a ta
a n e tw o rk to r e tr ie v e and
p ro b e
ra w
p a c k e t d a ta
t h e n u s e tin s r a w d e s t in a tio n IP
p a c k e t in fo r m a tio n p o rts ,
s u c h as s o u rc e header
a d d re s s , to L iv e
s o u rc e
d e s t in a tio n
f la g s ,
le n g th ,
c h e c k s u m . T im e H ence, as a
n e tw o rk
a d m in is t r a t o r fro m
e x tr a c tin g
in fo r m a tio n
c a p u ir e d
tr a ffic
such
as s o u rc e
d e s t in a tio n p o r t s , e tc . if an
a d d re s s e s , p r o t o c o l ty p e , h e a d e r le n g th , c o m p a re th e s e d e t a ils w i t h c a n a ls o m o d e le d c h e c k th e
s o u rc e
and
d e s t in a tio n to
a tta c k
s ig n a t u r e s
d e te r m in e
a tta c k ta k e
a t t a c k lo g s
t o r th e
lis t o t a tta c k s
and
be
fa m ilia r w it h s e c u r it y
th e
H T T P th a t
t u n n e lin g m ay n o t
te c h n iq u e be
b y w h ic h v is ib le
you by
id e n t if y
a d d it io n a l
r is k s
r e a d ily
c o n d u c tin g to w h ic h
s im p le n e t w o r k ID S
a n d v u ln e r a b ilit y
s c a n n in g a n d d e t e r m in e tr a ffic w id iin
th e e x te n t
a n e tw o rk
c a n id e n t if y
m a lic io u s
a c o m m u n ic a t io n
c h a n n e l . 111 t i n s l a b , y o u w i l l l e a r n H T T P
n u in e liiig u s in g H T T P o r t .
Lab Objectives
T in s la b w i l l s h o w y o u h o w and n e tw o rk s c a n b e s c a n n e d a n d h o w to use
HTTPort
HTTHost.
Lab Environment
1 1 1t h e
C E H Lab Manual Page 887
la b , y o u n e e d d ie H T T P o r t t o o l.
Ethical Hacking and Countenneasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
& Tools d e m o n stra te d in th is lab a re available in D:\CEHTools\CEHv 8 Module 16 Evading IDS, Firew alls and H oneypots
HTTPort
fro m
d ie lin k
h t t p : / / w w w .t a r g e t e d . o r g I f y o u d e c id e t o d o w n lo a d th e la te s t v e r s io n , t h e n s c re e n s h o ts s h o w n 111
t h e la b m ig h t d i f f e r In s ta ll H T T H o s t o n In s ta ll H T T P o r t o n F o llo w
W indow s 8 V
ir t u a l M a c h in e H o s t M a c h in e
th e w iz a r d - d r iv e n in s ta lla t io n
s te p s a n d
in sta ll it
t in s t o o l
a re r e q u ir e d t o r u n
Lab Duration
T im e : 2 0 M in u t e s
HTTP
and
TASK 1
Stopping IIS S erv ices
Lab Tasks
1. B e fo r e n u n iin g t o o l y o u n e e d to s to p
Web se rv ic e s
S e le c t
on
IIS Admin Service a n d World Wide W indows S erver 2008 virtual m achine.
n g lit -
c li c k a n d s e le c t
^
File A*on View H elp
Cff e d? H D
1Description
^Hum aT Interface D.. ^jHypet-V Data Exch.. ^jHypcr-V Gue*t JUl.. Enables ge... Provides a... Provides a... % H y p e rV Heartbeat... Monitors th. . Synchronc...
| Status
Started Started Started Started
I Startup Type
Disabled Automatic Automatic Automatic Automatic Aiitnmatif Disabled Disabled Disabled Automatic Disabled Manual Disabled Automatic Manual Disabled Manual Manual Disabled Disabled
1 og Cn As
Local Syste Local Syste Local 5yste Local Syste Local Syste I oral 5 y< t< * Local Syste Local Syste Local Syste__ I Local Syste Local Syste Local Syste Networks, Local Syste Local Syste Local Syste Local Syste Local Syste Local Servic Local Syste j j j j j I 1 I
G Q HTTPort c re a te s a tra n sp a re n t tunnel through a proxy serv e r o r firew all. This allow s you to u se all s o rts of Intern et so ftw are from behind th e proxy.
Description:
Enoblcs this uorvor to administer Web and FTP servces. If this service is stepped, the server will be unable to run Web, FTP, NNTP, or SNTP sites or configure 1 1 5 . If this service is disced, anv services chat expliatly depend on it will fail to start.
*^Hyper-V Time Sync... t^)HypwV 4 ^ IM A Pl CD'Burnirtg ... ^ In d ex n g Service ^ Intersite Messagng % IPSEC Services
% BM E3ESH"
P a u s e
Restart
..
S ta rte d
P"
Resume
^Kerberos Key Distri... 4 ^JJLC Remote Agent License Logging % Logical Disk Manager % Logic !Disk Manag... ^Messenger ^Microsoft Software ...
Al T asks Refresh
Properties
Help
^f&Net Looon Maintainsa. . Net.Tcp Port Sharin... Provides a... ^ NetMeeting Rerrot... Enables an... ^Network Connections \ Extended X Standard / Manageso... Started
Manual
Local Syste I
_ J
top servce IIS Adrm Service on Local Com puter
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
3.
S e le c t
& it b y p a sse s HTTPS and HTTP proxies, tra n sp a re n t a c c e le ra to rs, and firew alls. It h a s a built-in SOCKS4 server.
- - H
g? B
[ S i
Ser/ices (Local)
% Services (Local)
Name Stop the service Pause the service Restart the service Descript on: Provides Web connectivity and administration through the Internet Information Services Manager | Description | Status Started | Startup Type Manual Disabled Disabled Manual Manual Manual Disabled Started Started Automatic Manual Automatic Disabled Started Manual Automatic Manual Manual
1 LoqOnAs
Local Syste Local Syste Local Syste Local Servic Local Syste Local Syste Local Servic Local Syste Local Syste Local Syste Local Servic Local Syste Local Syste Local Servic Local Servic Local Servic Local Servic Local Syste Local Syste Local Syste
Termiial Services Alows user %Termhal Services S... Enables a. ^Themes Provides u. ^^UninterruptiblePow... Manages a.
i]
Provides s.
Volurre Shadow Copy Manages a, ^WebClient -nabtes W , Windows Autk ^Windows CardSpace ^Windows Firewal/I... ^Windows Imai Windows I n s t | ^ ^ ^ ^ ^ ^ ^ Windows Man ^Windows Pres ^ Windows Tim * % Windows Usei %w.nHTTPW et Wireless Conf % W M I Perform* ^ Workstation Manages a, Securely e. Provides n.
r 1
c . Kestd't
j 1
*
Refre*
Started
Properties
.. .. Started Started
Local SysteH l
< 1 \ Extencted / Standard / |Rop ser/ice Worid Wide Web Publishing Service on Local Computer
_____
v ir t u a l m a c h in e .
O p e n M a p p e d N e tw o r k D r iv e
CEH-Tools a t Z:\CEH-Tools\CEHv8 Module 16 Evading IDS, Firew alls and Honeypots. HTTHost
f o ld e r a n d d o u b le - c lic k
9 It su p p o rts strong traffic encryption, w hich m ak es proxy logging u se le ss, and su p p o rts NTLM and o th er a u th en ticatio n sc h e m e s.
6.
7.
O p e n th e A
h tth o st.ex e.
ta b . d ie p a s s w o rd .
HTTHost w
i z a r d w i l l o p e n ; s e le c t d ie
O ptions
8.
9.
Log C onnections
o p t io n a n d c lic k
Apply.
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
Allow a cc e ss f r o m : | 0 .0 . 0 . 0
n*****
P assthroug h un rec o g n ize d requests to: H o s t n a m e or IP: |1 27 .0 .0 .1 M a x . local b u f f e r : 1256K Port: |S 1 T im e o u ts : O r i g i n a l IP h e a d e r fiel |x-O rigin al-IP
| 0:1:2 ^[
Apply
R eu alid a te DNS n a m e s 1 L o g c o n n e c t i o n s
Stati stics | A p p l i c a t i o n lo g
:| s e c u r i t y ) S e n d a Gift )
HTTHost i n t a c t ,
a n d d o n t t u r n o i l
V i r t u a l M a c h in e . 11. N o w fro m s w i t c h t o W indows Server 2008 H ost M achine, a n d i n s t a l l H T D:\CEH-Tools\CEHv7 Module 16 Evading IDS, Firew alls and H oneypots. d ie w iz a r d - d r iv e n in s t a lla t io n s te p s . fro m T P o rt
12.
F o llo w
13. N o w
S tart
14. T h e
HTTPort w
in d o w
a p p e a r s a s s h o w n 1 1 1 t h e f o ll o w i n g f ig u r e .
H TTPort 3.SNFM
S y s te m P ro x y j P o rt m a p p in g | A b o u t ) R e g i s t e r )
U se rn a m e!
rR e m o t e
host
31
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
15.
S e le c t t h e m a c h in e .
Proxy
ta b a n d e n te r th e
H ost n am e
o r
IP ad d re ss
o f d ie ta rg e te d
& HTTPort g o es w ith th e predefined m apping "External HTTP proxy" of local port
16.
H e r e , as a n e x a m p le , e n te r d ie
ad d ress,
a n d e n te r
v ir t u a l m a c h in e
IP
1 7 . Y o u c a n n o t s e t d ie 18. 111
U sem am e
P assw ord
fie ld s . d ie ta rg e te d
Host
19.
H e r e a n y p a s s w o r d c o u l d b e c h o s e n . H e r e a s a n e x a m p l e t h e p a s s w o r d is
IE !* ]
P ro x y j p 0 rt m a p p in g | A b o u t | R e g is t e r j
1 80
I P ro x y re q u ire s a u th e n tic a tio n Passw o rd : U se rn a m e:
n F o r each softw are to create custom , g iven all the addresses fro m w h ic h it operates. F o r applications d ia t are dynam ically changing the po rts there S ocks4-proxy m ode, in w h ic h die softw are w ill create a lo cal server Socks (127.0.0.1)
M isc. o p tio n s U s e r- A g e n t: IE 6.0 B ypass m ode:
[ R e m o t e
host
j j
^ T h is b u tto n h e lp s
Port Mapping
ta b a n d c lic k
Add
t o c re a te
New Mapping.
In real world environm ent, people so m etim es u se passw o rd p ro te c te d proxy to m ake com pany em p lo y ees to a c c e s s th e Internet.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
* HTTPort 3.SNFM
S y s t e m | P ro x y
W '
J s jx f
P o r t m a p p in g j A b o u t j R e g is t e r j
0 R e m o te h ost
LED s: O P ro x y
Built- in S 0 C K S 4 s e r v e r
[7
R u n S O C K S s e r v e r (p o r t 1 0 8 0 )
Full S O C K S 4 s u p p o r t ( B IN D )
* T h is b u tto n h e lp s
a n d r ig h t - c lic k
New Mapping,
a n d s e le c t
Edit.
S y s t e m | P ro x y
P o rt m a p p in g j A b o u t j R e g is t e r j
p S ta t ic T C P / I P p o rt m a p p in g s (tu n n e ls )
* ------------------- I Edit H I ------------ 1 J
[ 0
Local p o r
0 R e m o te host r e m o t e .h o s t .n a m e 0 R e m o t e p ort
I....
H T T H o s t supports the
registration, b u t i t is free and passw ord-free - yo u w ill be issued a unique I D , w h ic h y o u can contact tlie supp ort team and ask y o u r questions.
LE D s: O P ro x y
Built-in S O C K S 4 s e r v e r [7 R u n S O C K S s e r v e r (p o r t 1 0 8 0 )
* T h is b u tto n h e lp s
Edit
23. N o w
a n d e n te r a
a n d s e le c t
r ig h t - c lic k to
to
Edit Edit
a n d r e n a m e i t as
24.
R em ote port
n o d e to
a n d e n te r d ie p o r t v a lu e o f
21.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
Tools d e m o n stra te d in th is lab a re available in D:\CEHTools\CEHv 8 Module 16 Evading IDS, Firew alls and H oneypots
S y s te m | Pro x y
P o rt m a p p in g | A b o u t | R e g is t e r |
S ta t ic T C P / I P p o rt m a p p in g s (tu n n e ls )
E| L o cal p ort
1-21
3 1
g 0
21
O P ro x y
E u ilt in S O C K S 4 s e r v e r W R u n S O C K S s e r v e r (p o r t 1 0 8 0 )
* T h is b u tto n h e lp s
H In th is kind of environm ent, th e fed e ra ted s e a rc h w eb p art of M icrosoft S earch Server 2008 will not w ork out-ofthe-box b e c a u s e w e only su p p o rt non-passw ord p ro te c te d proxy.
S ta rt
o i l d ie
Proxy
ta b o f H T T P o r t t o m n d ie H T T P
t u n n e lin g .
HTTPort 3.SNFM
S y s te m P r o x y | P o rt m a p p in g | A b o u t ) R e g i s t e r )
]Txi
ji o . o . o . :
I-
U se rn a m e:
110.0.0.: 110.0.0.3
j J < T h is b u tto n h e lp s
[80
I****
F IG U R E 4.9: H T T P o rt to start tunneling 26. N o w s w i t c h t o W indows Server 2008 A pplications log t a b . C h e c k d i e la s t lin e . I f p ro p e d v . v ir t u a l m a c h in e a n d c lic k d ie
27.
t h e n i t is r u n n i n g
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
: : H T T H o s t 1 .8 .5
Application log: M A IN HTTHOST 1,8,5 PERSO N A LG IFTW A RE D EM O starting M A IN Project codename: 99 red balloons M A IN Written by Dmitry Dvoinikov M A IN (c) 1999-2004, Dmitry Dvornikov M A IN 64 total available connection(s) M A IN network started M A IN RSA keys initialized M A IN loading security filters... M A IN loaded filter "grant,dll" (allows all connections within M A IN loaded filter "block,dll" (denies all connections withir M A IN done, total 2 filter(s) loaded M A IN using transfer encoding: PrimeScrambler64/SevenT grant.dll: filters conections .block,d.ll,:_ iIters conection.s------LISTEN ER: listening at 0,0,0.0:80]
I 1
28. N o w
S ta t is tic s A p p l i c a t i o n lo q
1 .................
[ O p tio n s S e c u r ity Send a G if t |
ON
d ie
29. 30.
New
Rule
Fib Anon View
in d ie r ig h t p a n e o f d ie w in d o w .
tec
M
N?C c e :c r -!
B Moniwing
I fa
ire | EIT5 Peercan r c CContentOut] BITS Pee1 cccirg J,',SC-Cut) <9 1 CtertfarNFSCrCP-Out) * 'Cle-tf0rNFS(u:O-Ojt) ut) <9 Core Networking - DNS (LDPO core Networking - Dynamic M ost Configuratl... 0 1Core Networking - Group Poky (LSASS-Out) Core Networking Group aoicy (NP-Out) ilCore Networking - Group Poky ^TCP-O ut} Core Networking - lrtenet GroupManager!,.. * CorNetworking IPv6 (P*5-Out) Co*e Networking Multicast LStener Co e (I... Core Networking Multeot Latener Query (... O Core Networking Mjtaot Latener Report... Core Networking Mjtcaot Lotenc Report... Cor Networking NeiJW Discovery A dve .. * cor# Networking negroor Dlieovery solat. . <3 Core Networking Packet Too Bo 0CMPv6 c f N t>vg1 luno P. aC'-T... Cf Core Networking Router Adverfcjement (IC... &Core Networking Router Solctator !ICM P... Core Networking 'ereoo (UDP-Out) cor* Networking ' it# Exceeded (tCVPi/6 .. DtetrbcteCT'ranseCttonCootdinaioi (TCP-Oui) Fife and Prrte Sharhj (Edo Request ICM... f il'fe and Frrte Sharog (Eco Reqjest - ICM... File and Prrte Snarng (N B-06tagam-0ut) File and Prrte inarng (NBAsme-Out) Pile and Frrte Snarrg (NB-Sesscr-Cut) @ Fife and Frrte SharhQ (SMBOut) a Hvper/ -WM! fTCP-OuO HyperVManagercntClients W M I (TCPOut) ut) iSCSI Ser/ce (TCPO NR-UDP-CUt) !NetworkDeco'/ery (LLM G 'Oup BITS seecodino BITS 3ee'CBching dent far NFS Cient 'or NFS coe \etA0r<re Coe setAorxrc Coe NctworMX Ce 'ctAorxrc Ce 'ct.or<rc Cae \* t\or<1 s Cae ^tAcryrg C0 e MftAOhcrc Cae Nfctftorxrc Cae >1^0^>? Coe sctAorxr^ Coe \* t\or<r5 Co r\#meryrc C0e NttAOhcrc C' Nitncrwe Cae Net^orxrg Cae NetAoncrg Cae \etA 0ncrg Cae \#tA0 r<rc Dst!1txj:ec T ansae tor cocrd Fie and Prrter Shorrc Fie and Prrter Slrrg Fie and Prrter Sfarrg Fie and Prrter Sfarrc Fie and Prrter st-arrc Fie and Prrter Sfcarrc Hyser-V H/dc-VKfarogen*ent Cients SCSI Sen oe Network ^sccwr/ .... 1 nofle 1 Enabled Ary No fr y No Ary ves Ary ves Ary *es Ary ve? Ccnar ves Ccnar ves Ccnar v Ary try fir y v Arr vea Ary Tea Ary V e1 Ary ve firy fit)y *es vt Amy Ary Ve3 Ary ves Ary ,M firy firy N O Ccna... Yea Ccna... ves Ccna... ves Ccna... ves Ccna. . ves Dons... ^es Pry V C 5 Ary V C 5 Ary No Ccna... No 1 Action A IIoa *JIoa *JI0A A IIoa A IIoa flllO A A J Ioa A IIoa A IIoa A IIoa A IIoa A IIoa A IIoa A IIoa A IIoa A IIoa A llO A A IIoa A IIoa A IIoa A IIoa A IIoa A IIoa A IIoa A IIoa A J Ioa A IIoa A IIoa A IIoa A IIoa A IIoa aJI0A A J Ioa A IIoa 1 p-~ Sv V t St % % % % a: 5\ A l A 1 A f A r A r A ! A r__| A 1 A l A 1 V, A r % A 1 A r s> s> s\ Si H Outbound Rules [jg NeARic V V 7 ] Fiterbv P 0fil= Fiterbv Sate Fitr bv 5 quo
& Tools d em o n stra te d in th is lab are available in Z:\ Mapped N etw ork Drive in Virtual M achines
$ Re'resr Export ue
Hep
F IG U R E 4.11: W indows Firewall w ith Advanced Security w in d o w it! W indow s Server 2008 31. 111 t h e
s e c d o n a n d c lic k
c h e c k d ie
Port
o p t io n in d ie
Rule Type
Ethical Hacking and Countenneasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
a Rule Type
H H T T P o r t d oesn't really care f o r d ie p ro s y as such, it w o rks perfecdy w id i firew alls, transparent accelerators, N A T s and basically a nything drat lets H T T P p ro to c o l through.
* * *
(ff
r
p ort
P re d e fin e d :
Rule that controls connections for a Windows experience.
C Custom
Custom lule.
Next >
in th e
s e c t io n .
Steps: S Yo u need to install htthost on a PC, who is generally accessible on the Internet typically your "home" PC. This means that if you started a Webserver on the home PC, everyone else must be able to connect to it. There are two shows toppers for htthost on home PCs
Rule Type
<* Protocol and Ports
TCP or UDP^
<
tcp
*
#
udp
Does this rule apply to all local ports or specific local ports' [< C A ll lo c a l p o rts
j
| Example: 8 0 .4 4 3 .1
S p e c ific lo c a l p o rts :
< Back
||
Next >
Cancel
Action
s e c t io n , s e le c t
Block th e co nnection
:m d c lic k
Next.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
1** New O utbound Rule Wizard 1 A c t io n 1 Specify the action thatistaken when a connection matches the conditions specified n the rule. Steps: # Rule Type '//hat action should be taken when a connection matches the specified conditions
_x]
m NAT/firewall
issu e s: You need to en ab le an incom ing port. For HTThost it will typically be 80(http) or 443(https), but any port c a n be u sed IF th e HTTP proxy a t w ork su p p o rts it - so m e proxys a re configured to allow only 80 and 443.
C A llow th e co n n e ctio n
Alow connections that have been protected with IPsec as well as those that have not.
Require th e conn e ctio n s to be e ncypted Require pnvacy m addtion to rtegnty and authentication
< Back
||
Next
||
Cancel
o p t io n s . T h e
m le
w i l l a p p ly
to :
& Tools d e m o n stra te d in th is lab a re available in D:\CEHTools\CEHv 8 Module 16 Evading IDS, Firew alls and H oneypots
Back
Next
Cancel
Port 21 B locked
111 d ie
Name
fie ld , a n d c lic k
Finish.
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
N am e
Specify the name and description of this rule Steps: 4 4 Rule Type Protocol and Ports Action Profie Name Description (optional): Name: |Port 21 Blocked
T h e default T C P p o rt
fo r F T P co n n e ctio n is p o rt 21. Sometim es the local In te rn e t Service P rovider blocks this p o r t and this w ill result in F T P conn ection issues.
< Back
Finish
Cancel
Port 21 Blocked
is c r e a t e d a s s h o w n i n d i e f o l l o w i n g f i g u r e .
j=iir
Fie Action View Help ^ VVtnco/i* Fretval Advanced S t3 Iroourc Rdes : - : ; . :: Come:t>an Sca*1ty Rue5 Outbound Rules -
H T T P o r t doesn't really care fo r d ie p ro x y as such: it w o rks pe rfe ctly w ith firew alls, transparent accelerators, N A T s and basically anything d ia t lets the H T T P p ro to c o l through.
F% r io n i1aix )
e r / o r k 1n o T e r e d o(U O P O u t) gCcreN
Q H T T P is the basis fo r
W e b surfing, so i f yo u can free ly s u rf d ie W e b fro m w here yo u are, H T T P o r t w ill b rin g yo u die rest o f the In te rn e t applications.
Cere Networking Time Exceeded (ICM \6. .. Dotibcted Treroacfon Cooidnator (TCPOut) File and *inter Shwng (Echo Request ICM... File and *inter Sharng (Eco Request - !CM... t t n i e and *inter Sharing (NBDalogorrOjt) W e and W inter shjrng (NB-Name-Out) File and *inter Sharng (NE-Sessan-Out) File and *inter Sherhg (SMB-Out)
H yp e/* V / M Ia c p o u t)
Any Any Any Ant Any Any Am Dom ain Donain Dooain Any Any Any Any Any Any Any Any Any Any Any Any Any Any Any Donai.. Donai... Donai... Donai.. Donai.. Donai... Any Any Any
No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Y #S Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes No
AIoa AIoa AI0A AIch a AIoa AIc t a AIoa AI0a AIoa Alow Alovs A Iga A Ioa A Ioa AIc a A Ioa AIoa AIoa A Ioa Alovs Alovs Alovs Alev. AIoa Alovs Alovs AIoa Alea Alovs AIoa Alovs AI0a AIoa
"\7 Fiter by State *7 Fiter by Group view [($] Refresh |3 Export List... Q Heb
A 1 A r A l A r A 1 A 1 A r A 1 % A r * A r A r 5\ 5\ Sy 5\ c
x
Q
Delete
la l P lO U C It o Heto
Properties.
Ethical Hacking and Countemieasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
* WVuwkyws h rm
Pile Acoor
Ve
B HTTPort th en
* ! [P1U T T _
P Whdovts Frevrdl <vth Ad.oxed S KQ !rbourdRjbs gg Outbound Rjtes Jiu Correcton Secjnt/ 3_ies SITS Peercecihg (Content-Out) 3 Monito'irg BIT5 Pcer^ecihg (WSD-Out) C ien t St 1 TS (TCP-Out) C fent *6 NFS (UDP-Out) CCKer\e:vcrkirg -CNS (UDP-Out) Cxe he:vcrkirg -Dynarrlc host Conflcu ati... C x e r e akirg -Gouo Poky (LSASS-Out) Q c x e networking -GrouoPolcy (I'P-Out) O core hecwcrkirg -Grouo poIcy (TCP*Ou:) core ser/>crk]ra -internet Group r^anacen. cofefcetv/crkira -ipvO OPVft-OuO c o re her/ak ra -Mj :as: Listener Dons a... Core se:vcrlurQ Miticas: Listener Query (... Coretservcrk rg Miticast listensr Re!rt... Coreiservcrk rg Miticas; listener Re!rt... CoreNe;vcrk rg Neghto Discovery Adve... C o re Nerverkro Nefchbof Discovery Solicit... Core IServcrk rg Packet Too GCMPv *... Car# N#rverkng Pr*^#tf Problem (ICMP... Car# N erv< erkrg Ranter Aev#rticemM (IC. . Car# N#rv!erk rg Ranter Solicitation (ICVP... v# Nerv/erkirg Teredo (UDP-Out) ^ C ore Ne? crlurg Tire Exceeded (ICNP6/ ... D crbuted Transa:ton Coordinator (TCP-Out) (J =le and 3rirter Sharrg (Ecno Request - ICM... Fie 3rd ^irter Snarrg (Ecno Request - ICM... =le 3rd 3rirter ^arrg (NE-DatagramOut) (J -ie 3rd 3rirter Sharng (MB-Name-Out' @iFle and 3rirter Sharng (NE-Session-Out F ie 3rd 3rirter Sharng (SMB-Out; Hyper-V - V YN I (TCP-Out} (J Hyper-V Naiogc-ncnt Clients V/MI (TCP-Out) !SCSI Service (TCP-Out) Outbound Rules
NewRule...
,? FIter by Pcfie
V Fiterb yStete
V
Core W L\*K1 ^' Core NetAOikng Daren Dcman Dorian FlterbyGroio
vew
id ReYesh Q Export bst... tisb
C J C
1 0 1 1 1 1 1 1 8 0 6 1 1 1
D te* p c P C tt)C 3
UH b
Ary
& E nables you to byp ass your HTTP proxy in c a s e it blocks you from th e Internet
Ary
M o m M o m M o m M o m M o m
Mom
5 or i e current seleccn.
_______; _______
P rotocols and P orts t a b . C h a n g e d i e R em ote Port Specific P orts a n d e n t e r d i e Port num ber a s 21.
d e f a u l t s a n d S e le c t
o p t io n to
39.
L e a v e d ie o d i e r s e ttin g s as d i e ir
Apply ^OK.
& With HTTPort, you c a n u se various In ternet so ftw a re from behind th e proxy, e.g., e-mail, in stan t m e sse n g e rs, P2P file sharing, ICQ, N ew s, FTP, IRC e tc . T he b asic idea is th a t you s e t up your In tern et so ftw are
Computes
Advanced
l
|.A II Ports
zi d
1
FMmn1 an m anan Remote port: ]Specific Ports
I2 1
Exam ple: 80.445. 8080 Internet Control Message Protocol (ICMP) settings: ---
ftp 127.0.0.1
111 th e c o m m a n d p r o m p t a n d p re s s
c o n n e c t i o n is b l o c k e d a t d i e lo c a l h o s t 1 1 1
Etliical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.
o p e n a c o m m a n d p r o m p t 111
ftp ftp.certifiedhacker.com
a n d P re s s
h o s t m a c h in e a n d
IC:\Users\Adninistrator>ftp ft p .c e r t ifie d h a c k e r. con Connected to ftp .ce rtifie d Jh a c k e r.co n . 220-hicrosoft FTP Seruice 220 IJelcopte TO FTP Account User Cftp.certifiedhacker.con:<none>>: _
2^7 H T T P o r t makes it
possible to ope n a clie n t side o f a T C P /IP co nn ection and p ro vid e i t to any software. T h e keyw ords here are: " clie n t" and " any softw are".
Lab Analysis
D o c u m e n t a ll d ie I P a d d re s s e s , o p e n p o r t s a n d r u n n i n g a p p lic a tio n s , a n d p r o t o c o ls y o u d i s c o v e r e d d u r i n g t h e la b .
P L E A S E
T A L K
T O
Y O U R
I N S T R U C T O R T O T H I S
I F
Y O U L A B .
H A V E
Q U E S T I O N S
R E L A T E D
T o o l/U tility
I n f o r m
a tio n
C o lle c te d /O b je c tiv e s
A c h ie v e d
P r o x y
s e r v e r
U s e d :
1 0 .0 .0 .4
T T P o r t
P o r t
s c a n n e d :
80 c o n n e c te d to 1 2 7 .0 .0 .1
R e s u lt:
ftp
1 2 7 .0 .0 .1
Ethical Hacking and Countermeasures Copyright by EC-Council All Rights Reserved. Reproduction is Stricdy Prohibited.
Questions
1. H o w w o u ld y o u s e t u p a n H T T P o r t t o u s e a n e m a il c lie n t ( O u t lo o k , M e s s e n g e r , e tc .)? 2. E x a m in e i f th e s o ftw a r e d o e s n o t a llo w e d itin g th e a d d re s s t o c o n n e c t to .
I n te r n e t
C o n n e c tio n
R e q u ir e d
Y e s S u p p o rte d
N o
P la tfo r m
iL a b s
Ethical Hacking and Countenneasures Copyright by EC-Council All Rights Reserved. Reproduction is Strictly Prohibited.