<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-3660690244802655783</id><updated>2009-11-08T05:43:47.262-06:00</updated><title type='text'>electronic.brain.core</title><subtitle type='html'>Random Computer (Security) things that I run into</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-3011733222100040201</id><published>2009-06-05T22:36:00.007-05:00</published><updated>2009-06-05T23:29:45.651-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security engineering process'/><category scheme='http://www.blogger.com/atom/ns#' term='secure software development'/><category scheme='http://www.blogger.com/atom/ns#' term='software assurance'/><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><title type='text'>Developing secure applications</title><content type='html'>So you are a small company that develops software, and your customers are becoming more paranoid about the security of your code. With companies being held responsible for their sloppy coding practices, no more "As long as it works, that's all you need". One of the first instances I saw of this was the &lt;a href="http://msdn.microsoft.com/en-us/security/cc448177.aspx"&gt;"The Trustworthy Computing Security Development Lifecycle"&lt;/a&gt; developed by Microsoft.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_YBjZP0h05Z0/SintR6ppALI/AAAAAAAAADg/1NwI6dEX3Vo/s1600-h/SDL.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 452px; height: 78px;" src="http://4.bp.blogspot.com/_YBjZP0h05Z0/SintR6ppALI/AAAAAAAAADg/1NwI6dEX3Vo/s320/SDL.jpg" alt="" id="BLOGGER_PHOTO_ID_5344063324909273266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;"Security development lifecycle (SDL)&lt;br /&gt;Microsoft designed SDL to ensure that the development of software is as secure as possible.&lt;br /&gt;&lt;br /&gt;The process is made up of a series of security-focused activities and targets for each of the phases of Microsoft's software development process.&lt;br /&gt;&lt;br /&gt;These include the development of threat models during software design, the use of static analysis code-scanning tools during implementation, and the conduct of code reviews and security testing.&lt;br /&gt;&lt;br /&gt;Before software can be released, it must undergo a final security review by a team independent from its development group."&lt;br /&gt;&lt;br /&gt;Microsoft used this methodology in order to develop the Vista Operating System. Microsoft claims from implementing this methodology Vista has had fewer &lt;a href="http://blogs.technet.com/security/attachment/2772991.ashx"&gt;first-year vulnerabilities&lt;/a&gt; then Windows XP, Red Hat, Mac OSX, etc... Now Microsoft does release this methodology free for anyone to use and they are implementing this in their development tools. You can read all about on the SDL website linked to above.&lt;br /&gt;&lt;br /&gt;Another checklist I have found useful for software developers is the &lt;a href="http://iase.disa.mil/stigs/checklist/application_security_checklist_v2r1_4.pdf"&gt;Application and Development Checklist&lt;/a&gt; developed by the Defense Information Systems Agency. I find this an easy to use checklist to show software buyers that any software being developed is going through a strict security engineering process to ensure security is not an after thought.&lt;br /&gt;&lt;br /&gt;Another great resource is the &lt;a href="http://www.safecode.org/"&gt;SAFECode&lt;/a&gt;, they have multiple publications on ensuring you are developing secure code.&lt;br /&gt;&lt;br /&gt;"The Software Assurance Forum for Excellence in Code (SAFECode) is a non-profit organization exclusively dedicated to increasing trust in information and communications technology products and services through the advancement of effective software assurance methods. SAFECode is a global, industry-led effort to identify and promote best practices for developing and delivering more secure and reliable software, hardware and services. Its members include EMC Corporation, Juniper Networks, Inc., Microsoft Corp., Nokia, SAP AG and Symantec Corp."&lt;br /&gt;&lt;br /&gt;If you are developing software, customers are requesting not only working code but also secure code. There is also an on-going trend in the software industry that business are including "secure code clauses" in their contracts with application developers.&lt;br /&gt;&lt;br /&gt;Keep the code secure, use a secure engineering process!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-3011733222100040201?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/3011733222100040201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=3011733222100040201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/3011733222100040201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/3011733222100040201'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2009/06/developing-secure-applications.html' title='Developing secure applications'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_YBjZP0h05Z0/SintR6ppALI/AAAAAAAAADg/1NwI6dEX3Vo/s72-c/SDL.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-2796844034421397972</id><published>2008-02-27T17:54:00.006-06:00</published><updated>2008-02-27T18:15:01.597-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows scripting host wsh'/><category scheme='http://www.blogger.com/atom/ns#' term='visual basic scripting vbs'/><title type='text'>Let Loose the Pings</title><content type='html'>&lt;a href="http://www.flickr.com/photos/hawkey/53385297/"&gt;&lt;span style="font-size:50%;"&gt;Photo Courtesy Sean Hawkey&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;img id="BLOGGER_PHOTO_ID_5171814980956325330" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://bp3.blogger.com/_YBjZP0h05Z0/R8X6Ut_yBdI/AAAAAAAAACY/iQ1qIISl1So/s320/ping.jpg" border="0" /&gt;&lt;br /&gt;Our lab contains this very expensive hardware based traffic generator. This device is not easily configured and can be a pain to used. But once you set it up the device can generate any type of traffic and network transactions. The problem comes in that somebody changed the admin password, and nobody knew the new one. Now the device can still be used without the admin password however you cannot configure the interfaces without it. We were in a time crunch and needed to perform a simple network test, and did not have time to reset the password. The problem came in that whoever reset the admin password changed the IP address on the interface. The problem is we needed to figure out the IP address of the interface in order to configure the test. Easy, there are only 4 billion addresses to ping, by the way the device was set to respond to pings. Well it gets better we knew the address was 10.x.0.11, so we only have to try at the most 255 addresses. Well my co-worker starts pinging one at a time, and i think he is crazy, we are programmers, lets write a quick vbscript and run it with wsh. Basically this script runs through 10.0-255.0.11 addresses and parses the output from the ping. If it receives a Reply then the script prints that address and exits. The script could be modified with more loops to go through more addresses however the script is slow because it only processes one ping at a time, if you need more pings a c program would work much faster.&lt;br /&gt;&lt;br /&gt;Basic operation - for loop going through 0-255 (each number is output the screen), a variable is used to build the ping statement, a shell is created for the ping command to be executed, the output from the ping command which is in stdout is parsed looking for the word Reply, if Reply is found then the ip address is echoed to the screen and the script exits. When running this script ensure you use cscript or you will have windows popping up for each ping. This script worked extremely well, we took a break while the script ran and came back and the magic number was 42 - imagine that.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;for i = 0 to 255&lt;/em&gt;&lt;br /&gt;&lt;em&gt;y = 1&lt;/em&gt;&lt;br /&gt;&lt;em&gt;wscript.echo i&lt;/em&gt;&lt;br /&gt;&lt;em&gt;a = "ping -n 1 10." &amp;amp; i &amp;amp; ".0.11"&lt;br /&gt;Set objShell = CreateObject("WScript.Shell")&lt;/em&gt;&lt;br /&gt;&lt;em&gt;Set objWshScriptExec = objShell.Exec(a)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;Set objStdOut = objWshScriptExec.StdOut&lt;br /&gt;While Not objStdOut.AtEndOfStream &lt;/em&gt;&lt;br /&gt;&lt;em&gt;strLine = objStdOut.ReadLine &lt;/em&gt;&lt;br /&gt;&lt;em&gt;if mid(strLine,1,5) = "Reply" then &lt;/em&gt;&lt;br /&gt;&lt;em&gt;y = y + 1 &lt;/em&gt;&lt;br /&gt;&lt;em&gt;end if&lt;/em&gt;&lt;br /&gt;&lt;em&gt;Wend&lt;br /&gt;if y &gt; 1 then&lt;/em&gt;&lt;br /&gt;&lt;em&gt;wscript.echo a&lt;/em&gt;&lt;br /&gt;&lt;em&gt;exit for&lt;/em&gt;&lt;br /&gt;&lt;em&gt;end if&lt;br /&gt;next&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-2796844034421397972?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/2796844034421397972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=2796844034421397972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/2796844034421397972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/2796844034421397972'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2008/02/let-loose-pings.html' title='Let Loose the Pings'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_YBjZP0h05Z0/R8X6Ut_yBdI/AAAAAAAAACY/iQ1qIISl1So/s72-c/ping.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-1040836842302515767</id><published>2008-02-19T18:30:00.007-06:00</published><updated>2008-02-19T18:50:55.390-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='software virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><title type='text'>Are you on the Juice?</title><content type='html'>Altris, now owned by Symantec, has developed application virtualization called the &lt;a href="http://juice.altiris.com/svs"&gt;Software Virtualization Solution&lt;/a&gt; (SVS). Did I mention, its free for personal use, how cool is that. I am going to give a brief overview of the software, but you should visit the &lt;a href="http://juice.altiris.com/"&gt;Altris Juice&lt;/a&gt; site to get in on this action. The Juice web site provides articles, tools, and tips to help you maximize the benefits of Software Virtualization Solution. &lt;p&gt;I think of Application Virtualization as VMWare for applications, why virtualize the whole operating system when virtualizing the application will do. With SVS the following things are possible:&lt;/p&gt;        &lt;p&gt;- If an application becomes corrupted, reset it to its original installed state, with ability to save user data.&lt;br /&gt;- Allow multiple versions of the same application to be installed, or the ability to install applications without causing conflicts.&lt;br /&gt;- Prevent applications from corrupting the operating system, such as preventing the installation of older versions of DLLs.&lt;br /&gt;&lt;br /&gt;SVS supports Window OS's from 2000 thru Vista. However some applications do not work well, such as drivers, virus checkers, file encryption products, OS patches, computer management agents, and applications that have dedicated drivers.&lt;/p&gt;  &lt;p&gt;SVS works using filters that intercept all file and registry calls and can redirect them to a folder. Basically a user creates a Virtual Software Package (VSP) for the application they want to install&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_YBjZP0h05Z0/R7t3K9_yBcI/AAAAAAAAACQ/1QZl9_tT0No/s1600-h/2220-1.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 223px; height: 199px;" src="http://bp2.blogger.com/_YBjZP0h05Z0/R7t3K9_yBcI/AAAAAAAAACQ/1QZl9_tT0No/s320/2220-1.jpg" alt="" id="BLOGGER_PHOTO_ID_5168856027662255554" border="0" /&gt;&lt;/a&gt;. SVS then builds a virtual environment for the application that mimics the Windows Registry and File system. For example, if you have an application that overwrites a DLL file with an older version, this could cause issues with other installed software. Using SVS, the application would instead be redirected to write the older DLL to a folder associated with that application. When the application is executed and calls for the DLL , the SVS filter redirects the request to the folder associated with that application. In essence the application cannot modify the operating system, however to the end user there is no difference between a virtual application and a non-virtual application.&lt;/p&gt;  &lt;p&gt;Once the VSP is installed it can be activated, deactivated, and reset to the original configuration (like a VMWare Snapshot). Once activated all the files and settings for the application will appear to end user just like the application is actually installed. Once deactivated all the files and settings disappear from the user's view. When building a VSP, everything that is captured is contained in a “layer.” The layer represents all the files and registry settings that make up the virtualized application. Multiple layers can be used to create a layer for user data and a layer for the application itself, this allows you to reset the application without losing the user data contained in the application.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can also create Virtual Software Archive (VSA) files which allow you to install the application on any computer by just importing the file into SVS. There are sample VSA files that you can download off Juice,&lt;a href="http://juice.altiris.com/svs/sampleapps"&gt; try it out&lt;/a&gt; (Reminds me of Virtual Appliances in VMWare). These would be helpful in an enterprise environment, the administrator can deploy these VSA files to all the users and have the ability to easily reset them once the user screws up the application.&lt;br /&gt;&lt;/p&gt;So what is all this good for - how about securing your computer against untrusted software. Browsing around the Internet one night you find some tool guaranteed to do what you have always wished for, how can this be true especially since the tool is located on the trojans -r-us site. But you just gotta try it, so you use SVS to virtualize the application. That way if you find out it is a malicious program all you have to do is deactivate the program and it cannot corrupt your operating system, awesome! Another thought is if they offer an API into SVS this could be used to perform security testing of an application akin to strace.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-1040836842302515767?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/1040836842302515767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=1040836842302515767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1040836842302515767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1040836842302515767'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2008/02/are-you-on-juice.html' title='Are you on the Juice?'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_YBjZP0h05Z0/R7t3K9_yBcI/AAAAAAAAACQ/1QZl9_tT0No/s72-c/2220-1.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-4398864667277211148</id><published>2008-02-17T20:29:00.002-06:00</published><updated>2008-02-17T20:39:00.834-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='risk assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='vulnerability assessment'/><title type='text'>Software Assessement 3.0</title><content type='html'>&lt;div&gt;Determining Network Resources, finishing out the &lt;a href="http://ebraincore.blogspot.com/2007/12/software-risk-assessment-1.html"&gt;series on software assessment&lt;/a&gt;, let's discuss how to determine the network resources required to operate the software. For this you will need a protocol analyzer to be able to capture the transactions that are happening. For my testing, I use &lt;a href="http://www.wireshark.org/"&gt;Wire Shark&lt;/a&gt;, I am not going into great details on how to use Wire Shark, the &lt;a href="http://www.wireshark.org/docs/"&gt;documentation &lt;/a&gt;on Wire Shark is very detailed and easy to understand.&lt;br /&gt;&lt;br /&gt;The basic process is to start a capture with Wire Shark, and then open the software and perform some basic functions. I usually go through the menu system and try out the features. We are especially looking for features that cause network traffic. The vendor documentation can be useful by giving a clue to what ports and protocols the software uses to connect to a server or other clients. Once you are finished trying out features in the software, stop the Wire Shark capture. Now it is time to analyze the capture file.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_YBjZP0h05Z0/R7ju9d_yBbI/AAAAAAAAACI/_zJZZnAB8H0/s1600-h/ws-follow-stream.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5168143312199222706" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" height="182" alt="" src="http://bp1.blogger.com/_YBjZP0h05Z0/R7ju9d_yBbI/AAAAAAAAACI/_zJZZnAB8H0/s320/ws-follow-stream.png" width="266" border="0" /&gt;&lt;/a&gt;After reading the Wire Shark documentation and you have basic idea of TCP/IP protocol you should have the basic idea of how to look at the packets. One of the useful features in Wire Shark is follow TCP Stream, which shows the conservation between the software and the server or clients it is talking to in one screen. Of course this is only helpful if the software is using TCP. Also ensure that you have a filter set to only show traffic from the computer you are testing and only run the software under test, it can be annoying to have to sort through network traffic that has nothing to do with the software that is being tested.&lt;br /&gt;&lt;br /&gt;While reading through the capture file, keep track of all the ports and protcols that are being used. Usually the software will select random ports above 1024 to send packets on, the random ports are not as important as the listening port on the server or client that is recieving the packets. The endpoint conversation window can be useful to view the ports and IP addresses that were connected to during the test.&lt;br /&gt;&lt;br /&gt;What are we looking for?&lt;br /&gt;&lt;br /&gt;- Ensure the software will comply to current firewall policy, if the software requires a range of ports to be opened on the firewall this can be a risk, I have seen software that requires 1,000 ports on the firewall to be opened to allow the server to make connections to the client, this was considered too much risk and the software was not allowed to be used. Now if the network communications are contained within the LAN instead of connecting outside to the Intrenet, this could be considered a lower risk.&lt;br /&gt;&lt;br /&gt;- Is the data being encrypted or passed in clear text, In the past when security was an afterthought, we used to see username and passwords passed in clear text, some protocols are designed like this such as telnet and ftp this is why sftp and ssh were developed.&lt;br /&gt;&lt;br /&gt;- Bandwidth, How much bandwidth does the software require, will it cause a denial of service to the other programs running on the network. If the software is downloading large image or video files constantly then this could tie up the network and not allow other services required to operate. This is a judgement call, but Wire Shark will give you an idea of the amount of traffice that is being generated and based on your current network use you should decide if the network can handle this new software.&lt;br /&gt;&lt;br /&gt;An interesting example is you have a software product that performs periodic updates to istself, and we see this type of dialog&lt;br /&gt;DNS request for the vendor website&lt;br /&gt;Connect to the website, website sends a list of the program files with version numbers&lt;br /&gt;Client checks the versions it recieved with the versions installed&lt;br /&gt;Client downloads any files that have a newer version&lt;br /&gt;&lt;br /&gt;Is this a risk?&lt;br /&gt;&lt;br /&gt;If I was attacking this system, all I would have to do is ensure the DNS request points to my malicious server, then the client would automatially download any file I deemed as an updated. It is not that diffcult to modify and add code to a dll that is called evertime a program is run. Without any logins or encryption this could become a serious risk, the risk also depends on how important is the system that is running this software.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-4398864667277211148?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/4398864667277211148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=4398864667277211148' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/4398864667277211148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/4398864667277211148'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2008/02/software-assessement-30.html' title='Software Assessement 3.0'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_YBjZP0h05Z0/R7ju9d_yBbI/AAAAAAAAACI/_zJZZnAB8H0/s72-c/ws-follow-stream.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-6070628455943307309</id><published>2008-01-31T17:13:00.000-06:00</published><updated>2008-01-31T17:27:08.785-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ntop'/><category scheme='http://www.blogger.com/atom/ns#' term='network statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='network monitoring'/><title type='text'>Staying on top with ntop</title><content type='html'>&lt;a href="http://bp0.blogger.com/_YBjZP0h05Z0/R6JY0phqAbI/AAAAAAAAACA/FjZ4hFfmm5A/s1600-h/ntop.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5161785784443470258" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 255px; CURSOR: hand; HEIGHT: 312px" height="254" alt="" src="http://bp0.blogger.com/_YBjZP0h05Z0/R6JY0phqAbI/AAAAAAAAACA/FjZ4hFfmm5A/s320/ntop.JPG" width="257" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;People have been complaining that not enough bandwidth is available on the lab network for performing testing. To get management to spend some extra money on a faster connection, we needed proof that in fact there is not enough bandwidth.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The lab network consists of a cable modem connection to the Internet. The cable modem connects through a firewall to an internal switch. From the switch multiple internal networks are connected. We needed to find a solution with the capability to easily track network statistics. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Within a short time a solution was theorized consisting of an old Dell laptop, Linux Mint 4.0 Live CD, and ntop. Using these tools, we were able to setup an awesome monitoring station.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;By now you are asking what the heck is &lt;a href="http://www.ntop.org/overview.html"&gt;ntop&lt;/a&gt;, well check it out, ntop is a network traffic probe that shows network usage. ntop is based on libpcap and written to virtually run on every Unix platform and Win32. Users use a a web browser to navigate through ntop (that acts as a web server) traffic information and get a dump of the network status and statistics. That sounds awesome right - well it is.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;We used &lt;a href="http://linuxmint.com/"&gt;Linux Mint&lt;/a&gt; because, why not, somebody in the office had just downloaded it and wanted to try it out. Linux Mint is known to have excellent hardware support which is a good thing when using old hardware. Plugged the laptop into an empty switch port and turned on &lt;a href="http://en.wikipedia.org/wiki/Port_mirroring"&gt;port mirroring &lt;/a&gt;in order to capture all the traffic on the network.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Install process:&lt;/div&gt;&lt;div&gt;- Boot machine with the Linux Mint CD&lt;/div&gt;&lt;div&gt;&lt;span style="font-size:78%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;- Use Synaptic Package Manager to install ntop version 3.2, the current version in the Debian tree&lt;/div&gt;&lt;div&gt;&lt;span style="font-size:78%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;- Part of the installation uses an init script to get the groundwork completed&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;- start ntop; ntop needs to be run as root from the command line. (sudo ntop -w 54321)&lt;/div&gt;&lt;div&gt;54321 denotes the port to run the the web server on that displays. As a side note, you can also use -W to create an https server ifsecurity is more of an issue.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;ntop gives all sorts of stats like total bytes/packets sent and received, list all hosts that have sent packets, organizes traffic by application and protocol, and a whole host of other stats. Using the Round Robin Database plugin, you can keep detailed, long term statistics, and can print out nice fancy graphs. Hopefully with our new data statistics from ntop we will be upgrading the Internet connection.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-6070628455943307309?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/6070628455943307309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=6070628455943307309' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/6070628455943307309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/6070628455943307309'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2008/01/staying-on-top-with-ntop.html' title='Staying on top with ntop'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_YBjZP0h05Z0/R6JY0phqAbI/AAAAAAAAACA/FjZ4hFfmm5A/s72-c/ntop.JPG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-1959047936553447275</id><published>2008-01-25T17:26:00.000-06:00</published><updated>2008-01-26T07:49:46.914-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cyberwars'/><category scheme='http://www.blogger.com/atom/ns#' term='project chanology'/><title type='text'>CyberWars</title><content type='html'>&lt;span style="font-size:50%;"&gt;Photo courtesy of &lt;a href="http://www.flickr.com/photos/altemark/"&gt;altemark&lt;/a&gt;&lt;/span&gt;&lt;a href="http://www.flickr.com/photos/altemark/"&gt;&lt;img id="BLOGGER_PHOTO_ID_5159562752320733602" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 233px; CURSOR: hand; HEIGHT: 240px" height="240" alt="" src="http://bp2.blogger.com/_YBjZP0h05Z0/R5py_JhqAaI/AAAAAAAAAB4/XQZjpmNnjJ4/s320/Internet.JPG" width="271" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Reading the latest news about &lt;a href="http://en.wikipedia.org/wiki/Chanology"&gt;Project Chanology&lt;/a&gt;, defined as a digital assault on the Church of Scientology, I amazed how people are using the Internet to spread their message. Here you have a site &lt;a href="http://www.youtube.com/"&gt;YouTube &lt;/a&gt;that lets people upload videos of anything they want. What a great creative outlet, I even admit I am one of the YouTube junkies. I mean, just the other day &lt;a href="http://www.usatoday.com/tech/world/2008-01-24-davos-youtube-channel_N.htm"&gt;USA Today&lt;/a&gt; had a story about YouTube hooking up with World economic forum:&lt;br /&gt;&lt;br /&gt;“What is different is the venue. The forum is not easy to attend and not cheap, either, but by linking up with YouTube, the forum is providing numerous clips of its sessions and speeches for all to see, hear and comment on.”&lt;br /&gt;&lt;br /&gt;Through YouTube people have access to information they did not before, of course that can be said about the Internet in general. Now you find out YouTube is being used to instigate a cyberwar. It started when a &lt;a href="http://gawker.com/5002269/the-cruise-indoctrination-video-scientology-tried-to-suppress"&gt;video&lt;/a&gt; of Tom Cruise talking about Scientology was uploaded to YouTube. Parodies of the video were soon made (&lt;a href="http://www.youtube.com/watch?v=A9jqD_8IQpM&amp;amp;feature=related"&gt;My Favorite&lt;/a&gt;). Anyway, the Church of Scientology steps in and claims copyright infringements and pressures YouTube to remove the video.&lt;br /&gt;&lt;br /&gt;Once the video is removed, a group named “Anonymous” posts a &lt;a href="http://www.youtube.com/watch?v=JCbKv9yiLiQ"&gt;video&lt;/a&gt; declaring cyberwar against the Church of Scientology because “campaigns of misinformation, your suppression of dissent and your litigious nature. All of these things have caught our eye. With the leakage of your latest propaganda video into mainstream circulation the extent of your malign influence over those who have come to trust you as leaders has been made clear to us. Anonymous has therefore decided that your organization should be destroyed.".&lt;br /&gt;&lt;br /&gt;Anonymous has been successful in knocking out the Scientology website, they accomplished this using a Distributed Denial of Service Attack (&lt;a href="http://en.wikipedia.org/wiki/DDoS#Distributed_attack"&gt;DDoS&lt;/a&gt;). Linuxhaxor.net has a &lt;a href="http://www.linuxhaxor.net/2008/01/25/how-chanology-is-ddosing-church-of-scientology/"&gt;good article&lt;/a&gt; on how the attack is being performed and how to participate.&lt;br /&gt;&lt;br /&gt;This is just the latest in a list of cyber attacks that will be written about in the history books. Cyberspace has no boundaries, allowing people to accomplish anything they want. Who makes the judgment call to say that the Church of Scientology is bad and should not be allowed to pull videos that shows them in a bad light, well in cyberspace anybody can and actually have the power to attack. Of course if you are claiming free speech then that means everybody has free speech even if you don’t like them.&lt;br /&gt;&lt;br /&gt;Establishments need to recognize, once it’s out there it’s there and you just have to wait for it to pass (&lt;a href="http://gawker.com/5002269/the-cruise-indoctrination-video-scientology-tried-to-suppress"&gt;Gawker.com &lt;/a&gt;still has the video posted). Establishments should realize that tactics that work in the real world do not necessary translate to the cyber world.&lt;br /&gt;&lt;br /&gt;Note: CyberWar, Frontline has done an excellent &lt;a href="http://www.pbs.org/wgbh/pages/frontline/shows/cyberwar/"&gt;program&lt;/a&gt; on the history of cyberwar and what it means to America. I highly suggest watching it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-1959047936553447275?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/1959047936553447275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=1959047936553447275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1959047936553447275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1959047936553447275'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2008/01/cyberwars.html' title='CyberWars'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_YBjZP0h05Z0/R5py_JhqAaI/AAAAAAAAAB4/XQZjpmNnjJ4/s72-c/Internet.JPG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-959395490021410878</id><published>2008-01-22T19:03:00.000-06:00</published><updated>2008-01-22T19:22:28.301-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='risk assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='vulnerability assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Software Assessment 2.0</title><content type='html'>&lt;a href="http://ebraincore.blogspot.com/2007/12/software-risk-assessment-1.html"&gt;Up to this point&lt;/a&gt;, we have logged all the file and registry changes, and sorted through these changes to determine that the changes made by installing the software is a low risk to our secure machine. The next step, Research the product. As I think about it, this actually should be the first step.&lt;br /&gt;&lt;br /&gt;Vendor Documentation, read through the documentation in order to get an understanding of what the software does and how it does it. I usually look for technical details, such as the ports and protocols the software uses.  Note read through the user agreement, I have seen many times where it says if you install this software it gives us the right to collect information on your system or this software will phone home every so often. &lt;p&gt;An example is from the Google Earth license:&lt;/p&gt;&lt;span style="font-style: italic;"&gt;The Software may communicate with Google servers from time to time to check   for available updates to the Software, such as bug fixes, patches, enhanced   functions, missing plug-ins and new versions (collectively, "Updates").  By   installing the Software, you agree to automatically request and receive Updates.&lt;/span&gt;&lt;br /&gt;&lt;p&gt;Your security policy might state not to allow automatic updates, so you would not allow this software.&lt;/p&gt;&lt;p&gt;Also you need to know the type of data that the software processes and ensure that data is protected.  For example if you are working with health care data and the software has an internal database, then you need to ensure the software protects according to HIPAA policy by encrypting the data and only allowing authorized access.  Vendor documentation usually states the safeguards, if not contact someone at the company and ask them.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Next a vulnerability check, check the software for known vulnerabilities and issues through the use of online vulnerability databases. You can quickly search for information regarding the security of the product on the following sites:&lt;/p&gt;- &lt;a href="http://nvd.nist.gov/"&gt;National Vulnerability Database&lt;/a&gt;: U.S. government repository of standards based vulnerability management data&lt;br /&gt;- &lt;a href="http://www.securityfocus.com/"&gt;SecurityFocus&lt;/a&gt;: vendor-neutral site that provides objective, timely and comprehensive security information to all members of the security community, from end users, security hobbyists and network administrators to security consultants, IT Managers, CIOs and CSOs&lt;br /&gt;- &lt;a href="http://www.milw0rm.com/"&gt;milw0rm&lt;/a&gt;:&lt;span style="font-size:-1;"&gt;site promotes open source security by posting exploits found in popular programs&lt;/span&gt;  &lt;p&gt;By searching these sites will give you an understanding of the vulnerabilities and problems with the software, and usually mitigation techniques. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Example if we search the National Vulnerability Database for Google Earth we get (I really don't mean to pick on Google its just an easy example):&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_YBjZP0h05Z0/R5aT5eNNh3I/AAAAAAAAABw/nQlK29h7wkc/s1600-h/test.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_YBjZP0h05Z0/R5aT5eNNh3I/AAAAAAAAABw/nQlK29h7wkc/s320/test.bmp" alt="" id="BLOGGER_PHOTO_ID_5158473038769784690" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Which basically says by introducing a bad mapping file you can cause a buffer overflow in the application.  Now we know buffer overflows are possible through mapping files,  to mitigate the risk, we would enact policy to state that users can only connect to a specific mapping server (Google Earth server) or only to trusted servers. Vulnerability websites can be very useful for determining the amount of risk brought to the network and to the secure computer. If you can't find anything on those sites try Google.&lt;br /&gt;&lt;/p&gt;Another useful site is &lt;a href="http://checklists.nist.gov/"&gt;The National Checklist Program&lt;/a&gt; which is the U.S. government repository of publicly available security checklists (or benchmarks) that provide detailed low level guidance on setting the security configuration of operating systems and applications. The checklist program can give detailed guidance to securely install certain software. Based on experiences it always good to have a configuration/checklist for installing software, this is to ensure that whenever or wherever the software is installed it is always in the same configuration. Most of the time it will be up to the security professional to create this list however sometimes there is already a checklist developed that can be used.&lt;br /&gt;&lt;br /&gt;Do your research, if you want to introduce new software to your secure configuration, then you need to ensure all the homework has been done. As I said above I would actually perform this step first, you might be able to rule out installing software just based on the vulnerabilities found. If everything turns out good, then I highly suggest having an configuration/checklist guide for the software. Happy researching.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-959395490021410878?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/959395490021410878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=959395490021410878' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/959395490021410878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/959395490021410878'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2008/01/software-assessment-20.html' title='Software Assessment 2.0'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_YBjZP0h05Z0/R5aT5eNNh3I/AAAAAAAAABw/nQlK29h7wkc/s72-c/test.bmp' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-8370739439216994162</id><published>2007-12-29T19:27:00.000-06:00</published><updated>2007-12-29T19:41:06.854-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='windows file system'/><title type='text'>Software Assessment 1.2</title><content type='html'>File Changes, what constitutes a high risk file change. If you have been following along &lt;a href="http://ebraincore.blogspot.com/2007/12/software-risk-assessment-1.html"&gt;1&lt;/a&gt; &amp;amp; &lt;a href="http://ebraincore.blogspot.com/2007/12/software-assessment-11.html"&gt;1.1&lt;/a&gt;,  what we have is a list of file changes. This is a list of all modified, deleted, and added files from installing a piece of software. As before we obtained this list from running InstallWatch.&lt;br /&gt;&lt;br /&gt;First lets look at some guidance from the source itself - Microsoft. The logo program from Microsoft is a a certification that basically says that the software follows good programing guidelines and is compatible with the microsoft windows operating system. This &lt;a href="http://www.microsoft.com/downloads/info.aspx?na=120&amp;amp;p=&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=209e3d65-f0be-4eef-8602-73bb9bc29d54&amp;amp;u=details.aspx%3ffamilyid%3d209E3D65-F0BE-4EEF-8602-73BB9BC29D54%26displaylang%3den"&gt;document&lt;/a&gt; is the specifications for XP logo program (If you are looking for the Vista one its &lt;a href="http://download.microsoft.com/download/8/e/4/8e4c929d-679a-4238-8c21-2dcc8ed1f35c/Windows%20Vista%20Software%20Logo%20Spec%201.1.doc"&gt;here&lt;/a&gt;). These are the requirements from the logo document that apply:&lt;br /&gt;&lt;br /&gt;2.1 Do not attempt to replace files that are protected by Windows File Protection (.sys, .dll,.exe, .ocx os files)&lt;br /&gt;2.3 Do Not overwrite non-proprietary files with older versions&lt;br /&gt;2.5 Install to Program Files by default&lt;br /&gt;3.1 Default to the correct location for storing user-created data&lt;br /&gt;3.2 Classify and store application data correctly&lt;br /&gt;&lt;br /&gt;From these requirements, two general rules can be developed:&lt;br /&gt;&lt;br /&gt;- All files written to the Program Files folder are considered okay&lt;br /&gt;- Review the files written everywhere else&lt;br /&gt;&lt;br /&gt;Just by using these two general rules will reduce our list down from couple hundred to only having to review about 10 - 20 changes. Again I use excel to filter down the results.&lt;br /&gt;&lt;br /&gt;Basically the excel sheet logs all folders under program files where file changes are made, by doing this we can review our list quickly to ensure the program is not writing to another program's folder.&lt;br /&gt;&lt;br /&gt;The second list created (usually a short list ~10-20) is all the files and paths that are modified, created, or deleted outside of the program files folder. Especially focus on changes made to the Windows directory (windows, system32, ..), for this I use google to look up  the .dll and .ocx files that are installed, in order to determine what function they are providing. I have come across software that installs hundreds of files to the system32 folder, I then go back to the people requesting the software and ask then to find something else as this software does not following good programming practices and is a risk to the secure system.&lt;br /&gt;&lt;br /&gt;You should have anti-virus software on your computer, the anti-virus should alert you if any of the installed files are known to be malicious. Remember the point of this exercise is not to determine if the software is malicious, but to get a general idea of how the software operates and if changes the security of our secure system. We are trying to perform a quick risk assessment of a piece of software to our secure system.&lt;br /&gt;&lt;br /&gt;A book that talks about this subject is Professional Windows Desktop and Server Hardening by Roger A. Grimes - This book talks about malicious files, the following &lt;a href="http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764599909.html"&gt;website&lt;/a&gt;, with downloadable files, one file to look at is the MasterTable file.&lt;br /&gt;&lt;br /&gt;Another test that should be performed, is to see if the software can be run as a limited user under windows xp. Log into the computer as limited user, and run the program to see if it runs without errors. If a program cannot run without administrator privileges, consider this as a risk to the system - to have a secure system all users on the network should be logging in as a standard user.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-8370739439216994162?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/8370739439216994162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=8370739439216994162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/8370739439216994162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/8370739439216994162'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/12/software-assessment-12.html' title='Software Assessment 1.2'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-1392935189427284564</id><published>2007-12-21T17:31:00.000-06:00</published><updated>2007-12-21T17:42:57.017-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='windows registry'/><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><title type='text'>Software Assessment 1.1</title><content type='html'>Understanding the windows registry. This is following the previous post &lt;a id="db7y" title="Software Assessment 1" href="http://ebraincore.blogspot.com/2007/12/software-risk-assessment-1.html"&gt;Software Assessment 1&lt;/a&gt; . What we have done is installed the software using InstallWatch. This has given us a listing of all deleted, added, and modified registry keys and files. Now it's time to process this information. Let's talk about the windows registry. Basically the registry is just a database to hold settings for the operating system and the software installed. The five main trees of the registry are:&lt;br /&gt;&lt;p&gt;- &lt;a id="czsd" title="HKEY_CLASSES_ROOT" href="http://technet2.microsoft.com/WindowsServer/en/library/dd670c1d-2501-4f32-885b-0c6a1ae662f41033.mspx"&gt;HKEY_CLASSES_ROOT&lt;/a&gt;&lt;br /&gt;- &lt;a id="hjsr" title="HKEY_CURRENT_USER" href="http://technet2.microsoft.com/WindowsServer/en/library/6b6d2dcc-a083-4c49-9000-6f1324b208771033.mspx"&gt;HKEY_CURRENT_USER&lt;/a&gt;&lt;br /&gt;- &lt;a id="a.2r" title="HKEY_LOCAL_MACHINE" href="http://technet2.microsoft.com/WindowsServer/en/library/f4704e81-0b33-4ecd-b2e4-e41b50bb758c1033.mspx"&gt;HKEY_LOCAL_MACHINE&lt;/a&gt;&lt;br /&gt;- HKEY_USERS&lt;br /&gt;- &lt;a id="az12" title="HKEY_CURRENT_CONFIG" href="http://technet2.microsoft.com/WindowsServer/en/library/286f12b7-265b-4632-a4e1-987d025023e61033.mspx"&gt;HKEY_CURRENT_CONFIG&lt;/a&gt; &lt;/p&gt;&lt;p align="left"&gt;I don't have a link for HK_USERS, but basically that just contains information about each active user who has a user profile. So this information is nice and good but how does it help. For example with a typical software installation you might see about 10,000 registry changes. The proper thing would be to go through each one and ensure that the key change does not affect the security of our machine. But in the real world there is not enough time. So I have broken down this task using the following:&lt;/p&gt;&lt;p&gt;The information contained in HKEY_CLASSES_ROOT is identical to information found in the subkey HKEY_LOCAL_MACHINE\Software\Classes. Actually, these two objects are physically the same. A change made in one will automatically modify the other. - So we will ignore all HKEY_CLASSES_ROOT changes.&lt;br /&gt;&lt;br /&gt;Then I like to focus in on these keys:&lt;br /&gt;HKEY_LOCAL_MACHINE\Hardware\ - hardware changes&lt;br /&gt;HKEY_LOCAL_MACHINE\SAM\ - account changes&lt;br /&gt;HKEY_LOCAL_MACHINE\Security\ - security settings&lt;br /&gt;HKEY_LOCAL_MACHINE\System\ - contains information about the system and system configuration&lt;/p&gt;&lt;p&gt;Changes in these keys can have the effect of changing the system causing it to be inoperable or change the security of the system. Should review all changes made in the above areas.&lt;br /&gt;&lt;br /&gt;Key to look out for is the:&lt;br /&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Run or RunOnce - these keys will auto run a program&lt;/p&gt;&lt;p&gt;HKEY_CURRENT_CONFIG, key is basically the hardware profile. I usually review these changes to see what is going on. An example of something to look for is HKLM\System\Current ControlSet\Services\Tcpip\Parameters\ - this changes the tcp/ip parameters. Info on &lt;a id="dete" title="CurrentControlSet" href="http://support.microsoft.com/kb/100010"&gt;CurrentControlSet&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;It should be noted the information in HKEY_CURRENT_CONFIG is the same as HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\CurrentControlSet\Hardware Profiles&lt;/p&gt;&lt;p&gt;Our last two are the HKEY_USERS and the HKEY_Current_USER, the data in the current_user is actually a pointer to HKEY_USERS\Security. To make things easier I would just review the changes made to HKEY_USERS to see if anything seems out of place.&lt;/p&gt;&lt;p&gt;So basically you can now sort the information into two categories:&lt;br /&gt;- HKEY_LOCAL_MACHINE\Software\Classes&lt;/p&gt;&lt;p&gt;- Everything else (except the HKEY_CLASSES_ROOT).&lt;/p&gt;&lt;p&gt;The &lt;a id="w5i-" title="HKLM\Software\Classes" href="http://msdn2.microsoft.com/en-us/library/ms690440.aspx"&gt;HKLM\Software\Classes&lt;/a&gt; keys will contain all the information about the software you are installing, however they usually do not affect the security of the machine - I do keep a log of them as reference if a question arises. These keys can affect compatibility.&lt;/p&gt;&lt;p&gt;If you want to do an in-depth analysis, then you should check each key to ensure that this program is not affecting another already installed program. I find that by splitting up the keys into these two categories we go from about 10,000 to review into 30-40 keys to review. Basically just by looking at the keys it is easy to determine what they are doing or use google!&lt;/p&gt;&lt;p&gt;So how to parse the big list? Why the power of excel of course. I have an automated script that imports the output from InstallWatch and&lt;br /&gt;performs the following:&lt;br /&gt;1. Ignore all HKEY_Classes_Root&lt;br /&gt;2. Log all HKEY_LOCAL_MACHINE\Software\Classes\*\*\ to 5 places, if another key change is the same to 5 places then we ignore it&lt;br /&gt;3. Log anything else to 5 places *\*\*\*\*\, if another key change is the same to 5 places then we ignore it&lt;br /&gt;4. Separate the entries from steps 2 and 3 into 2 different spreadsheets&lt;br /&gt;5. Just review entries from step 3, to see if any key changes affect the security of the system.&lt;/p&gt;&lt;p&gt;Now is this perfect, not always, but allows us to assess the software in a relative short time frame, when we need just to get an understanding of how the software will affect our secure system. Also from this we will have log files that we can go back and review if a problem arises.&lt;/p&gt;&lt;p&gt;Two good books on this subject are:&lt;/p&gt;&lt;p&gt;Mastering Windows XP Registry by Peter Hipson&lt;br /&gt;Professional Windows Desktop and Server Hardening by Roger A. Grimes - This book has the following &lt;a id="sac8" title="website" href="http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764599909.html"&gt;website&lt;/a&gt;, with downloadable files, one file to look at is the MasterTable file. Happy Registry Analyzing!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-1392935189427284564?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/1392935189427284564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=1392935189427284564' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1392935189427284564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1392935189427284564'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/12/software-assessment-11.html' title='Software Assessment 1.1'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-5298178905683851372</id><published>2007-12-12T20:51:00.000-06:00</published><updated>2007-12-21T13:23:39.524-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software assessment'/><category scheme='http://www.blogger.com/atom/ns#' term='windows registry'/><category scheme='http://www.blogger.com/atom/ns#' term='risk assessment'/><title type='text'>Software Risk Assessment - 1</title><content type='html'>At some point, if you work in the computer security arena, you will be asked – hey we just got some software can you check it out to see if it is okay to use? So what do you do.&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;This task can be broken down into 3 parts - determine how the software affects the computer, determine the software’s vulnerabilities, and determine the network resources required to operate the software. As a side note I am going to limit this discussion to windows, since that is 90% of the world and what you often see in the business environment. Also the focus is on desktop software, web and server software is a whole another ballpark. One more assumption the source code is not available to us.&lt;/p&gt;&lt;p class="MsoNormal"&gt;The first step; determine how the software modifies the computer’s current configuration. &lt;/p&gt;&lt;p class="MsoNormal" style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in"&gt;There are a couple of ways to track changes in windows:&lt;/p&gt;- Use &lt;a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/tools_regeditors.mspx?mfr=true"&gt;regedit&lt;/a&gt; to export registry settings&lt;br /&gt;- Install the software&lt;br /&gt;- Use regedit to export registry settings&lt;br /&gt;- Use &lt;a href="http://www.grigsoft.com/download-windiff.htm"&gt;windiff&lt;/a&gt; to find differences in the two registry files&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_YBjZP0h05Z0/R2CfvayGwjI/AAAAAAAAABg/ALNXpaiIGMc/s1600-h/search.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5143286411449254450" style="FLOAT: right; MARGIN: 0pt 0pt 10px 10px; WIDTH: 272px; CURSOR: pointer; HEIGHT: 203px" alt="" src="http://bp1.blogger.com/_YBjZP0h05Z0/R2CfvayGwjI/AAAAAAAAABg/ALNXpaiIGMc/s320/search.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;- Determine file changes by using the search command to search for all files *.* , select when it was modified and enter the date the software was installed. Then sort the search results by date modified. Using the timestamps you can tell what files where modified by the installation of the software.&lt;br /&gt;&lt;p class="MsoNormal"&gt;Now that is one way, but an easier way is to use an automated program that can perform all these functions at once.&lt;span style="font-size:0;"&gt; &lt;/span&gt;&lt;a href="http://www.epsilonsquared.com/"&gt;InstallWatch&lt;/a&gt; is a free software program that will track all registry and file changes, and provides an easy to use interface.&lt;span style="font-size:0;"&gt; &lt;/span&gt;The program will also allow you to export the data into text file, for an automated means of processing. &lt;/p&gt;&lt;p class="MsoNormal"&gt;InstallWatch Process&lt;/p&gt;&lt;p class="MsoNormal" style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in"&gt;- Install InstallWatch&lt;/p&gt;&lt;p class="MsoNormal" style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in"&gt;- Use Installwatch to take a Snapshot of the computer&lt;/p&gt;&lt;p class="MsoNormal" style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in"&gt;- Install the software&lt;/p&gt;&lt;p class="MsoNormal" style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in"&gt;- Use Installwatch to take a Snapshot of the computer&lt;/p&gt;&lt;p class="MsoNormal" style="MARGIN-LEFT: 0.25in; TEXT-INDENT: -0.25in"&gt;- Installwatch will automatically compare the two snapshots and you can Review the results&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="FONT-WEIGHT: bold" href="http://bp2.blogger.com/_YBjZP0h05Z0/R2CgMqyGwkI/AAAAAAAAABo/V_CuWOr9YUg/s1600-h/install.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5143286913960428098" style="FLOAT: left; MARGIN: 0pt 10px 10px 0pt; WIDTH: 258px; CURSOR: pointer; HEIGHT: 174px" alt="" src="http://bp2.blogger.com/_YBjZP0h05Z0/R2CgMqyGwkI/AAAAAAAAABo/V_CuWOr9YUg/s320/install.JPG" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;InstallWatch gives a nice interface that shows modified, deleted and added registry and file changes.&lt;span style="font-size:0;"&gt; &lt;/span&gt;Now we have to determine which registry and file changes matter – I will talk on this later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-5298178905683851372?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/5298178905683851372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=5298178905683851372' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/5298178905683851372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/5298178905683851372'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/12/software-risk-assessment-1.html' title='Software Risk Assessment - 1'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_YBjZP0h05Z0/R2CfvayGwjI/AAAAAAAAABg/ALNXpaiIGMc/s72-c/search.JPG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-5820266059206483379</id><published>2007-12-02T07:50:00.000-06:00</published><updated>2007-12-02T08:06:52.749-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><category scheme='http://www.blogger.com/atom/ns#' term='cantenna'/><category scheme='http://www.blogger.com/atom/ns#' term='wifi'/><title type='text'>Wifi Pirate</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_YBjZP0h05Z0/R1K5JayGwgI/AAAAAAAAABI/NbFp_MXsJqg/s1600-R/p.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 158px; height: 142px;" src="http://bp3.blogger.com/_YBjZP0h05Z0/R1K5JayGwgI/AAAAAAAAABI/3f3B0AT_8TY/s200/p.jpg" alt="" id="BLOGGER_PHOTO_ID_5139373696242598402" border="0" /&gt;&lt;/a&gt;Arr!!!, I worked on this wifi project awhile back.&lt;span style=""&gt;  &lt;/span&gt;I had read on &lt;a href="http://www.google.com/search?hl=en&amp;amp;hs=jlo&amp;amp;q=satellite+dish+wifi&amp;amp;btnG=Search"&gt;several sites&lt;/a&gt;, on multiple people using satellite dishes to receive wifi signals over long distances.&lt;span style=""&gt;  &lt;/span&gt;Just so happens I had a JVC satellite dish laying around. &lt;span style=""&gt; &lt;/span&gt;My goal was to see if I could create a connection with the coffee shop (has free wifi) that is ~5miles away. &lt;span style=""&gt; &lt;/span&gt;    &lt;p class="MsoNormal"&gt;I built a &lt;a href="http://en.wikipedia.org/wiki/Cantenna"&gt;Cantenna&lt;/a&gt; and mounted it to the front of the dish with electrical tape.&lt;span style=""&gt;  &lt;/span&gt;Mounted the dish to a swivel (the swivel was for a boat seat).&lt;span style=""&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_YBjZP0h05Z0/R1K5fqyGwhI/AAAAAAAAABQ/6sR2qCQRoaE/s1600-R/jolly.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_YBjZP0h05Z0/R1K5fqyGwhI/AAAAAAAAABQ/SCFxbFBUEu8/s200/jolly.JPG" alt="" id="BLOGGER_PHOTO_ID_5139374078494687762" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;I tweaked the angle of the cantenna to the dish, by first pointing the dish at my neighbor’s wireless network, then using wood shims to lower or raise the angle of the can until I received the highest signal level.&lt;span style=""&gt;   &lt;/span&gt;I was using &lt;a href="http://www.netstumbler.com/"&gt;netstumbler&lt;/a&gt; with a dell truemobile wireless&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_YBjZP0h05Z0/R1K58qyGwiI/AAAAAAAAABY/wmVQF_dwmIE/s1600-R/car2.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp0.blogger.com/_YBjZP0h05Z0/R1K58qyGwiI/AAAAAAAAABY/THY1RT1tIgw/s200/car2.JPG" alt="" id="BLOGGER_PHOTO_ID_5139374576710894114" border="0" /&gt;&lt;/a&gt; card.&lt;/p&gt;    &lt;p class="MsoNormal"&gt;I was unable to receive the coffee shop’s wifi signal, so what does a pirate do?&lt;span style=""&gt;    &lt;/span&gt;Well mount it to your pirate ship and sail the seas.&lt;span style=""&gt;  &lt;/span&gt;So I ended up driving around with the dish just to see how many access points I could receive.&lt;span style=""&gt;    &lt;/span&gt;After about 40 minutes, I already had logged 200 access points, with about half of them unsecured.&lt;/p&gt;    &lt;p class="MsoNormal"&gt;So does this work, &lt;span style="font-weight: bold;"&gt;yes&lt;/span&gt;. Without the dish and just the cantenna I am able to pick-up about 6 wireless signals, that number doubled once the cantenna was mounted to the dish, some of the signals are very weak but I was still able to receive them.  Also the dish setup has to be aligned exactly, half-inch off and the signal is completely gone, that’s why I recommend mounting it to a swivel, this made the aligning a simple task.&lt;span style=""&gt;   &lt;/span&gt;Next step mount the dish to a motorized swivel, it would be great if the dish would auto scan the area and find the best wifi signals to use.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-5820266059206483379?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/5820266059206483379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=5820266059206483379' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/5820266059206483379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/5820266059206483379'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/12/wifi-pirate.html' title='Wifi Pirate'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_YBjZP0h05Z0/R1K5JayGwgI/AAAAAAAAABI/3f3B0AT_8TY/s72-c/p.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-7714708037816247259</id><published>2007-11-30T09:11:00.000-06:00</published><updated>2007-11-30T22:13:19.507-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>One Packet For Each IPv4</title><content type='html'>We need a program to send out a packet for every possible IPv4 address to a specific destination address. Sounds simple enough, right. Crafted up a quick bash script, uses four for loops that increment each octet of the ip address. Then the address is passed to &lt;a href="http://www.laurentconstantin.com/en/netw/netwox/"&gt;netwox&lt;/a&gt;, where it sends out a tcp packet for each address.&lt;br /&gt;3 Days later – This is still running, what’s the deal? Few calculations:&lt;br /&gt;Total IPv4 addresses 2^32 = 4,294,967,296&lt;br /&gt;Transmission rate ~ 500 packets per second (seems fast)&lt;br /&gt;Total Time for completion ~ 99 days&lt;br /&gt;Wow, we don’t have that much time!&lt;br /&gt;&lt;br /&gt;Should of started off in C, why am I so lazy all the time. So here it is a C program to send one packet for each IPv4 address. The program actually uses UDP packets, we did not want to clog the network with SYN/ACK packets. The point of the test was to test the logging capabilities of a hardware device. The device classifies received packets into separate categories based on IP address. We are using the &lt;a href="http://www.packetfactory.net/libnet/"&gt;libnet&lt;/a&gt; libraries, I am including a &lt;a href="http://www.securityfocus.com/infocus/1386"&gt;link to good article &lt;/a&gt;that tells how to use libnet, also it was compiled on Fedora Core 6, with newest libnet installed. I hard coded the mac addresses so that an ARP would not have to be performed (speeds up performance). This program was able to exhaust the IPv4 space in less than 3 days. Again the formatting of code is a little off after pasting into the blog, so review the code before using. What about IPv6 - good luck being able to do this in less than a year :)&lt;br /&gt;&lt;br /&gt;#include "libnet.h" /* replace " with &lt;&gt; */&lt;br /&gt;&lt;br /&gt;int main(void)&lt;br /&gt;{&lt;br /&gt;libnet_t *l;&lt;br /&gt;libnet_ptag_t t1, t2, i1, i2, e1, e2;&lt;br /&gt;char errbuff[LIBNET_ERRBUF_SIZE];&lt;br /&gt;u_char src_eth[6] = {0x00, 0x0B, 0xDB, 0x1E, 0x55, 0x74}; // source mac change these&lt;br /&gt;u_char dst_eth[6] = {0x00, 0x0B, 0xDB, 0x1E, 0x58, 0x0C}; //dest mac&lt;br /&gt;u_long src_ip = 0, dst_ip = 0x02046E0A; //dst_ip &lt;a href="http://en.wikipedia.org/wiki/Endianness"&gt;network byte order &lt;/a&gt;format&lt;br /&gt;u_short src_port = 23456, dst_port = 80, payload_s = 0;&lt;br /&gt;char *payload = NULL;&lt;br /&gt;int c;&lt;br /&gt;&lt;br /&gt;l = libnet_init(&lt;br /&gt;LIBNET_LINK,&lt;br /&gt;NULL,&lt;br /&gt;errbuff);&lt;br /&gt;&lt;br /&gt;t1 = libnet_build_udp(&lt;br /&gt;src_port,&lt;br /&gt;dst_port,&lt;br /&gt;LIBNET_UDP_H + payload_s, /*size*/&lt;br /&gt;0, /*checksum */&lt;br /&gt;payload,&lt;br /&gt;payload_s,&lt;br /&gt;l, /*libnet handle*/&lt;br /&gt;0);&lt;br /&gt;&lt;br /&gt;i1 = libnet_build_ipv4(&lt;br /&gt;LIBNET_IPV4_H + LIBNET_UDP_H + payload_s,&lt;br /&gt;0,&lt;br /&gt;242,&lt;br /&gt;0,&lt;br /&gt;48,&lt;br /&gt;IPPROTO_UDP,&lt;br /&gt;0,&lt;br /&gt;htonl(src_ip),&lt;br /&gt;dst_ip,&lt;br /&gt;NULL,&lt;br /&gt;0,&lt;br /&gt;l,&lt;br /&gt;0);&lt;br /&gt;&lt;br /&gt;e1=libnet_build_ethernet(&lt;br /&gt;dst_eth,&lt;br /&gt;src_eth,&lt;br /&gt;ETHERTYPE_IP,&lt;br /&gt;NULL,&lt;br /&gt;0,&lt;br /&gt;l,&lt;br /&gt;0);&lt;br /&gt;c = libnet_write(l);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;while (src_ip &lt; 0xffffffff)&lt;br /&gt;{&lt;br /&gt;src_ip++;&lt;br /&gt;i2=i1;&lt;br /&gt;i1 = libnet_build_ipv4(&lt;br /&gt;LIBNET_IPV4_H + LIBNET_UDP_H + payload_s,&lt;br /&gt;0,&lt;br /&gt;242,&lt;br /&gt;0,&lt;br /&gt;48,&lt;br /&gt;IPPROTO_UDP,&lt;br /&gt;0,&lt;br /&gt;htonl(src_ip),&lt;br /&gt;dst_ip,&lt;br /&gt;NULL,&lt;br /&gt;0,&lt;br /&gt;l,&lt;br /&gt;i2);&lt;br /&gt;&lt;br /&gt;c = libnet_write(l);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;libnet_destroy(l);&lt;br /&gt;printf ( "all done\n");&lt;br /&gt;return(0);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-7714708037816247259?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/7714708037816247259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=7714708037816247259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/7714708037816247259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/7714708037816247259'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/11/one-packet-for-each-ipv4.html' title='One Packet For Each IPv4'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-3106959919951424240</id><published>2007-11-23T10:10:00.000-06:00</published><updated>2007-11-30T22:13:51.367-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Nmap - not for every occasion</title><content type='html'>&lt;a href="http://insecure.org/nmap/"&gt;Nmap&lt;/a&gt;, if you are a practitioner in the computer security field, then you know about nmap. Basically nmap is free quick and easy to use &lt;a href="http://en.wikipedia.org/wiki/Port_scanner"&gt;port scanner&lt;/a&gt;. I have no qualms about the program, but what people must learn is that there is a time to use nmap and a time not to.&lt;br /&gt;&lt;br /&gt;Just to give some background, computers have software ports, these ports are used to map data to a particular process on a computer. For example, when you browse the web your computer uses port 80 to query web servers in order to receive the web pages. For every process that you have running on your computer that transmits and receives data across the network, there is a specific port associated with it. So in theory using a port scanner allows us to determine the processes that are running. This in turns allows us to determine if any vulnerable services are running. Now port scanning is performed on TCP and UDP ports, because these are the two protocols designated by IP&lt;br /&gt;&lt;br /&gt;Now for TCP protocol port scanners work really well, because as part of the protocol there exists the three-way handshake. Your computer sends a packet to say hi (SYN) and the other computer answers back ( hi (SYN-ACK), and then your says lets transfer some data (SYN-ACK-ACK). So for TCP port scanning unless a firewall is filtering or blocking the target computer, it will answer back on all open TCP ports to SYN packets.&lt;br /&gt;&lt;br /&gt;Now for UDP there is no handshake process, basically a UDP service just accepts all data it receives and processes it with no response back to your computer. So unless the UDP service is set to answer back or the operating system sends a message saying that port is closed, you will never know the status of a UDP port.&lt;br /&gt;&lt;br /&gt;Back to my compliant, I deal with computer security people on a daily basis. I am not knocking them, but at least 50% think that nmap is the be all end all in the security world. We receive software to test, we load it up and the first thing they want to do let’s run nmap. My response is why? – for some reason by running nmap makes you some super uber hacker – hey look guys I can run nmap yeah!&lt;br /&gt;&lt;br /&gt;Our setup:&lt;br /&gt;- we are in a network lab and not on an operational network, so we have control of all resources on the network&lt;br /&gt;- we are dealing with &lt;3 machines, with admin access to each machine&lt;br /&gt;&lt;br /&gt;Remember a port scan is only useful if a port answers back, and we can track that port back to a single process (For uber hackers, at least ensure the software is running when you perform a port scan)&lt;br /&gt;&lt;br /&gt;Countless times, I receive responses that this software does not use any network resources, because we ran nmap and there were no ports showed up.&lt;br /&gt;My first two questions:&lt;br /&gt;- Did you have the software running during the port scan? (usually No)&lt;br /&gt;- Is the firewall blocking your scan? (usually I don’t know)&lt;br /&gt;Then the response…But I can run nmap so I am an uber haxor!&lt;br /&gt;&lt;br /&gt;So what do I suggest, why not &lt;a href="http://en.wikipedia.org/wiki/Netstat"&gt;netstat&lt;/a&gt;, yes the built-in windows utility (same for linux). If you are in a testing environment, and you only have a few computers to determine open ports – why even consider nmap. &lt;em&gt;Netstat –nb&lt;/em&gt; will give you all the open ports and the process that opened it. I know running netstat is not as cool as running nmap, but with netstat you don’t have to rely on the computer to answer you back. So there is no guess work with determining if a port is open.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;But ecore what about software that only opens a port every so often to communicate&lt;/em&gt;, guess what you can script netstat to run every so often. &lt;em&gt;netstat –nb 5 &gt; log.txt&lt;/em&gt; , will write all port information into the log file every 5 seconds (If you are doing this consider using a protocol analyzer.. WireShark).&lt;br /&gt;&lt;br /&gt;Point is if you are trying to determine ports on a computer you have admin access to, nmap is not the way to go. Reserve nmap for those remote scans or when you have to test hundreds of computers. Part of being an 31337 uber haxor is knowing when and when not to use your tools.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-3106959919951424240?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/3106959919951424240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=3106959919951424240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/3106959919951424240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/3106959919951424240'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/11/nmap-not-for-every-occasion.html' title='Nmap - not for every occasion'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-1965784224605387721</id><published>2007-11-18T07:25:00.000-06:00</published><updated>2007-11-30T22:13:19.508-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>ICMPv6 Scanning</title><content type='html'>I have touched on this topic in a previous &lt;a href="http://ebraincore.blogspot.com/2007/11/scripting-netwox-ipv6-port-scanning.html"&gt;post&lt;/a&gt;, however I would like to revisit the topic.   Why would we want to perform ICMP scanning, I say why not.   Everybody is always talking about performing port scans but never ICMP scans, I say ICMP should get equal time with TCP and UDP.&lt;br /&gt;&lt;br /&gt;I know you probably have not heard of many flaws concerning ICMP but it happens.   Example, I was testing an IPv6 stack trying to determine if their were any flaws.   Found that by sending the target computer a ICMP Reply caused the target computer to send out an ICMP Request.   How does this help an attacker - the target computer was running a firewall and it was set to block ICMP requests coming in, however since the target computer was sending out a ICMP request, the firewall did not block this (You might think the firewall should block random ICMP replies coming in, but it didn't).    So this gives an attacker a way to scan the local lan and determine valid addresses of computers.&lt;br /&gt;&lt;br /&gt;A little background, ICMP packets are defined by a type and code field.   Each field is an 8 bit field meaning there are 256 possible combinations (0-255), so you have 256 codes for each of the 256 types.    If you take a look at the RFC's, you will see not all the type and code combinations are valid, or are considered reserved or undefined (&lt;a href="http://www.dailymail.co.uk/pages/live/articles/news/news.html?in_article_id=494079&amp;amp;in_page_id=1770"&gt;More Information&lt;/a&gt;).    As part of a thorough security test, we should send the computer we are testing every possible combination and see what happens.  This does not take up much time, and has very interesting results sometimes.&lt;br /&gt;&lt;br /&gt;For this example I am going to concentrate on ICMPv6 scanning.   Basic setup is a laptop running Fedora Core 6 (FC6) connected to the target computer through a generic hub.    The FC6  computer has &lt;a href="http://www.wireshark.org/"&gt;wireshark&lt;/a&gt; and the &lt;a href="http://freeworld.thc.org/thc-ipv6/"&gt;THC IPv6&lt;/a&gt; libraries installed.   Both computers have IPv6 enabled (you can give the FC6 an ipv6 address by using the ifconfig command).  I have talked about performing this scan with NETWOX, however NETWOX will not send out undefined types and codes, so this is why we are using the libraries.   Basically we start up wire shark to capture all the packets on the network and then use the THC IPv6  libraries  to send out one ICMPv6 packet for each type and code.   When performing the scan I usually set a display filter in wireshark to only display responses  from  the target computer.   Note on IPv6, the protocol IPv6 gives the host two addresses a global address and an link-local address (&lt;a href="http://en.wikipedia.org/wiki/IPv6"&gt;info&lt;/a&gt;).  The link-local address starts with fe80 and the global is basically everything else.  I suggest performing the scan with both link-local and global addresses, you usually find differences.&lt;br /&gt;&lt;br /&gt;I am posting the c-code I used to accomplish this scanning, again the formatting of the code gets thrown off when I paste it into the blog - so I apologize.  Basically the code sets up two loops in order to scan all types and codes - it should be pretty self explanatory.&lt;br /&gt;&lt;br /&gt;My main point is security professionals should be concerned with ICMP scanning instead of leaving it by the wayside.  Happy Scanning!&lt;br /&gt;&lt;br /&gt;(I scrapped the code together from memory and other sources, because I did not have access  to my program when writing this post, however  it should be enough to get you started)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;#include "stdio.h"&lt;br /&gt;#include "stdlib.h"&lt;br /&gt;#include "string.h"&lt;br /&gt;#include "unistd.h"&lt;br /&gt;#include "sys/types.h"&lt;br /&gt;#include "sys/time.h"&lt;br /&gt;#include "sys/resource.h"&lt;br /&gt;#include "sys/wait.h"&lt;br /&gt;#include "stdlib.h"&lt;br /&gt;#include "time.h"&lt;br /&gt;#include "pcap.h"&lt;br /&gt;#include "thc-ipv6.h"&lt;stdio.h&gt;&lt;stdlib.h&gt;&lt;string.h&gt;&lt;unistd.h&gt;&lt;sys h=""&gt;&lt;sys h=""&gt;&lt;sys h=""&gt;&lt;sys h=""&gt;&lt;stdlib.h&gt;&lt;time.h&gt;&lt;pcap.h&gt;&lt;/pcap.h&gt;&lt;/time.h&gt;&lt;/stdlib.h&gt;&lt;/sys&gt;&lt;/sys&gt;&lt;/sys&gt;&lt;/sys&gt;&lt;/unistd.h&gt;&lt;/string.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;//all the includes are not needed, but I got lazy&lt;br /&gt;//also I replaced the &lt;&gt; with " because blogger kept deleting the includes&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;int main(int argc, char *argv[]){&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    unsigned char *src6, *dst6, *dst61, *src61;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    unsigned char *src61, *src612, *h; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    unsigned char buf[1000];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    int pkt_len = 600;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    char *interface;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     unsigned char *pkt = NULL;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    int rawmode = 0, buf_len = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    unsigned char *srcmac, *dstmac;  //can define as null to auto generate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    int type, code, flags=0, checksum=0, i, j=0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    thc_ipv6_hdr *hdr;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;//Initializing Variables&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;rawmode = 1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;interface = "eth0";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;// source and destination ipv6 addresses&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;src6 = "fe80000000000000020bdbfffe1e580c\0";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;dst6 ="fe800000000000001c26fea710f768fd\0";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;src61 = thc_string2ipv6(src6);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;dst61 = thc_string2ipv6(dst6);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;printf("Sending Packets to %s\n", dst6);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;srcmac = thc_get_own_mac(interface);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;dstmac= thc_get_mac (interface, src61, dst61);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt;for (type=0; type&lt;256;type++)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt;for (code=0; code&lt;256;code++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;//build the packet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    if ((pkt = thc_create_ipv6(interface, PREFER_GLOBAL, &amp;amp;pkt_len, src61, dst61, 60, 0, 0, 0, 0)) == NULL)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        printf ("Packet Creation Failed\n");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;//add icmp part&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    if (thc_add_icmp6(pkt, &amp;amp;pkt_len, type, code, flags, NULL, 0, checksum)&lt;0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        return -1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;//generate packet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt;if (thc_generate_pkt(interface, srcmac, dstmac, pkt, &amp;amp;pkt_len) &lt;0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        printf("generate failed\n");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        return -1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;// send the packet out&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt;if (thc_send_pkt(interface, pkt, &amp;amp;pkt_len) &lt;0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    printf ("packet not sent \n");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;thc_destroy_packet(pkt);  //destroy the packet&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;usleep(1000);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-1965784224605387721?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/1965784224605387721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=1965784224605387721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1965784224605387721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1965784224605387721'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/11/icmpv6-scanning.html' title='ICMPv6 Scanning'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-3143006096008426021</id><published>2007-11-08T15:48:00.000-06:00</published><updated>2007-11-30T22:13:19.509-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Scripting Netwox (IPv6 Port Scanning)</title><content type='html'>As you may found out there are not currently that many tools for testing IPv6, what does one do when you need to perform a IPv6 port scan?  I accomplished this through the use of a tool called Network Toolbox (&lt;a href="http://www.laurentconstantin.com/en/netw/netwox/"&gt;http://www.laurentconstantin.com/en/netw/netwox/&lt;/a&gt;) or simply called NETWOX.  This tool supports a variety of protocols including IPv6.  On a side note use of the TCP reset tool included in NETWOX is always fun, this will sniff the network and send a TCP RST packet for each TCP connection it detects, effectively closing all TCP connections – Great fun watching the network gurus trying to diagnose that problem.&lt;br /&gt;&lt;br /&gt;Back to IPv6 port scanning, so you are required to perform a port scan in IPv6.  I know nmap has some IPv6 capabilities but I have not had much luck with it.  So basically NETWOX lets you send out a specific packet one at a time.  By automating the process we can effectively create a port scanner.  Basic methodology is I send out a IPv6 TCP packet with SYN flag set and use a protocol sniffer (wireshark) to capture the response.  All I need to do is send out one packet for each port I want to scan and then examine the sniffer file.&lt;br /&gt;&lt;br /&gt;I am running a version of linux called BackTrack (&lt;a href="http://www.remote-exploit.org/backtrack.html"&gt;http://www.remote-exploit.org/backtrack.html&lt;/a&gt;) and using a bash script to automate NETWOX.  BackTrack has wireshark builtin, so run it during the script execution and filter by responses from the target (ex. ip.src == ipaddress).  I have found this method to be reliable way to port scan IPv6 computers.  Here is the bash script for performing this:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/bash&lt;br /&gt;&lt;br /&gt;source=aaaa::20b:dbff:fe1e:5574;&lt;br /&gt;dest=aaaa::1c26:fea7:10f7:68fd&lt;br /&gt;for ((port=0 ; port&lt;=65535 ; port+=1)); do&lt;br /&gt;      netwox 146 --ip6-src $source --ip6-dst $dest --tcp-dst $port --tcp-syn --tcp-window 32000  &lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;To use, save the file as something then make it executable (chmod 777 filename), replace the source and dest addresses with your correct addresses then ./filename to run. (make sure the line that starts with netwox through –tcp-window 32000 are on the same line – formatting problems in blogspot again) and of course make sure you netwox installed.&lt;br /&gt;&lt;br /&gt;Reviewing the capture, any TCP packet for a particular port from the target computer means that port is open, cool huh? (again if you don’t understand, let me know so I can explain better)&lt;br /&gt;Now sometimes you recieve an icmp response, what does that mean depends on the response but probably that the port is closed, so whats next - ICMPv6 port scanner:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/bash&lt;br /&gt;source=fe80::20b:dbff:fe1e:5574;&lt;br /&gt;dest=fe80::1c26:fea7:10f7:68fd;&lt;br /&gt;for ((type=129 ; type&lt;=130 ; type+=1)); do     &lt;br /&gt;        for ((code=0 ; code&lt;=255 ; code+=1)); do           &lt;br /&gt;            netwox 147 --ip6-src $source --ip6-dst $dest --icmp-type $type --icmp-code $code&lt;br /&gt;       done&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;It sends out all possible type and code icmpv6 combinations.  However netwox will not send out illegal type and code combinations.  For true icmpv6 scanning (illegal combinations) I like to use the thc libraries written about in the IPv6 Firewall testing post (Nov)&lt;br /&gt;&lt;br /&gt;This is one for UDP scanning, so any response from the target on specific port means that port is open:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/bash&lt;br /&gt;&lt;br /&gt;source=8888::20b:dbff:fe1e:5574;&lt;br /&gt;dest=aaaa::1c26:fea7:10f7:68fd;&lt;br /&gt;for ((port=0 ; port&lt;=65535 ; port+=1)); do&lt;br /&gt;      netwox 145 --ip6-src $source --ip6-dst $dest --udp-dst $port --udp-src $port&lt;br /&gt;done&lt;br /&gt; &lt;br /&gt;So you get the idea, a neat little way to perform port scanning in IPv6.  Netwox is neat little collection of tools that is easy to use and very useful (especially the make coffee tool) I have also used it to perform IPv4 ICMP scans, its amazing sometimes what happens when you send some weird ICMP Packets to a computers, sometimes it answers back even if it programmed to not answer ICMP packets!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-3143006096008426021?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/3143006096008426021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=3143006096008426021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/3143006096008426021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/3143006096008426021'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/11/scripting-netwox-ipv6-port-scanning.html' title='Scripting Netwox (IPv6 Port Scanning)'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-4353613012864413379</id><published>2007-11-05T21:48:00.000-06:00</published><updated>2007-11-30T22:13:19.509-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>EtherSnoop Debacle (Parsing an EtherSnoop file)</title><content type='html'>I just love a good problem in the morning, So I receive a capture file to analyze from a fellow professional.  Him not being  super familiar with protocol analyzers, asked me to look at it.  He could not find any program (WireShark, tcpdump, netmon..) to open this file.  It had an .cap file extension and he was told that it was a network capture of UDP packets.  Basically the capture file consisted of UDP packets from some type of GPS IP enabled device.  Each packet had waypoints and time stamps, and these needed to be extracted.  I open the file in notepad, and sure enough, I can pick out longitude and latitude coordinates scrambled in the data.  So my task , if I choose to accept, is to get the time stamps and gps data out of each packet, sure why not.   Off I go, now of course picking these out by hand was not going to work, there were over 4,000 gps points in this file.  And it was not possible to repeat the test with a different known sniffer.&lt;br /&gt;&lt;br /&gt;Hey lets try excel and some vba - I know everybody is laughing but excel and vba is some powerful stuff, I have analyzed quite a few capture files this way.  I import the file and of course get meaningless crap.  I try some manipulations, I notice that "gE#" seems to proceed the data I need (sometimes?), so I write some code to put everything between "gE#" on separate rows and it seems to work kinda of.  There is still a lot of useless data in my pseudo packets.  Punk go ahead and make my day and lets pull out the big guns.&lt;br /&gt;&lt;br /&gt;Here they come, the infamous hex editor specifically my favorite because it is free is Cygnus Hex Editor (&lt;a href="http://www.softcircuits.com/cygnus/"&gt;http://www.softcircuits.com/cygnus/&lt;/a&gt;)    .  After an hour of staring at the file, it starts to make sense? There seems to always be an "&lt;" or hex 3C after the data.  Since I was told the device sends out a standard formatted UDP packet at a set period of time, you would think it would be easy to pick out a pattern.  But once I think I got a pattern, the next set of data ruins it.  What a mess.    ZOWIE!!! (yes like in the batman show) I get an e-mail from the guy that performed the capture, yep you guessed it he used ethersnoop (&lt;a href="http://www.arechisoft.com/"&gt;http://www.arechisoft.com/&lt;/a&gt;).  Just what I needed , so I download and install ethersnoop and open the file, yep it works and then the realization hits.  This capture file is full of extra packets, no filter was used for capturing, so all network traffic for about 4 hours was captured, no wonder the data was not uniform.  But I was right packets always start with hex 3C or "&lt;".   After realizing the facts, back to excel (why excel - its awesome at manipulating data).  Import the file as delimited, but don't specify a delimiter.  So you have a spreadsheet with stuff everywhere and the fun starts. First script (I do apologize for the code some reason my formatting keeps getting thrown off):   &lt;span style="font-style: italic;"&gt;Function clean()&lt;br /&gt;&lt;br /&gt;x = 0&lt;br /&gt;For i = 1 To 65535&lt;br /&gt;&lt;br /&gt;If Sheet4.Cells(i, 1) = "" Then&lt;br /&gt;x = 1&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If Sheet4.Cells(i, 1) = "" Then&lt;br /&gt;Sheet4.Rows(i).Delete&lt;br /&gt;x = 0&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If x = 1 Then&lt;br /&gt;Sheet4.Rows(i).Delete&lt;br /&gt;i = i - 1&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If Sheet4.Cells(i, 1) = "" Then&lt;br /&gt;Sheet4.Rows(i).Delete&lt;br /&gt;If Sheet4.Cells(i, 1) = "" Then&lt;br /&gt;Exit For&lt;br /&gt;End If&lt;br /&gt;End If&lt;br /&gt;Next i&lt;br /&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This script will get rid of all the non-packet data - data that lies between the Body tags in the file.  I have no idea why but you have packets grouped together then a  some data .  I have no idea what this data is, but it looked useless to me.  So after the script is run you have just the packets. Next we want to put each packet on a separate row, to make it easier to parse packets:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Function pullbrackets()&lt;br /&gt;&lt;br /&gt;g = ""&lt;br /&gt;v = 1&lt;br /&gt;For i = 1 To 65535&lt;br /&gt;&lt;br /&gt;If Sheet4.Cells(i, 1) = "" Then&lt;br /&gt;Exit For&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt; For j = 1 To Len(Sheet4.Cells(i, 1))&lt;br /&gt; y = Mid(Sheet4.Cells(i, 1), j, 1)&lt;br /&gt; b = Mid(Sheet4.Cells(i, 1), j, 1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; If y = "&lt;" Then    &lt;br /&gt;Sheet5.Cells(v, 1) = g    &lt;br /&gt;v = v + 1    &lt;br /&gt;g = ""&lt;br /&gt; End If&lt;br /&gt; g = g &amp;amp; b            &lt;br /&gt;Next j&lt;br /&gt;Next i &lt;br /&gt;End Function&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The above code looks for "&lt;" and puts all data between successive "&lt;" on one row.  Now we have an excel spreadsheet with one packet per row.  So that is the basics, of course to use the code you should modify it for your use (change the sheet designations ...) I am thinking if you are reading this you understand vba, but if not leave me a message and I can explain it more.   I did write a little more code to get the packets I wanted, but I won't bore you with that (script to sort out UDP packets then pull the data from those packets and get rid of non-ASCII data).  But anyway there you go my experiences with EtherSnoop.  In my opnion EtherSnoop is lacking since there is no way to export data, but any free program I am not going to bad mouth.  But I do prefer WireShark (&lt;a href="http://www.wireshark.org/"&gt;http://www.wireshark.org/&lt;/a&gt;) The next task what can you use to plot out 4,000 GPS points?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-4353613012864413379?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/4353613012864413379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=4353613012864413379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/4353613012864413379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/4353613012864413379'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/11/ethersnoop-debacle-parsing-ethersnoop.html' title='EtherSnoop Debacle (Parsing an EtherSnoop file)'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-3686228187962555650</id><published>2007-11-02T16:11:00.000-05:00</published><updated>2007-11-30T22:34:01.664-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='serial port'/><category scheme='http://www.blogger.com/atom/ns#' term='windows scripting host wsh'/><category scheme='http://www.blogger.com/atom/ns#' term='visual basic scripting vbs'/><title type='text'>Serial Port in WSH (vbs)</title><content type='html'>Ever Happen to you - Hey we need a program to send AT commands to a modem through the computer's serial port and store the responses to a text file and by the way we perfer a non-compiled language that will run on any windows computer.&lt;br /&gt;&lt;br /&gt;So then I thought I know we will use Windows Scripting Host, anybody with a windows computer can run a .vbs file. Did some research, not much documentationon using serial port in a vbs file just some stuff about the MSComm32 - but you have register it ( just seemed annoying). Came across ActiveComport - now this is great. By installing ActiveComport, serial port programing becomes downright simple. So I write out the program and install ActiveComport - bam works perfect. And then discover you have to pay to use ActiveComport, of course there is no money to do that, so back to the drawing board.&lt;br /&gt;&lt;br /&gt;Discovered this website &lt;a href="http://www.hardandsoftware.net/" target="_blank" rel="nofollow"&gt;http://www.hardandsoftware.net/&lt;/a&gt;, which has the NETCommOCX which is an ActiveX control that wraps the functionality of MSComm32.ocx. By the way check out the other cool stuff on the site, there are some neat thins there. NETCommOCX works perfect, and it is a free download with no restrictions. It does need to be installed on the computer you intend on using the program on.&lt;br /&gt;&lt;br /&gt;So FYI, here is the program written in vbs, basically it needs two text files command.txt and out.txt already in the directory of the program. Command.txt contains one AT command per line, so the script loads each one into an array, then writes each command to the serial port. The program then waits 300ms for a response and writes the response to the out.txt file and to the screen. The commands are issued in an infite loop until the progam is stopped (Ctrl-c). The time to wait shoud be changed based on the device. There are more advanced ways to control the flow of the program, instead of waiting for specified time it can poll the serial port for data and pause until it recieves data.&lt;br /&gt;&lt;br /&gt;program code, should be pretty self-explanatory (hopefully). The program is meant to be run with cscript - c:\cscript program.vbs&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;em&gt;S&lt;span style="font-size:+0;"&gt;&lt;/span&gt;et objComport = CreateObject( "NETCommOCX.NETComm" )&lt;br /&gt;&lt;br /&gt;objComport.CommPort = 1&lt;br /&gt;objComport.Settings = "9600,N,8,1"&lt;br /&gt;objComport.InputLen = 0&lt;br /&gt;objComport.PortOpen = True&lt;br /&gt;&lt;br /&gt;wscript.echo "Port is open and ready"&lt;br /&gt;&lt;br /&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;br /&gt;Set objTextFile = objFSO.OpenTextFile("command.txt", 1)&lt;br /&gt;&lt;br /&gt;i = 1&lt;br /&gt;&lt;br /&gt;Do Until objTextFile.AtEndOfStream&lt;br /&gt;Redim Preserve arrdata(i)&lt;br /&gt;arrData(i) = objtextfile.ReadLine&lt;br /&gt;i = i + 1&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;objTextFile.Close&lt;br /&gt;&lt;br /&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;br /&gt;Set objTextFile = objFSO.OpenTextFile("out.txt", 2)&lt;br /&gt;&lt;br /&gt;do while (1) ' wscript.stdin.atendofline&lt;br /&gt;for j = 1 to (i-2)&lt;br /&gt;str1 = arrdata(j)&lt;br /&gt;wscript.echo str1&lt;br /&gt;objComport.output = (arrdata(j)) &amp;amp; VBCR&lt;br /&gt;wscript.sleep(300)&lt;br /&gt;str = objComport.InputData&lt;br /&gt;wscript.echo str&lt;br /&gt;wscript.echo "------------"&lt;br /&gt;objTextFile.Writeline ("command: " &amp;amp; arrdata(j))&lt;br /&gt;objTextFile.Writeline (str)&lt;br /&gt;objTextFile.WriteLine ("-------------------")&lt;br /&gt;next&lt;br /&gt;loop&lt;br /&gt;&lt;br /&gt;objTextFile.close&lt;br /&gt;objComport.PortOpen = False ' Close the port &lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-3686228187962555650?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/3686228187962555650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=3686228187962555650' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/3686228187962555650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/3686228187962555650'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/11/ever-happen-to-you-hey-we-need-program.html' title='Serial Port in WSH (vbs)'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-1680207366230555005</id><published>2007-11-02T08:23:00.001-05:00</published><updated>2007-11-30T22:13:19.509-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Testing Firewalls IPv6</title><content type='html'>So we have talked before about testing firewalls in IPv4 but what about IPv6.  I was recently given the chance to test an IPv6 firewall.  So again a testing methodology would be to throw a bunch IPv6 packets at it and see how well it filters.  There is a tool called ip6sic (&lt;a href="http://ip6sic.sourceforge.net/"&gt;http://ip6sic.sourceforge.net/&lt;/a&gt;) that is a derivative of the isic tool used before.  But I guess my skills are lacking, because I had problems using this tool (especially just getting the thing to compile).  So going back to my great standby, I enlisted the help of google and found The Hacker’s Choice (&lt;a href="http://thc.org/"&gt;http://thc.org/&lt;/a&gt; ) – I have to say this is an awesome website and should be bookmarked as there is always some cool thing posted on the site.  THC has some libraries (&lt;a href="http://freeworld.thc.org/thc-ipv6/"&gt;http://freeworld.thc.org/thc-ipv6/&lt;/a&gt;) THC-IPV6 that allows one to quickly develop a program to send out IPv6 packets.  Using this library I was able to craft together some quick code to test the firewall.  Basically the code created blank IPv6 packets and filled the fields and data with random bits.  I then checked firewall logs and the sniffer capture files to determine if any packets snuck through.  Guess what, IPv6 icmp packets with type codes not defined were allowed to pass even if it was told to filter out all ICMPv6.  Even stranger certain type and code ICMPv6 packets caused the Firewall to send out an ICMP IPv6 reply packet.  Just makes my day when I get to go back to developers and show my results, of course I get the standard answer, who would ever send the firewall non defined type and code ICMPv6 packets- who knows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-1680207366230555005?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/1680207366230555005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=1680207366230555005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1680207366230555005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/1680207366230555005'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/11/testing-firewalls-ipv6.html' title='Testing Firewalls IPv6'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3660690244802655783.post-6368374972185143640</id><published>2007-11-02T08:23:00.000-05:00</published><updated>2007-11-30T22:13:19.510-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer security'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Testing Firewalls IPv4</title><content type='html'>How do we go about doing this? That was my question.  The general game plan was lets generate some packets on the external side, setup a sniffer on the internal side and see what makes it through.  I was lucky and was given a default configuration of the firewall rules that would be implemented.&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_YBjZP0h05Z0/Rysliy5Jt9I/AAAAAAAAAAM/d_KhO-52hqI/s1600-h/fw.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5128233880398706642" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_YBjZP0h05Z0/Rysliy5Jt9I/AAAAAAAAAAM/d_KhO-52hqI/s320/fw.JPG" border="0" /&gt;&lt;/a&gt; &lt;div&gt;&lt;/div&gt;&lt;div&gt;Now how about that packet generator - ????.  Fumbling around in C with some libnet libraries might sound like fun but we were pressed for time.  After some google searches, came across IP Stack Integrity Checker (ISIC) – &lt;a href="http://www.packetfactory.net/Projects/ISIC/"&gt;http://www.packetfactory.net/Projects/ISIC/&lt;/a&gt;.  This tool is awesome – here is the description from the website:&lt;br /&gt;&lt;br /&gt;ISIC is a suite of utilities to exercise the stability of an IP Stack and its component stacks (TCP, UDP, ICMP et. al.) It generates piles of pseudo random packets of the target protocol. The packets be given tendencies to conform to. Ie 50% of the packets generated can have IP Options. 25% of the packets can be IP fragments... But the percentages are arbitrary and most of the packet fields have a configurable tendency.&lt;br /&gt;&lt;br /&gt;We setup ISIC to send random IP packets with random source addresses at the firewall.  While sending packets WireShark was used peform packet captures on the internal network.  The capture file was reviwed to determine if the packets that made it through conformed to the firewall rules.  We ran the test over a weekend (~3.5 days) and it passed, no leak packets -  so we are done right?&lt;br /&gt;&lt;br /&gt;Maybe for normal network security people, but we are uber security guys – so whats next? Lets just pick on the ports that we know that are open and bombard them with packets.  Lets go back to isic and use specific ports and protocols – usually just started up isic (tcpsic, udpsic) and let it run and see if we notice anything.  Wow when hitting one particular udp port; the firewall stops responding completely and when we stop it goes back to normal.  Little more tweaking in ISIC playing with IP options (setting the percentages to 100% or 0%) we found out it’s the fragmented packets causing the problem.  Back to our C programming using libnet libraries write a quick program, and voila we have a working program that can cause a DoS on this type of firewall.  Are we done yet? – Are you kidding, firewalls are complex things that have to track a variety of variables, which of all have network attack surfaces – but how much can you get done, when you are given a week to test something. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3660690244802655783-6368374972185143640?l=ebraincore.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ebraincore.blogspot.com/feeds/6368374972185143640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3660690244802655783&amp;postID=6368374972185143640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/6368374972185143640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3660690244802655783/posts/default/6368374972185143640'/><link rel='alternate' type='text/html' href='http://ebraincore.blogspot.com/2007/11/testing-firewalls-ipv4.html' title='Testing Firewalls IPv4'/><author><name>ecore</name><uri>http://www.blogger.com/profile/06735301039984195433</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10623396224886472553'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_YBjZP0h05Z0/Rysliy5Jt9I/AAAAAAAAAAM/d_KhO-52hqI/s72-c/fw.JPG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>