Offensive & Defensive & Forensic Techniques for Determining Web User Iden<ty



Similar documents
Offensive & Defensive & Forensic Techniques for Determining Web User Iden<ty

Installing The SysAidTM Server Locally

Privacy- Preserving P2P Data Sharing with OneSwarm. Presented by. Adnan Malik

IceWarp to IceWarp Server Migration

Kaseya Fundamentals Workshop DAY THREE. Developed by Kaseya University. Powered by IT Scholars

SSMS Built in Reports for Server and Database Monitoring

Measure What Matters. don t Track What s Easy, track what s Important. kissmetrics.com

Version of this tutorial: 1.06a (this tutorial will going to evolve with versions of NWNX4)

Stellar Phoenix. SQL Database Repair 6.0. Installation Guide

FileMaker 13. ODBC and JDBC Guide

Technology Foundations. Conan C. Albrecht, Ph.D.

SysPatrol - Server Security Monitor

Cloud Backup Express

Aradial Installation Guide

Defending Computer Networks Lecture 6: TCP and Scanning. Stuart Staniford Adjunct Professor of Computer Science

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

Data Management in the Cloud: Limitations and Opportunities. Annies Ductan

STORAGE SYSTEM DATALOGGER DATABASE

Can Cloud Hos+ng Providers Really Replace. Your Cri(cal IT Infrastructure?

STABLE & SECURE BANK lab writeup. Page 1 of 21

This presenta,on covers the essen,al informa,on about IT services and facili,es which all new students will need to get started.

Network Monitoring Tool with LAMP Architecture

Thick Client Application Security

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

The SkySQL Administration Console

MSSQL quick start guide

insync Installation Guide

Populating Your Domino Directory (Or ANY Domino Database) With Tivoli Directory Integrator. Marie Scott Thomas Duffbert Duff

Domain Name System. Heng Sovannarith

Example of Standard API

Installation and Deployment

FileMaker 12. ODBC and JDBC Guide

Querying Databases Using the DB Query and JDBC Query Nodes

SharePoint Capacity Planning Balancing Organiza,onal Requirements with Performance and Cost

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Agile BI with automated, real-time Data Collection

Administrator s Manual

EVault for Data Protection Manager. Course 361 Protecting Linux and UNIX with EVault

ConvincingMail.com Marketing Solution Manual. Contents

Application Monitoring using SNMPc 7.0

USER GUIDE MANTRA WEB EXTRACTOR.

Connecting to your Database!... 3

Log Analyzer Reference

The Web Pro Miami, Inc. 615 Santander Ave, Unit C Coral Gables, FL T: info@thewebpro.com

Advanced Web Security, Lab

TSM Studio Server User Guide

Sisense. Product Highlights.

DiskPulse DISK CHANGE MONITOR

STEALTHbits Technologies, Inc. StealthAUDIT v5.1 System Requirements and Installation Notes

Embarcadero Performance Center 2.7 Installation Guide

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

HELP DESK MANUAL INSTALLATION GUIDE

A Brief Overview of the Mobile App Ecosystem. September 13, 2012

IceWarp Server Upgrade

Decryption. Palo Alto Networks. PAN-OS Administrator s Guide Version 6.0. Copyright Palo Alto Networks

Migrate Topaz databases from One Server to Another

FileMaker 14. ODBC and JDBC Guide

Installation Guide For Choic Enterprise Edition

How To Test The Bandwidth Meter For Hyperv On Windows V (Windows) On A Hyperv Server (Windows V2) On An Uniden V2 (Amd64) Or V2A (Windows 2

CSCI110 Exercise 4: Database - MySQL

There are numerous ways to access monitors:

inforouter V8.0 Server Migration Guide.

E-Commerce: Designing And Creating An Online Store

NoSQL replacement for SQLite (for Beatstream) Antti-Jussi Kovalainen Seminar OHJ-1860: NoSQL databases

CEFNS Web Hosting a Guide for CS212

Introduction To Computer Networking

Bitrix Site Manager ASP.NET. Installation Guide

RingStor User Manual. Version 2.1 Last Update on September 17th, RingStor, Inc. 197 Route 18 South, Ste 3000 East Brunswick, NJ

Easy Setup Guide 1&1 CLOUD SERVER. Creating Backups. for Linux

2/24/2010 ClassApps.com

Easy Data Centralization with Webster. User Guide

Lab 3.4.2: Managing a Web Server

Honeycomb Crea/ve Works is financed by the European Union s European Regional Development Fund through the INTERREG IVA Cross- border Programme

Getting an ipath server running on Linux

MS Enterprise Library 5.0 (Logging Application Block)

UAB Cyber Security Ini1a1ve

N-CAP Users Guide Everything You Need to Know About Using the Internet! How Firewalls Work

FileMaker 11. ODBC and JDBC Guide

INTEGRATING MICROSOFT DYNAMICS CRM WITH SIMEGO DS3

Web Analytics Understand your web visitors without web logs or page tags and keep all your data inside your firewall.

March 10 th 2011, OSG All Hands Mee6ng, Network Performance Jason Zurawski Internet2 NDT

Ulogd2, Advanced firewall logging

REST (Representa.onal State Transfer) Ingegneria del So-ware e Lab. Università di Modena e Reggio Emilia Do<. Marzio Franzini

Power Tools for Pivotal Tracker

Version 1.7. Inbound Integration (POP3 and IMAP) Installation, Configuration and User Guide. Last updated October 2011

Cloud Server powered by Mac OS X. Getting Started Guide. Cloud Server. powered by Mac OS X. AKJZNAzsqknsxxkjnsjx Getting Started Guide Page 1

Install MS SQL Server 2012 Express Edition

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

What is Web Security? Motivation

SECURING APACHE : THE BASICS - III

Deploying the BIG-IP System v10 with Oracle Application Server 10g R2

Kony MobileFabric. Sync Windows Installation Manual - WebSphere. On-Premises. Release 6.5. Document Relevance and Accuracy

FREQUENTLY ASKED QUESTIONS

Startup guide for Zimonitor

configurability compares with typical SIEM & Log Management systems Able to install collectors on remote sites rather than pull all data

configurability compares with typical Asset Monitoring systems Able to install collectors on remote sites rather than pull all data

Setting Up Your Android Development Environment. For Mac OS X (10.6.8) v1.0. By GoNorthWest. 3 April 2012

Written by: Johan Strand, Reviewed by: Chafic Nassif, Date: Getting an ipath server running on Linux

Oracle Database 10g Express

Database Maintenance Guide

Transcription:

Offensive & Defensive & Forensic Techniques for Determining Web User Iden<ty Part 3 Zachary Zebrowski zak@freeshell.org Approved for Public Release: 12-3046. Distribu<on Unlimited 1

All materials is licensed under a Creative Commons Share Alike license. http://creativecommons.org/licenses/by-sa/3.0/ 2

Forensics Outline Forensic Database Analysis Forensic Log Analysis Introduc<on to Real Time Analysis Not my forte, thus an introduc<on. Included for completeness. Caveats & Ques<ons 3

Basic Outline of Approach Triage the data sets you re provided and look for most important databases. We assume that you get more than one database and that the databases are related Host & convert the database to Unicode. Create a new summary database of important fields & process the informa<on Search tool sugges<ons Dealing with Murphy 4

Triage Make sure the data makes sense and that you were given the right data files. Iden<fy important databases Iden<fy important tables within the databases 5

Hos<ng the data Remember, you have no control of the data. You can t ask for advice why some sebngs were used. The data can come in fast and furious, or slow The data can come in many formats SQL dumps or Raw data files. Oracle MSSQL MySQL MS Access MS Excel files Csv / Text / Other The data may have viruses. Do not run an)virus on the data un)l it s been processed so you can extract info anyways from the files that may have valuable content in addi)on to the viruses. Be sure you are on an isolated network. Impor<ng the data into MySQL is good, because it s a fast server. 6

Hos<ng the data, con<nued. First, be sure to afribute where the data came from & why before you start processing it. Nothing is worse than having a non- afributable copy of data. You don t want to be the one who tells the Boss you cannot use the data in court because you don t know where it came from. Next, backup the data Backup the data to another loca<on one you ve copied it locally to your data staging computer. 7

Hos<ng the data, con<nued. Afempt to host the data on a database server. The data might be in an old data format. Try to use a system that handles this. Note that for MySQL data, the Linux version of the MySQL server is a lot more forgiving than the Windows version of the MySQL server. Not really sure why. The data might be in a character set that you are not expec<ng. You might need to use special commands to import it. You may need to repair tables if they don t contain rows. Aher you ini<ally load the data, if you determine something is majorly wrong, don t be afraid to re- import the data. You may need to fix permissions on the database depending on the database version. 8

Hos<ng the data, con<nued Allow for bogus data. In the absolute worse case there is always vi (or emacs or notepad) to manually extract data. It actually works. 9

Convert to Unicode Why convert the data to Unicode? Unicode allows mul<ple character sets to be treated as one. Now that you ve hosted the data, convert it to Unicode, via convert.pl script. What s the character set of a given document? Ask your web browser to render it. It might guess correctly. If it doesn t, the data might be corrupted. You may need to reload the data into the database using a different character set. Alterna<vely, you need to pre- process the data to convert using a different character set. Or try changing the OS to a different one. 10

Processing informa<on from the Unicode database to a new database Extract the priority fields only and import them into a new database. Store or just note where the secondary informa<on is in a full text index of some sort. (Consider Lucy library on CPAN.) Index the data as the users have requested. Don t be afraid to create computed indexes Soundex, lower case only, etc. Create a secondary view using html for browsing the en<re database. Also useful for sharing informa<on external to your organiza<on. When this is a priority. 11

Recover deleted informa<on 12

Recover Deleted Informa<on Student ID First Last 1 Lisa Simpson 2 Bart Simpson 3 Millhouse Van Houten Student ID Quiz ID Grade 1 1 100 2 1 75 3 1 85 1 2 100 2 2 50 3 2 78 13

Recover Deleted Informa<on Assume that Bart s name is deleted, you s<ll have the grades for him. Thus, you can probably figure out who is who, for certain cases. This is not easy to do, and it s even worse when there keys are reused. But, it s possible, and can contain valuable informa<on. 14

Search Tool Sugges<ons Do not make the search engine overly complex. Search the data first. Everything else (proper<es of files, images, etc.) is secondary. Let the user quickly search through as many types of data as needed as fast as possible. (Think Google search). Use exis<ng technology when possible. Use available API s to exis<ng search engines or write a script... Allow the user to stay in your app as much as possible. Use mail box methodology to allow the user to view results as results become available. Mul<ple servers are good. One per major type of data One for constant files e.g., JavaScript or images. One for full text index server One for database server. Uninstall mlocate. 15

Murphy So many different stories Try to make sure people are on the same page before the crisis hits, so you know which systems are cri<cal to avoid powering off the wrong system over the weekend. Tape down any loose wires as needed. Assume file systems will fail (running out of inodes, bad hdd ) Move one off systems to a produc<on facility as soon as feasible. Assume hard drives will fail have backups. Assume CPUs will fail have backups. Assume power will fail have (working) UPS s. Assume code will break have dev, staging, and produc<on copies of data & apps. Don t short change development / staging / backup hardware. 16

Sanity Checking Sanity check at various points. Check the encodings to make sure it makes sense at cri<cal points. Use IE or another browser to verify that it looks ok If you are not sure, run text through transla<on sohware as a sanity check that it could be valid text. When first looking at a schema, make sure it makes logical sense to you. If possible, ask someone who knows what the data is. When you have finished processing, run a sanity check script before releasing to users. 17

Generalizing Be careful to start generalizing from the start. Only start aher you have enough data. You may be generalizing the wrong thing. 18

Let s take a break! Ques<ons? Next up: Log Analysis & Real Time Analysis 19

Forensic Log Analysis Much of the summaries in the previous sec<on pertaining to databases remain the same Triage & Tracking Convert to Unicode Search Tool Sugges<ons Murphy Sanity Checking Let s focus on what s different. 20

Log Analysis What s different You re given data that won t immediately import into a database If you need to see just what a par<cular user does, consider using grep. Otherwise, consider wri<ng a database schema for simple log formats. Details follow! 21

Using Grep Problem you want to see all ac<vity from a given IP Address from logs You can use grep to extract all lines that contain that ip address from your log files Eg: grep 130.215.10.1 * For all files in your current directory, return all lines that have string 130.215.10.1 in the line 22

Using Grep You can also extrac<ng a user s ac<vity via basic authen<ca<on username Eg. grep zaz * For all files in the current directory, return all lines that have zaz in the line. 23

Crea<ng a SQLite db of logs First download SQLite ( hfp://www.sqlite.org ). Start: sqlite3 log.db For a web log: CREATE TABLE LOG( date varchar (50), Virtual_host varchar(50), url varchar(50), Remotehost varchar(50), Response_length varchar(50), Unknown varchar(50), hfp_response_code int ); CREATE INDEX X on LOG(remotehost); 24

Crea<ng a SQLite db of logs, part 2.separator.import log.txt LOG Select dis<nct(remotehost) from log; # or other SQL query 25

Sample 26

Real Time Analysis It s rare that you can do this legally. Generally, companies / university's prohibit this. Privacy issues. Note There are courses that go into much deeper analysis than what we re doing. 27

tcpdump / wireshark analysis Wireshark is a graphic tool that allows you to visualize tcpdump data. You can visually decode various protocols (hfp / pop, etc). tcpdump is a Unix tool that allows you to look at all traffic on a given Ethernet port. This assumes that you have permission to run this command generally, it needs to be installed & configured as an administrator. See hfp://danielmiessler.com/study/tcpdump/ 28

TCP dump info You ll see real <me incoming / outgoing packets for your host You ll need to store the output to packets You ll need to search the captures. You can then search for a (random packet) in the noise. The previous methods for searching various techniques (database, grep, etc.) to find that packet 29

Commercial Tools There are mul<ple commercial tools that do real <me analysis. Google for various tools. Some tools (at various price points): NetWitness Solera 30

Ques<ons? Ask other people for answers that are befer than mine. Only 2 more slides, no break! J 31

Caveats Internet security is a huge field. There will always be new afacks & defenses I was unable to share an afack that I wrote with you because newer version of Tor successfully prevent the afack. There will always be security conferences. 32

Ques<ons? 33