Chapter 12: Session Hijacking Flashcards

1
Q

Session Hijacking

A

intercepting a legitimate connection and taking over

attacker can assume role of user or simply monitor the traffic for opportune times to inject or collect traffic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Session and Session ID

A

agreed-upon duration where client and server are vetted and authenticated

The alphanumeric sequence that uniquely identifies the session is the session ID or session token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

*** Categorizing Session Hijacking (3)

A

1) BRUTE-FORCING AN ID //guessing an ID
2) STEALING AN ID //through sniffing
3) CALCULATING AN ID //calculating a valid session ID simply by looking an existing one and figuring out sequence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Spoofing VS Hijacking

A

Spoofing //pretend to be someone, but does not take over session

Hijacking //takes over existing active session

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

*** Session Hijacking process (5)

A

1) SNIFFING //sniff traffic between the two ends
2) MONITORING //observe flow of traffic
3) SESSION DESYNCHRONIZATION //break the session between the two
4) SESSION ID PREDICTION
5) COMMAND INJECTION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Levels of Session Hijacking

A

Can take place at NW layer (TCP/UDP) or at a higher level, the APP layer (HTTP/FTP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

*** Attack vs Passive Attacks

A

Active attack //taking over connection as own; this usually causes DoS on legit client;

Passive attack //monitor traffic between user and server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

*** Type of Session IDs (3)

A

1) EMBEDDED IN A URL //web apps use GET request to follow links embedded in a web page; An attacker can easily browse through victim’s browsing history and gain access by entering the URL of a previously browsed web app
2) EMBEDDED AS HIDDEN FIELD //forms for inputting user data sometimes include a hidden field that is used for sending a client’s session ID
3) COOKIES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

*** Types of Application Level Session Hijacking (4)

A

1) SESSION SNIFFING //finding the session token and gaining access
2) PREDICTING SESSION TOKENS //gathering a few session IDs already used
3) MiTM ATTACK
4) MiTM BROWSER ATTACK //common forms include cross-site scripting (XSS), trojans, and javascript issues;

//XSS - data entering a web app through an untrusted source

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Types of Cross-Site Scripting (or XSS) attacks (2)

A

1) STORED XSS ATTACKS //hacker places code on a target server where victim wishes to access; When victim makes request from server, the script executes
2) REFLECTED XSS ATTACKS //injected code is bounced off a web server (typically a user will click a link executing code)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define Dynamic Content

A

any type of content generated on the fly; i.e. user makes a request, which is sent to server; server interprets request and returns data in form of web page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Session Fixation Attack

A

Web application attack; exploits vulnerabilities in the way session IDs are managed; May mean Session IDs are not regenerated as often as they should be; Vulnerability exists when app fails to create a new session ID for a new user;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Techniques to execute session fixation attack

A

1) session ID sent o victim in HYPERLINK
2) victim tricked, login form maybe developed by attacker
3) Using tag
4) HTTP header response uses server response to fix session ID in browser;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Techniques for Session Hijacking attacks

A

1) BLIND HIJACKING //a type of session hijack in which attacker cannot capture return traffic; attacker blindly injects malicious packets w/ out seeing effect
2) IP SPOOFING //attacker acts as legit user
3) SOURCE ROUTING //ensures injected packets are sent via a selected routing path
4) DNS SPOOFING //alter target IP address mappings in an effort to direct the target traffic to an address the attacker specifies;
5) ARP CACHE POISONING //remember ARP is responsible for translating MAC addresses to IP or vice versa (RARP, reverse ARP);

//ARP cache poisoning overwrites victim’s ARP cache, redirecting traffic to an inaccurate physical address mapping (usually the attacker’s machine)

6) DESYNCHRONIZING THE CONNECTION //breaking the linear sequence between victim and host, giving attacker room to jump in; (i.e. attacker tracking connection; he injects large volume of NULL packets to host, this in turn increments the sequence #s of the host packets w/ out them knowing; he has desynchronized the connection and has staged the host packet sequence # to a predictable count based on how many null packets he sent)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

*** Types of Network Session Hijacking (3)

A

1) TCP/IP SESSION HIJACKING //attack on a TCP session, attempt to predict sequence #s, if successful attacker can inject packets that are “in equence”; Each packet in a conversation over TCP increments by 1; Attacker spoofs IP address (acts as legit user)
2) MiTM //#1 session hijack attack; places attacker directly between victim & host; This type of attack looks much different from the other attacks (the other attacks are T-shaped & the original connection between victim & host is not interfered, whereas for MiTM attack, the connection is re-routed from victim, to attacker, to host [[forming a upside down triangle]])
3) UDP Session Hijacking //easier to hack than TCP bc it doesn’t use sequencing for its packets; UDP is a connectionless protocol meaning it doesn’t esablish a verifiable connection between client and host; Same concept though where goal is to fool the victim into thinking the attacker is the server; attacker must get response to client before host does;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Performing an MiTM attack

A

Page 543

Windows CMD

-t //command keeps running until stopped

ping [host or IP] -t //continuously ping host until stopped

On backtrack
arpspoof -i eth0 -t TARGET_IP HOST_ID //arp poison //the HOST is who the TARGET will think you are

*** When doing this attack, you have to do arpspoof twice, the second time around, you have to exchange the TARGET & HOST IDs

***Ping poisoned host after ARP POISON is successful. If it’s successful, you will get “request timed out”, in order to make this work

Forward the traffic in backtrack
echo 1 > /proc/sys/net/ipv4/ip_forward

17
Q

Countermeasure for Session Hijacking

A

1) ENCRYPT NW TRAFFIC
2) USE NW MONITORING TOOLS: IPS OR IDS
3) CONFIGURE APPLIANCES, SUCH AS GATEWAYS
4) MAINTAIN BROWSER: clear cache, history, update patches
5) STRONGER AUTHENTICATION SYSTEMS such as Kerberos
6) Use of tools such as IPSec (Internet layer security) or SSL (security between web browser and server)
7) DEFENSIVE TECHNOLOGIES

18
Q

What is easier to hijack: Local LAN or External/Switched NWs?

A

Local LAN

19
Q

An ethical hacker sends a packet with a deliberate and specific path to its destination. What technique is the hacker using?

A) ip spoofing
B) source routing
C) arp poisoning
D) host routing

A

B) Source Routing

20
Q

Session hijacking can be performed on all of the following protocols except which one?

a) FTP
b) SMTP
c) HTTP
d) SSL

A

D) SSL

21
Q

XSS is typically targeted toward which of the following?

a) web apps
2) email clients
c) web browsers
d) users

A

c) web browsers; XSS is targeted toward web browsers and can take advantage of defects in web applications and
browsers.

22
Q

A session hijack can be initiated from all of the following except which one?

a) emails
b) browsers
c) web apps
d) cookies and devices

A

d) cookies and devices, cannot initiate from cookies