Tải bản đầy đủ (.pdf) (22 trang)

Slide kiểm thử xâm nhập chương 5 ATTACK

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (603.87 KB, 22 trang )

.c
om

cu

u

du
o

ng

th

an

co

ng

ATTACK

CuuDuongThanCong.com

/>

.c
om

Contents


ng

 Exploitation

co

 Password attack

ng

th

an

 Client-side exploitation

cu

u

du
o

 Social engineering

CuuDuongThanCong.com

/>

.c

om

1. Exploitation
 In the exploitation phase of the pentest, we run exploits against the

cu

u

du
o

ng

th

an

co

ng

vulnerabilities we have discovered to gain access to target systems.

CuuDuongThanCong.com

/>

.c
om


Metasploit Payloads
 payloads: payloads allow us to tell an exploited system to do things on

co

ng

our behalf

th

an

Two popular types of shells:

du
o

ng

 Bind shells: the target machine opens up a communication port or a

cu

u

listener on the victim machine and waits for an incoming connection

CuuDuongThanCong.com


/>

.c
om

Metasploit Payloads
 Reverse shells: A reverse shell is a type of shell in which the target

co

ng

machine communicates back to the attacking machine. The attacking

cu

u

du
o

ng

th

an

machine has a listener port on which it receives the connection


CuuDuongThanCong.com

/>

.c
om

Types of payload
 Staged Payload: setup a network connection between the attacker and

co

ng

victim and are designed to be small and reliable. Staged payloads allow us

th

an

to use complex payloads without requiring a lot of space in memory

cu

u

du
o

ng


 Eg: windows/shell/reverse_tcp

CuuDuongThanCong.com

/>

.c
om

Types of payload
 Inline Payloads (single): A single payload containing the exploit and full

co

cu

u

du
o

ng

th

an

 Eg: windows/shell_reverse_tcp


ng

shell code for the selected task.

CuuDuongThanCong.com

/>

.c
om

Types of payload
 Meterpreter: It is loaded directly into the memory of an exploited

co

ng

process using a technique known as reflective dll injection.

th

an

 It runs inside the memory of the host process.

du
o

ng


 Meterpreter also uses Transport Layer Security (TLS) encryption for

cu

u

communication between it and Metasploit

CuuDuongThanCong.com

/>

.c
om

2. Password attack
 Online Password attacks: we can use scripts to automatically attempt to

co

ng

log in to services and find valid credentials.

th

an

 We’ll use tools designed for automating online password attacks or


ng

guessing passwords until the server responds with a successful login.

cu

u

du
o

These tools use a technique called brute forcing

CuuDuongThanCong.com

/>

.c
om

Password attack
 Wordlists: Before you can use a tool to guess passwords, you need a list

co

ng

of credentials to try. If you don’t know the name of the user account you


an

want to crack, or you just want to crack as many accounts as possible, you

du
o
u
cu

through

ng

th

can provide a username list for the password-guessing tool to iterate

CuuDuongThanCong.com

/>

.c
om

Password attack

ng

 User Lists: determine the client’s username scheme.


co

 Password Lists: a list of possible users

th

an

/>
du
o

ng

/>
cu

u

root@kali:~# hydra -L userlist.txt -P passwordfile.txt 192.168.20.10 pop3

CuuDuongThanCong.com

/>

cu

u

du

o

ng

th

an

co

ng

.c
om

Password attack

CuuDuongThanCong.com

/>

.c
om

Password attack
 Offline Password attacks: Another way to crack passwords (without

co

ng


being discovered) is to get a copy of the password hashes and attempt to

cu

u

du
o

ng

th

an

reverse them back to plaintext passwords.

CuuDuongThanCong.com

/>

.c
om

Password attack
 John the Ripper: One of the more popular tools for cracking passwords is

cu


u

du
o

ng

th

an

co

ng

John the Ripper. The default mode for John the Ripper is brute forcing

CuuDuongThanCong.com

/>

.c
om

 Dumping Plaintext Passwords from memory with windows Credential

cu

u


du
o

ng

th

an

co

ng

editor:

CuuDuongThanCong.com

/>

.c
om

3. Client-side exploitation
 Bypassing Filters with metasploit Payloads: in your pentesting career,

co

ng

you may encounter clients with all sorts of filtering setups. Even a reverse


an

connection may not be able to get through the filters and connect back to

ng

th

your attack machine on just any port.

u
cu

connect to

du
o

 The Metasploit reverse_tcp_allportspayloads can help us find a port to

CuuDuongThanCong.com

/>

.c
om
ng
co
an

th
ng
du
o
u
cu
CuuDuongThanCong.com

/>

.c
om

Browser Exploitation:
 Web browsers are made up of code to render web pages. Just as we can

co

ng

send malformed input to server software, if we open a web page with

an

malicious code to trigger a security issue, we can potentially hijack

cu

u


du
o

ng

th

execution in the browser and execute a payload.

CuuDuongThanCong.com

/>

.c
om
ng
co
an
th
ng
du
o
u
cu
CuuDuongThanCong.com

/>

.c
om


PDF Exploits
 A target has an outdated version of Adobe Reader 8.1.2 installed that is

co

ng

subject to CVE-2008-2992.

th

an

 If a user can be enticed to open a malicious PDF in a vulnerable viewer,

cu

u

du
o

ng

the program can be exploited

CuuDuongThanCong.com

/>


.c
om

4. Social engineering
 Social-engineering attacks can involve complex technical requirements or

co

ng

no technology at all.

th

an

 the social-engineer toolkit: TrustedSec’s Social-Engineer Toolkit (SET),

ng

an open source Python-driven tool, is designed to help you perform social-

du
o

engineering attacks during pentests.

cu


u

 SET will help you create a variety of attacks such as email phishing

campaigns and web-based attacks

CuuDuongThanCong.com

/>

cu

u

du
o

ng

th

an

co

ng

.c
om


SET

CuuDuongThanCong.com

/>


×