Docsity

Understanding & Preventing Session Hijacking & Brute Forcing: Session ID Security, Slides of Computer Networks

Partial preview of the text

Download Understanding & Preventing Session Hijacking & Brute Forcing: Session ID Security and more Slides Computer Networks in PDF only on Docsity!

Outline

– What are Session IDs?

– Security Problems with Session IDs

– An Emerging Threat - Brute Forcing Web Session ID’s

– Notable News Items

– Fun Exploitation Examples

– 6 Common Problems

– General Protection Measures

  • Users
  • Vendors
  • Developers

– Resources

Web Applications Logins

Session ID Overview

• HTTP is stateless protocol

• Rather than make a user authenticate upon

each click in a web application, a sense of

“state” is created

• In order to maintain state, a shared string,

token, or secret between HTTP client and

server is usually used by developers

• Essentially, authentication data

(username/password) exchanged for “Session

ID”

Web State Attacks

• Session Replay

– A traditional replay attack in the cryptography sense is an

attack in which a valid data transmission is maliciously or

fraudulently repeated, either by the originator or by an

adversary who intercepts the data and retransmits it.

• Session Hijacking

– Seizing control of a legitimate user's web application

session while that user is “logged in” to the application

Session ID Overview

• While it is generally clear that

username/password pairs are indeed

authentication data and therefore sensitive, it

is not generally understood that session IDs

are also just as sensitive because of their

frequent use for authentication. See RFC 2964

(Use of HTTP State Management).

Session ID Overview

• Session IDs are commonly stored in cookies

and/or URLs, and hidden fields of web pages

(or some combination)

• Session ID generated by WEB SERVER (IIS, etc.)

when the user first hits the site or by WEB

APPLICATION (ATG dynamo, Apache Tomcat,

BEA Websphere, .jsp, .asp, perl, etc.) when the

user logs in

Cookie Refresher

• Cookie Refresher (RFC 2965)

1.) domain: The website domain that created and that can read the variable. 2.) flag: A TRUE/FALSE value indicating whether all machines within a given domain can access the variable. 3.) path: Pathname of the URL(s) capable of accessing the cookie from the domain. 4.) secure: A TRUE/FALSE value indicating if an SSL connection with the domain is needed to access the variable. 5.) expiration: The Unix time that the variable will expire on. Unix time is defined as the number of seconds since 00:00:00 GMT on Jan 1, 1970. Omitting the expiration date signals to the browser to store the cookie only in memory; it will be erased when the browser is closed. (expires July 27, 2006) 6.) name: The name of the Session ID variable (in this case Apache). 7.) value: The value of the Session ID variable (in this case 64.3.40.151.16018996349247480 ).

www.redhat.com FALSE / FALSE 1154029490 Apache 64.3.40.151.

Cookie Stored Session ID Examples

.www.ibm.com TRUE /rc FALSE 1293768100 sauidp p0010000000006DCC 000591992.003F75FEF

.yahoo.com TRUE / FALSE 1271361612 B 3qpaarsu48dai&b=

.amazon.com FALSE / FALSE 1026115299 session- id

.ebay.com TRUE / FALSE 1183296824 lucky8 694036

.starwars.com TRUE / FALSE 1341753778 Wookie- Cookie

13fe8fff4799f27dcf19c959dafa

.yahoo.com TRUE / FALSE 1154029490 I ir=9p&in=4aweec66&i1=AFABCl

.yahoo.com TRUE / FALSE 1154029490 PU t=

Session IDs in HTML Hidden Fields

<FORM METHOD=POST ACTION="/cgi-

bin/bankonline.cgi">

<input type="hidden"

name="sessionID" value=”abcde1234”>

<input type="hidden"

name="useraccount" value=”673-

<input type="submit" name="Access My

Bank Information">

Session ID Security Overview

Session ID security is a microcosm of Web Application Security.

Web Application Security cuts through many different aspects of an organization’s information security infrastructure

An Example: Brute Forcing Session ID’s in URLS

http://www.123greetings.com/view/AD

http://www.123greetings.com/view/AD

http://www.123greetings.com/view/AD

http://www.123greetings.com/view/AD http://www.123greetings.com/view/AD

As we start to associate that the date we sent these

electronic cards on was July 25 at 12:21 PST, we can

start to eliminate some more entropy out of this session

ID (07251221). Notice then that we’re left with five

incrementing “random” digits at the end of the URL.

http://www.123greetings.com/view/AD http://www.123greetings.com/view/AD http://www.123greetings.com/view/AD http://www.123greetings.com/view/AD http://www.123greetings.com/view/AD

An Example: Brute Forcing Session ID’s in URLS

AUTOMATED DEMO!

In the News

– “Privacy hole found in Verizon Wireless

Web site “ Computerworld, Sept 6, 2001.

http://www.computerworld.com/securitytopics/security/privacy/story/0,10801,63587,00.html http://online.securityfocus.com/archive/1/

– https://www.app.airtouch.com/jstage/pl

sql/ec_navigation_wrapper.nav_frame_di

splay?p_session_id=3346178&p_host=ACTI

ON

URL Example: Brute Forcing Register.com

Thank you for using register.com's Domain Manager.

To change or re-enter your password, please copy and paste the URL below into the "Location" or "Address" field of your web browser and hit the 'Enter' key on your keyboard.

Note: If your e-mail program supports HTML, you may be able to click on the link below.

http://mydomain.register.com/change_password.cgi?

Note: Above link will be expire within three days