Brainfoldb4u's Blog

Just another WordPress.com weblog

Archive for the ‘Auditing’ Category

Where do popular browsers and Chat applications store their passwords

Posted by brainfoldb4u on March 16, 2010

I got this question raised in an interview with Google “Where do browsers and popular messengers store their password” I kind of wondering for an answer to this questions. After some search i found answers for those question which i thought of sharing it with you all.

Fact is major browsers and applications tend to store the password in a way to hide/prevent you from altering it. Even by knowing the location its hard to move it from one machine to another.

Google Chrome:

Google chrome browser stores the password in windows machine at [Windows Profile]\Local Settings\Application Data\Google\Chrome\User Data\Default\Web Data.

Google Chrome uses SQLite as the storage space for passwords and other web page related critical data’s. Google done a appreciate work by extracting windows specifif code from the cross-platform stuff. The only Windows specific code here is the encryption function, which can easily be ported by creating a different Encryptor object for each OS. The important piece here is CryptProtectData, which is a Windows API function for encrypting data. Data encrypted with this function is pretty solid. It can only be decrypted on the same machine and by the same user that encrypted it in the first place

For more technical explanation click here :  how Google chrome stores password

Mozilla Firefox

The passwords are stored in one of the following filenames: signons.txt, signons2.txt, and signons3.txt (depends on Firefox version) These password files are located inside the profile folder of Firefox, in [Windows Profile]\Application Data\Mozilla\Firefox\Profiles\[Profile Name] Also, key3.db, located in the same folder, is used for encryption/decription of the passwords.

Firefox is much better than Internet Explorer in terms of managing “remembered” logins. In Internet Explorer, there is no built-in feature where you can manage or view your saved login information. That’s why you need third party tools to reveal the passwords hidden under asterisks. As for Firefox, you can access remembered passwords with a few clicks.

To view your remembered passwords in Firefox browser, go to Tools, and click on Options. Go to Security tab and click on the Show Passwords button. A remember password dialog box will appear. Click on the Show Passwords button again and a new column with password will appear.

Upon clicking the saved password location (tools-options-security-saved passwords), you won’t need any tools to reveal the hidden passwords under asterisks. It’s a feature that’s included in Firefox browser. So any one who has access to your work station can typically spy into your password by going around to security tab in the options location.
One useful tool that worth sharing about Firefox browser password management  is “Firepassword” . FirePassword is the console tool designed to decrypt the username and password list from Firefox sign-on database. Firefox records the login details such as username and password for every website authorized by the user and stores them in the sign-on database file in encrypted format.  It works on similar line as Firefox’s built-in password manager but it can be used as offline tool to get the username/password information without running the Firefox. It is DOS based and the manual says that FirePassword requires only 3 files which is key3.db, cert8.db and signons.txt. This 3 files can be found in Firefox profile directory.

All you need to do is place the 3 files together with FirePassword and run FirePassword.exe. Weirdly, I am able to decrypt all my username and password by copying ONLY the signons.txt file. Looks like it’s not necessary to include the other 2 files.

For detailed technical explanation click here

Internet Explorer > 7.0 (hope you all have updated from version 6.0):

  • Auto complete passwords are stored under Registry under HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\IntelliForms\Storage2.
  • Documents and Settings\Application Data\Microsoft\Credentials is the credential file location used to save  HTTP authentication passwords

An automatic tool that used to retrieve IE password is IE PassView can be used to recover these passwords

Opera: The passwords are stored in wand.dat filename, located under [Windows Profile]\Application Data\Opera\Opera\profile

Safari: Safari stores password data via Keychain. /Applications/Utilities/Keychain Access (on Mac)

On PC, All that data is stored in plist files at: C:\Documents and Settings\(UserName)\Application Data\Apple Computer\Safari

I believe it is FormValues.plist

ThunderBird: The password file is located under [Windows Profile]\Application Data\Thunderbird\Profiles\[Profile Name] You should search a filename with .s extension.

Google Talk: All account settings, including the encrypted passwords, are stored in the Registry under HKEY_CURRENT_USER\Software\Google\Google Talk\Accounts\[Account Name]

MSN Messenger version 7.x: The passwords are stored under HKEY_CURRENT_USER\Software\Microsoft\IdentityCRL\Creds\[Account Name]

Windows Live Messenger version 8.x/9.x: The passwords are stored in the Credentials file, with entry name begins with “WindowsLive:name=”. These passwords can be recovered by both Network Password Recovery and MessenPass utilities.

Yahoo Messenger 7.5 or later: The password is stored in the Registry, under HKEY_CURRENT_USER\Software\Yahoo\Pager – “ETS” value. The value stored in “ETS” value cannot be recovered back to the original password

Posted in Auditing, Browser Security, Google, Security tools, vulnerability assessment | Tagged: | 1 Comment »

sqlmap: Open source pentest tool

Posted by brainfoldb4u on March 15, 2010

sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of back-end database servers. It comes with a broad range of features lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out-of-band connections.

sqlmap features

Features implemented in sqlmap include:

Generic features

  • Full support for MySQL, Oracle, PostgreSQL and Microsoft SQL Server back-end database management systems. Besides these four database management systems software, sqlmap can also identify Microsoft Access, DB2, Informix, Sybase and Interbase.
  • Full support for three SQL injection techniques: inferential blind SQL injection, UNION query (inband) SQL injection and batched queries support. sqlmap can also test for time based blind SQL injection.
  • It is possible to provide a single target URL, get the list of targets from Burp proxy requests log file or WebScarab proxy conversations/ folder, get the whole HTTP request from a text file or get the list of targets by providing sqlmap with a Google dork which queries Google search engine and parses its results page. You can also define a regular-expression based scope that is used to identify which of the parsed addresses to test.
  • Automatically tests all provided GET parameters, POST parameters, HTTP Cookie header values and HTTP User-Agent header value to find the dynamic ones, which means those that vary the HTTP response page content. On the dynamic ones sqlmap automatically tests and detects the ones affected by SQL injection. Each dynamic parameter is tested for numeric, single quoted string, double quoted string and all of these three data-types with zero to two parenthesis to correctly detect which is the SELECT statement syntax to perform further injections with. It is also possible to specify the only parameter(s) that you want to perform tests and use for injection on.
  • Option to specify the maximum number of concurrent HTTP requests to speed up the inferential blind SQL injection algorithms (multi-threading). It is also possible to specify the number of seconds to wait between each HTTP request.
  • HTTP Cookie header string support, useful when the web application requires authentication based upon cookies and you have such data or in case you just want to test for and exploit SQL injection on such header. You can also specify to always URL-encode the Cookie header.
  • Automatically handle HTTP Set-Cookie header from the application, re-establishing of the session if it expires. Test and exploit on these values is supported too. You can also force to ignore any Set-Cookie header.
  • HTTP Basic, Digest, NTLM and Certificate authentications support.
  • Anonymous HTTP proxy support to pass by the requests to the target application that works also with HTTPS requests.
  • Options to fake the HTTP Referer header value and the HTTP User-Agent header value specified by user or randomly selected from a text file.
  • Support to increase the verbosity level of output messages: there exist six levels. The default level is 1 in which information, warnings, errors and tracebacks (if any occur) will be shown.
  • Granularity in the user’s options.
  • Estimated time of arrival support for each query, updated in real time while fetching the information to give to the user an overview on how long it will take to retrieve the output.
  • Automatic support to save the session (queries and their output, even if partially retrieved) in real time while fetching the data on a text file and resume the injection from this file in a second time.
  • Support to read options from a configuration INI file rather than specify each time all of the options on the command line. Support also to save command line options on a configuration INI file.
  • Option to update sqlmap as a whole to the latest development version from the Subversion repository.
  • Integration with other IT security open source projects, Metasploit and w3af.

Fingerprint and enumeration features

  • Extensive back-end database software version and underlying operating system fingerprint based upon inband error messages, banner parsing, functions output comparison and specific features such as MySQL comment injection. It is also possible to force the back-end database management system name if you already know it.
  • Basic web server software and web application technology fingerprint.
  • Support to retrieve the DBMS banner, session user and current database information. The tool can also check if the session user is a database administrator (DBA).
  • Support to enumerate database users, users’ password hashes, users’ privileges, databases, tables and columns.
  • Support to dump database tables as a whole or a range of entries as per user’s choice. The user can also choose to dump only specific column(s).
  • Support to automatically dump all databases’ schemas and entries. It is possibly to exclude from the dump the system databases.
  • Support to enumerate and dump all databases’ tables containing user provided column(s). Useful to identify for instance tables containing custom application credentials.
  • Support to run custom SQL statement(s) as in an interactive SQL client connecting to the back-end database. sqlmap automatically dissects the provided statement, determines which technique to use to inject it and how to pack the SQL payload accordingly.

Download:

Click here to download

Posted in Auditing, Open Source, Penetration testing, Security tools | Tagged: | Leave a Comment »

Router audit check list-ISO 27001

Posted by brainfoldb4u on March 15, 2010

Routers are increasingly an enterprises first and continued line of defense. As Router become more complex, streamlining the audit process, and ensuring risks and clutter are not injected into the rule base becomes an significant task. Below is the audit check list from ISO 27001 for auditing routers. ISO 27001 audit program covers the following area.

Router Policy

Disable Unneeded Services

Password Encryption

Authentication Settings

Administrator Authentication

Management Access

Route Protocol Security

Configuration Maintenance

Router Change Management

Router Redundancy

Log monitoring and Incident Handling

Security Updates

Download

ISO27k_router_security_audit_checklist (1)

Posted in Auditing, vulnerability assessment | Tagged: | Leave a Comment »

Netwox graphical front end Network tool

Posted by brainfoldb4u on March 15, 2010

Netwox

Netwox is an useful tool for those who are in profession of securing network security. Its not exactly an exploit engine but a massive suite of tools, 223 that gives you the ability to to carry out a number of services including enumeration, spoofing, brute forcing and also comes with a number of pre-built udp/ tcp clients/ servers etc.

Toolbox netwox helps to find and solve network problems :
– sniff, spoof
– clients, servers
– DNS, FTP, HTTP, IRC, NNTP, SMTP, SNMP, SYSLOG, TELNET, TFTP
– scan, ping, traceroute
– etc.

Tools in version 5.38.0:

1 : Display network configuration

2 : Display debugging information

3 : Display information about an IP address or a hostname

4 : Display information about an Ethernet address

5 : Obtain Ethernet addresses of computers in an IP list

6 : Display how to reach an IP address

7 : Sniff

8 : Sniff and display open ports

9 : Sniff and display Ethernet addresses

10 : Sniff and display network statistics

11 : Sniff and verify checksums

12 : Display which values to use for netwox parameters

13 : Obtain DLT type for sniff and spoof for each device

14 : Spoof a record

15 : Display content of a record

16 : Convert a record

17 : Recompute checksums of packets in a record

18 : Reassemble IP packets of a record, and reorder TCP flow

19 : Extract a range of packets from a record

20 : Search for strings in packets from a record

21 : Convert a number

22 : Convert a string

23 : Display ASCII table

24 : Convert IP addresses ranges

25 : Test if a directory is secure

26 : Dump a file

27 : Compute MD5 of a file

28 : Convert a binary file to readable and editable file

29 : Convert a readable and editable file to a binary file

30 : Convert a file from unix to dos

31 : Convert a file from dos to unix

32 : Spoof Ethernet packet

33 : Spoof EthernetArp packet

34 : Spoof EthernetIp4 packet

35 : Spoof EthernetIp4Udp packet

36 : Spoof EthernetIp4Tcp packet

37 : Spoof EthernetIp4Icmp4 packet

38 : Spoof Ip4 packet

39 : Spoof Ip4Udp packet

40 : Spoof Ip4Tcp packet

41 : Spoof Ip4Icmp4 packet

42 : Spoof of packet samples : fragment

43 : Spoof of packet samples : fragment, ip4opt:noop

44 : Spoof of packet samples : fragment, ip4opt:rr

45 : Spoof of packet samples : fragment, ip4opt:lsrr

46 : Spoof of packet samples : fragment, ip4opt:ts

47 : Spoof of packet samples : fragment, ip4opt:ipts

48 : Spoof of packet samples : fragment, ip4opt:ippts

49 : Ping ICMP

50 : Ping ICMP (EthIP spoof)

51 : Ping TCP

52 : Ping TCP (EthIp spoof)

53 : Ping UDP

54 : Ping UDP (EthIp spoof)

55 : Ping ARP

56 : Ping ARP (EthIp spoof)

57 : Traceroute ICMP

58 : Traceroute ICMP (EthIP spoof)

59 : Traceroute TCP

60 : Traceroute TCP (EthIp spoof)

61 : Traceroute UDP

62 : Traceroute UDP (EthIp spoof)

63 : Traceroute on a specified IP protocol

64 : Traceroute on a specified IP protocol (EthIp spoof)

65 : Scan ICMP

66 : Scan ICMP (EthIP spoof)

67 : Scan TCP

68 : Scan TCP (EthIp spoof)

69 : Scan UDP

70 : Scan UDP (EthIp spoof)

71 : Scan ARP

72 : Scan ARP (EthIp spoof)

73 : Simulate presence of a/several computer/s (arp and ping)

74 : Flood a host with random fragments

75 : Fill table of a switch using a flood of Ethernet packets

76 : Synflood

77 : Check if seqnum are predictible

78 : Reset every TCP packet

79 : Acknowledge every TCP SYN

80 : Periodically send ARP replies

81 : Send an ICMP4 timestamp

82 : Sniff and send ICMP4/ICMP6 destination unreachable

83 : Sniff and send ICMP4/ICMP6 time exceeded

84 : Sniff and send ICMP4/ICMP6 parameter problem

85 : Sniff and send ICMP4 source quench

86 : Sniff and send ICMP4/ICMP6 redirect

87 : TCP client

88 : UDP client

89 : TCP server

90 : UDP server

91 : TCP server multiclients

92 : UDP server multiclients

93 : TCP remote administration server

94 : TCP remote administration client (exec)

95 : TCP remote administration client (get file)

96 : TCP remote administration client (put file)

97 : SYSLOG client

98 : Flood a host with syslog messages

99 : TELNET client

100 : TELNET client executing one or several commands

101 : Brute force telnet client

102 : Query a DNS server

103 : Obtain version of a Bind DNS server

104 : DNS server always answering same values

105 : Sniff and send DNS answers

106 : Send an email

107 : Post a newsgroup message

108 : List newsgroups available on a server

109 : Download one, or more, newsgroup messages

110 : Ethernet bridge limiting flow

111 : FTP listing a directory

112 : FTP client : get a file

113 : FTP client : put a file

114 : FTP client : del a file

115 : FTP client : get a directory recursively

116 : FTP client : put a directory recursively

117 : FTP client : del a directory recursively

118 : HTTP GET

119 : HTTP HEAD

120 : HTTP POST

121 : HTTP PUT

122 : HTTP DELETE

123 : HTTP TRACE

124 : HTTP OPTIONS

125 : HTTP server

126 : HTTP remote administration server

127 : Cypher/decypher a file using a xor

128 : Split a file in smaller chunks

129 : Reassemble chunks of a file

130 : Brute force ftp client

131 : Brute force http client (site password)

132 : Brute force http client (proxy password)

133 : Convert an url/uri

134 : Obtain urls/uris in a HMTL file

135 : Convert urls/uris in a HMTL file to absolute urls

136 : Web download (http://… or ftp://…)

137 : Create a sample configuration file for tool 138

138 : Web spider (use configuration file created by tool 137)

139 : Web spider on command line (fully recursive)

140 : Spoof EthernetIp6 packet

141 : Spoof EthernetIp6Udp packet

142 : Spoof EthernetIp6Tcp packet

143 : Spoof EthernetIp6Icmp6 packet

144 : Spoof Ip6 packet

145 : Spoof Ip6Udp packet

146 : Spoof Ip6Tcp packet

147 : Spoof Ip6Icmp6 packet

148 : Ping ICMP6 Neighbor Discovery

149 : Ping ICMP6 Neighbor Discovery (EthIp spoof)

150 : Scan ICMP6 Neighbor Discovery

151 : Scan ICMP6 Neighbor Discovery (EthIp spoof)

152 : Interactive IRC client

153 : IRC client listing channels

154 : IRC client listening on a channel

155 : Network performance measurement : TCP server

156 : Network performance measurement : TCP client

157 : Network performance measurement : UDP server

158 : Network performance measurement : UDP client

159 : SNMP Get

160 : SNMP Walk

161 : SNMP Trap

162 : SNMP Trap2

163 : SNMP Inform

164 : SNMP Set

165 : TFTP client : get a file

166 : TFTP client : put a file

167 : TFTP server

168 : FTP server

169 : Display simple network configuration easy to parse

170 : TELNET server

171 : DHCP client

172 : List articles range of a newsgroup

173 : Download overview of one, or more, newsgroup messages

174 : FTP client : get a file and check its MD5

175 : Web download (http://… or ftp://…) and check its MD5

176 : TFTP client : get a file and check its MD5

177 : Check if a SMTP server is up

178 : Check if an IRC server is up

179 : DHCP client requesting an INFORM

180 : SNTP client obtaining time

181 : SNTP server

182 : Obtain size of a web file (http://… or ftp://…)

183 : TCP relay

184 : UDP relay

185 : TCP multiclient relay

186 : Millisecond sleep

187 : Display date and time

188 : SYSLOG server

189 : SMTP server

190 : Make coffee

191 : Generate a password (English, French, Spanish)

192 : Spoof of packet samples : fragment, ip4opt:ssrr

193 : IDENT client requesting info about an open session

194 : IDENT client creating a session and requesting its info

195 : IDENT server

196 : WHOIS client

197 : WHOIS client guessing server

198 : SMB/CIFS client: list shares

199 : SMB/CIFS client: create a directory

200 : SMB/CIFS client: delete a directory

201 : SMB/CIFS client: rename a directory

202 : SMB/CIFS client: list contents of a directory

203 : SMB/CIFS client: delete a file

204 : SMB/CIFS client: rename a file

205 : SMB/CIFS client: get a file

206 : SMB/CIFS client: put a file

207 : SMB/CIFS client: recursively get a directory

208 : SMB/CIFS client: recursively put a directory

209 : SMB/CIFS client: recursively delete a directory

210 : Web spider on command line (stay in same directory)

211 : Web spider : converts a local downloaded filename to its original url

212 : Web spider : converts an url to its local downloaded filename

213 : Display a list of IP addresses

214 : Traceroute discovery: graph of network topology

215 : Traceroute discovery (EthIp spoof)

216 : Beep

217 : SMB/CIFS server

218 : Netwox internal validation suite

219 : Compute cryptographic hash of a file (md5, sha, etc.)

220 : Convert a binary file to a base64 encoded file

221 : Convert a base64 encoded file to a binary file

222 : In a HMTL file, suppress links pointing to local urls

223 : Forward an email

Obviously from this list, just about everything is covered and netwox is extremely useful. It can be used in either command line mode or gui utilising netwag.

Netwag is a graphical front end for netwox. It permits to easily :

– search tools proposed in netwox

– construct command line

– run tools

– keep an history of commands

Installation:

To utilise both command-line and gui versions the following needs to be installed:

  • WinPcap
  • Activestate tcl
  • netwox
  • netwag

Netwag requires that the netwag535.tcl script be amended and the line:

set netwag_glo_bin_netwox “netwox535”  be altered to the location that the netwox535 executable is located.

Note: – It may be easier to unzip netwox directly into the netwag directory to save any alteration.

Click here to download Netwox

Click here to download Netwag

Execution:

Command-line:

D:\Documents and Settings\hacker\Desktop\netwox-5.35.0-bin_windows>netwox535.exe

Netwox toolbox version 5.35.0. Netwib library version 5.35.0.

######################## MAIN MENU #########################

0 – leave netwox

3 – search tools

4 – display help of one tool

5 – run a tool selecting parameters on command line

6 – run a tool selecting parameters from keyboard

a + information

b + network protocol

c + application protocol

d + sniff (capture network packets)

e + spoof (create and send packets)

f + record (file containing captured packets)

g + client

h + server

i + ping (check if a computer if reachable)

j + traceroute (obtain list of gateways)

k + scan (computer and port discovery)

l + network audit

m + brute force (check if passwords are weak)

n + remote administration

o + tools not related to network

Select a node (key in 03456abcdefghijklmno): 5

Select tool number (between 1 and 222): 1

################## running tool number 1 ###################

Title: Display network configuration

+————————————————————————+

| This tool displays network configuration: |

| – the list of devices/interfaces: |

| + nu: device number |

| + dev: easy device name |

| + eth_hw: Ethernet address or hardware type (if not Ethernet) |

| + mtu: MTU (maximum size of packets) |

| + real_dev: real device name |

| – the list of IP addresses: |

| + nu: device number of device associated to this address |

| + ip: IP address |

| + netmask: network mask |

| + ppp: if true(1), this address is a Point To Point |

| + ppp_with: if ppp, this is the address of remote endpoint |

| – the IP4 ARP cache or IP6 neighbor (this contains Ethernet |

| addresses for other computers) |

| + nu: device number of device associated to this entry |

| + eth: Ethernet address of computer |

| + ip: IP address of computer |

| – the routes |

| + nu: device number of device associated to this entry |

| + destination/netmask: destination addresses |

| + source: source IP address, or local for a local route |

| + gateway: gateway (first router) to use |

| + metric: metric of route |

| |

| Parameter –device ask to display devices list. |

| Parameter –ip ask to display ip list. |

| Parameter –arpcache ask to display ARP cache and neighbors. |

| Parameter –routes ask to display routes list. |

| If no Parameter is set, they are all displayed. |

| |

| This tool may need to be run with admin privilege in order to obtain |

| full network configuration. |

+————————————————————————+

Synonyms: address, arp, device, gateway, ifconfig, interface, ipconfig, mac, nei

ghbor, netmask, route, show

Usage: netwox 1 [-d|+d] [-i|+i] [-a|+a] [-r|+r]

Parameters:

-d|–devices|+d|–no-devices display devices

-i|–ip|+i|–no-ip display ip addresses

-a|–arpcache|+a|–no-arpcache display arp cache and neighbors

-r|–routes|+r|–no-routes display routes

Example: netwox 1

Enter optional tool parameters and press Return key.

netwox 1 -d -i -a -r

nu dev ethernet_hwtype mtu real_device_name

1 Lo0 loopback 1520 Loopback

2 Unk0 unknown 0 \Device\NPF_GenericDialupAdapter

3 Eth0 00:15:C5:CJ:C3:BJ 1500 \Device\NPF_{720B03E4-B057-444E-8D93-B321DE296D

15}

nu ip /netmask ppp point_to_point_with

1 127.0.0.1 /255.0.0.0 0

3 169.254.182.93 /255.255.0.0 0

nu ethernet ip

3 00:15:C5:CF:C3:BC 169.254.182.93

nu destination /netmask source gateway metric

1 127.0.0.1 /255.255.255.255 local 0

3 169.254.182.93 /255.255.255.255 local 0

3 169.254.0.0 /255.255.0.0 169.254.182.93 0

1 127.0.0.0 /255.0.0.0 127.0.0.1 0

Command returned 0 (OK)

Press ‘r’ or ‘k’ to run again this tool, or any other key to continue

I don’t know about you but that seems a little like hard work just to get a small bit of host information returned and that’s from a simple tool that is available in the suite. I would recommend using Netwag to aid the use of this suite.

Posted in Auditing, Security tools, vulnerability assessment | Tagged: | Leave a Comment »

Google Chrome Forensic

Posted by brainfoldb4u on January 22, 2010

This post is actually posted in SANS computer forensic lab by Kristinn under Browser Forensics, Computer Forensics. This is pretty useful information about Google Chrome so i am linking it in here..

Google Chrome stores the browser history in a SQLite database, not unlike Firefox.  Yet the structure of the database file is quite different.

Chrome stores its files in the following locations:

  • Linux: /home/$USER/.config/google-chrome/
  • Linux: /home/$USER/.config/chromium/
  • Windows Vista (and Win 7): C:Users[USERNAME]AppDataLocalGoogleChrome
  • Windows XP: C:Documents and Settings[USERNAME]Local SettingsApplication DataGoogleChrome

There are two different versions of Google Chrome for Linux, the official packets distributed by Google, which stores its data in the google-chrome directory and the Linux distributions version Chromium.

The database file that contains the browsing history is stored under the Default folder as “History” and can be examined using any SQLlite browser there is (such as sqlite3).  The available tables are:

  • downloads
  • presentation
  • urls
  • keyword_search_terms
  • segment_usage
  • visits
  • meta
  • segments

The most relevant tables for browsing history are the “urls” table that contains all the visited URLs, the “visits” table that contains among other information about the type of visit and the timestamps and finally the “downloads” table that contains a list of downloaded files.

If we examine the urls table for instance by using sqlite3 we can see:

sqlite> .schema urls
CREATE TABLE urls(id INTEGER PRIMARY KEY,url LONGVARCHAR,title LONGVARCHAR,visit_count INTEGER DEFAULT 0 NOT NULL,
typed_count INTEGER DEFAULT 0 NOT NULL,last_visit_time INTEGER NOT NULL,hidden INTEGER DEFAULT 0 NOT NULL,
favicon_id INTEGER DEFAULT 0 NOT NULL);
CREATE INDEX urls_favicon_id_INDEX ON urls (favicon_id);
CREATE INDEX urls_url_index ON urls (url);

And the visits table

sqlite> .schema visits
CREATE TABLE visits(id INTEGER PRIMARY KEY,url INTEGER NOT NULL,visit_time INTEGER NOT NULL,from_visit INTEGER,transition INTEGER DEFAULT 0 NOT NULL,segment_id INTEGER,is_indexed BOOLEAN);
CREATE INDEX visits_from_index ON visits (from_visit);
CREATE INDEX visits_time_index ON visits (visit_time);
CREATE INDEX visits_url_index ON visits (url);

So we can construct a SQL statement to get some information about user browser habit.

SELECT urls.url, urls.title, urls.visit_count, urls.typed_count, urls.last_visit_time, urls.hidden, visits.visit_time, visits.from_visit, visits.transition
FROM urls, visits
WHERE
 urls.id = visits.url

This SQL statement extracts all the URLs the user visited alongside the visit count, type and timestamps.

If we examine the timestamp information from the visits table we can see they are not constructed in an Epoch format.  The timestamp in the visit table is formatted as the number of microseconds since midnight UTC of 1 January 1601, which other have noticed as well, such as firefoxforensics.

If we take a look at the schema of the downloads table (.schema downloads) we see

CREATE TABLE downloads (id INTEGER PRIMARY KEY,full_path LONGVARCHAR NOT NULL,url LONGVARCHAR NOT NULL,
start_time INTEGER NOT NULL,received_bytes INTEGER NOT NULL,total_bytes INTEGER NOT NULL,state

And examine the timestamp there (the start_time) we can see that it is stored in Epoch format.

There is one more interesting thing to mention in the “visits” table.  It is the row “transition”.  This value describes how the URL was loaded in the browser.  For full documentation see the source code of page_transition_types or in a shorter version the core parameters are the following:

  • LINK. User go to the page by clicking a link.
  • TYPED. User typed the URL in the URL bar.
  • AUTO_BOOKMARK. User got to this page through a suggestion in the UI, for example,through the destinations page
  • AUTO_SUBFRAME. Any content that is automatically loaded in a non-toplevel frame. User might not realize this is a separate frame so he might not know he browsed there.
  • MANUAL_SUBFRAME. For subframe navigations that are explicitly requested by the user and generate new navigation entries in the back/forward list.
  • GENERATED. User got to this page by typing in the URL bar and selecting an entry that did not look like a URL.
  • START_PAGE. The user’s start page or home page or URL passed along the command line (Chrome started with this URL from the command line)
  • FORM_SUBMIT. The user filled out values in a form and submitted it.
  • RELOAD.  The user reloaded the page, whether by hitting reload, enter in the URL bar or by restoring a session.
  • KEYWORD. The url was generated from a replaceable keyword other than the default search provider
  • KEYWORD_GENERATED. Corresponds to a visit generated for a keyword.

The transition variable contains more information than just the core parameters.  It also stores so called qualifiers such as whether or not this was a client or server redirect and if this a beginning or an end of a navigation chain.

When reading the transition from the database and extracting just the core parameter the variable CORE_MASK has to be used to AND with the value found inside the database.

CORE_MASK = 0xFF,

I’ve created an input module to log2timeline to make things a little bit easier by automating this.  At this time the input module is only available in the nightly builds, but it will be released in version 0.41 of the framework.

An example usage of the script is the following:

log2timeline -f chrome -z local History
0|[Chrome] User: kristinng URL visited: http://tools.google.com/chrome/intl/en/welcome.html (Get started with Google Chrome) [count: 1] Host: tools.google.com type: [START_PAGE - The start page of the browser] (URL not typed directly)|0|0|0|0|0|1261044829|1261044829|1261044829|1261044829

0|[Chrome] User: kristinng URL visited: http://isc.sans.org/ (SANS Internet Storm Center; Cooperative Network Security Community - Internet Security) [count: 1] Host: isc.sans.org type: [TYPED - User typed the URL in the URL bar] (directly typed)|0|0|0|0|0|1261044989|1261044989|1261044989|1261044989..
The script reads the user name from the directory path the history file was found and then reads the database structure from the History file and prints out the information in a human readable form (this output is in mactime format).  To convert the information found here in CSV using mactime

log2timeline -f chrome -z local History > bodyfile
mactime -b bodyfile -d > body.csv

And the same lines in the CSV file are then:
Thu Dec 17 2009 10:13:49,0,macb,0,0,0,0,[Chrome] User: kristinng URL visited: http://tools.google.com/chrome/intl/en/welcome.html (Get started with Google Chrome) [count: 1] Host: tools.google.com type: [START_PAGE - The start page of the browser] (URL not typed directly)
Thu Dec 17 2009 10:16:29,0,macb,0,0,0,0,[Chrome] User: kristinng URL visited: http://isc.sans.org/ (SANS Internet Storm Center; Cooperative Network Security Community - Internet Security) [count: 1] Host: isc.sans.org type: [TYPED - User typed the URL in the URL bar] (directly typed)
Original information is published in this link

Posted in Auditing, Browser Security, Hacking | Tagged: , | Leave a Comment »

Free Cisco, Microsoft, CompTia Study materials

Posted by brainfoldb4u on January 15, 2010

I came across this materials today. They are really useful materials for some one looking to learn for certifications like CCSP, CCVP, CCNA, CCNP.. It is a whole set of materials..

Click the link to access:  http://www.4shared.com/dir/25834616/400fbf67/sharing.html. Special thanks to Scalenetworks

Posted in Auditing, General topics, Information Security, Microsoft | Tagged: | Leave a Comment »

Five registry keys to improve Windows 7 security :: SearchSecurity.com.au

Posted by brainfoldb4u on January 8, 2010

As administrators roll out Windows 7, the following questions and associated registry keys may help them achieve their desired user experience

via Five registry keys to improve Windows 7 security :: SearchSecurity.com.au.

Posted in Auditing, Information Security, Security tools | Leave a Comment »

Open source linux IDS/IPS from OISF

Posted by brainfoldb4u on January 2, 2010

The Open Information Security Foundation (OISF) is a non-profit foundation organized to build a next generation IDS/IPS engine. The OISF has formed a multi-national group of the leading software developers in the security industry.  In addition to developers and a consortium consisting of leading cyber security companies, OISF after three years have  first released their Suricata Engine! The engine is an Open Source Next Generation Intrusion Detection and Prevention Tool, not intended to just replace or emulate the existing tools in the industry, but to bring new ideas and technologies to the field.

Multi-Threading

Amazing that multi-threading is new to IDS!

Automatic Protocol Detection

The engine not only has keywords for IP, TCP, UDP and ICMP, but also has HTTP, TLS, FTP and SMB! A user can now write a rule to detect a match within an HTTP stream for example regardless of the port the stream occurs on. This is going to revolutionize malware detection and control. Detections for more layer 7 protocols are on the way.

Gzip Decompression

The HTP Parser will decode Gzip compressed streams, allowing much more detailed matching within the engine.

Independent HTP Library

The HTP Parser will be of great use to many other applications such as proxies, filters, etc. The parser is available as a library also under GPLv2 for easy integration ito other tools.

For detailed overview and download click here

Posted in Auditing, Information Security, Open Source | Tagged: , , | Leave a Comment »