<?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-5157720536595794113</id><updated>2011-11-19T20:39:58.126-05:00</updated><category term='Simulations'/><category term='Patch Management'/><category term='VBScript'/><category term='Red Hat'/><category term='Python'/><category term='Cryptography'/><category term='Firewalls'/><category term='Nikto'/><category term='SQL Injection'/><category term='LPIC'/><category term='Anti Virus'/><category term='Deployment'/><category term='Auditing'/><category term='Misc'/><category term='Cisco'/><category term='Nmap'/><category term='Protocols'/><category term='Mind Mapping'/><category term='SELinux'/><category term='Network Mapping'/><category term='CCNA'/><category term='VPN'/><category term='Scripting'/><category term='Flash'/><category term='10k Challenge'/><category term='Web Application Hacking'/><category term='OWASP'/><category term='Network Security'/><category term='CCNA:Security'/><category term='Virus'/><category term='Kickstart'/><category term='Certifications'/><category term='ModLearning'/><category term='Windows 2008'/><category term='Apache'/><category term='WSUS 3.0'/><category term='DMZ'/><category term='RHCSA'/><category term='RHCT'/><category term='Zabbix'/><category term='LAMP'/><category term='MBSA'/><category term='Policies'/><category term='Worm'/><category term='MySQL'/><category term='SSH'/><category term='Printers'/><category term='OCW'/><category term='ISCW'/><category term='Layer 2 Security'/><category term='Perl'/><category term='Exploit'/><category term='File Systems'/><category term='CCIE:Security'/><category term='ShmooCon'/><category term='PHP'/><category term='HIDS'/><category term='VMware'/><category term='RHCE'/><category term='Web Application Security'/><category term='CCSP'/><category term='Linux'/><category term='Ubuntu'/><category term='Hacking'/><category term='Bash'/><category term='XSS'/><category term='Education'/><category term='Books'/><title type='text'>Security Nut</title><subtitle type='html'>Thoughts on network &amp;amp; web security, vulnerability research, and more...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default?start-index=101&amp;max-results=100'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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>113</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-6469733422743422021</id><published>2011-06-09T19:00:00.000-04:00</published><updated>2011-06-09T19:00:11.282-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><title type='text'>RSA is in Trouble</title><content type='html'>So what do you when your main product is broken into by hackers, your intellectual property is in the hands of the unknown, and customers are in an uproar....it's time to get serious. &amp;nbsp;Back in March RSA admitted that hackers broke into their systems and compromised their RSA tokens. &amp;nbsp;Then came an attempted hack into Lockheed Martin based on their use of RSA tokens. &amp;nbsp;With the millions of customers that use RSA tokens people are starting to worry. &amp;nbsp;While RSA has been tight lipped about the attack, what exactly has been compromised, and what customers can do....competitors are starting to take action.&lt;br /&gt;&lt;br /&gt;First you need to ask yourself if you could possible trust RSA at this point in time? &amp;nbsp;Their reputation has been tarnished because of the serious hack and clients are&amp;nbsp;wavering&amp;nbsp;because of the lack of response coming from RSA. &amp;nbsp;Companies should now start asking themselves...is it time to switch vendors?&lt;br /&gt;&lt;br /&gt;Google has implemented 2 factor authentication into their Gmail recently that makes use of mobile phones. &amp;nbsp;There are a few open sources projects that also make use of this concept which is gaining in popularity. &amp;nbsp;Another alternative for companies is to look at other vendors that can offer the same products as RSA, but at a much lower price. &amp;nbsp;Entrust is a great company that claims to be able to offer great cost savings to customers that make the switch. &amp;nbsp;In addition Symantec also offers 2 factor authentication via tokens and is giving away $5 for each token that clients trade in and move over to Symantec instead. &amp;nbsp;With that kind of savings on trade ins how could you afford not to trade in?! &amp;nbsp;EMC, the parent company of RSA also doesn't seem too concerned as RSA only makes up 7% of their total annual sales.&lt;br /&gt;&lt;br /&gt;While it takes time and planning to make the change over to another vendor and product I think that there will be a major shift in 2 factor tokens coming. &amp;nbsp;I'll be interested to see what vendor takes over as a leader in this space.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6469733422743422021?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6469733422743422021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/06/rsa-is-in-trouble.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6469733422743422021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6469733422743422021'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/06/rsa-is-in-trouble.html' title='RSA is in Trouble'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-3642659836775031890</id><published>2011-06-07T08:34:00.000-04:00</published><updated>2011-06-07T08:34:14.327-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Education'/><title type='text'>A Lack of Education</title><content type='html'>About two weeks ago Rafal Los (aka Wh1t3Rabbit) posted &lt;a href="http://h30501.www3.hp.com/t5/Following-the-White-Rabbit-A/Impending-Doom-and-IT-Security-s-Downward-Spiral/ba-p/33741"&gt;a blog entry&lt;/a&gt; pondering the question of who is responsible for security; the business people or the security team? &amp;nbsp;While I don't want to rehash a lot of what has been already said in his great blog post, I do want to bring up a point that was made during this awesome conversation (you should&amp;nbsp;definitely&amp;nbsp;read his blog post if you get a chance). &amp;nbsp;Out of all the colleges in the US how many of them provide a course relating to network/web security? &amp;nbsp;The answer is much less than you think. &amp;nbsp;With all of the IT security professionals out there you would think that there would be some undergraduate and graduate courses in network and web security that deal with many of the issues plaguing businesses today. &amp;nbsp;The sad truth is that rarely do such courses exist, and the ones that do don't seem to carry the education of students far enough. &amp;nbsp;There are two issues which I see here that relate directly back to the Business vs. Security post; why are IT students the only one taking security courses when it is a common problem across all areas of study and how do we fix the lack of education in this area?&lt;br /&gt;&lt;br /&gt;The first issue poses probably the greatest threat today because anyone outside of the "IT realm" tends to not understand why security is important (some people in the realm don't understand it either). &amp;nbsp;When you look at the number of businesses in the US you will see that most of them don't have anything to do with IT. &amp;nbsp;You have financial companies, real estate, retail, construction, and many more. &amp;nbsp;The one thing they all have in common however is the fact that IT and computers are&amp;nbsp;ubiquitous in the business world. &amp;nbsp;People use web applications, Google, email, Microsoft Office, and tons of different applications and utilities to conduct business. &amp;nbsp;So if more "business" people are exposed to IT why should the security professionals be the only ones responsible for understanding how it works? &amp;nbsp;I'm not saying every single person should have formal IT security background, but a single course on security wouldn't kill anyone. &amp;nbsp;In fact, I would go as far as to say that requiring a single course on security would decrease the amount of compromised accounts and identity theft in the US because of the higher level of education that students would be armed with. &amp;nbsp;A "Business Security" course could explain to users the dangers of visiting any link that pops up in their email, or why the corporate ban on Facebook is actually imposed on them (there are many different topics that could be covered). &amp;nbsp;We should stop relying on the security professionals and customized education programs of companies to train and educate users because it isn't working. &amp;nbsp;This concept really doesn't work for smaller businesses that can't even afford to develop or implement such programs. &amp;nbsp;We need students entering the workforce to be more educated about security to help protect the companies that they go work for when they graduate. &amp;nbsp;Just because you are an English or History major doesn't mean you won't be touching a computer for the rest of your professional career. &amp;nbsp;Why have we all been accepting of the fact that security is an "IT" related function?&lt;br /&gt;&lt;br /&gt;The second issue here stems directly from the lack of choices those wanting to learn about security face. &amp;nbsp;If an undergraduate in computer science or information systems major wants to enter the information security field they will be hard pressed to find anything that will really help them build a solid foundation in this area. &amp;nbsp;The standard two courses that colleges offer are usually cryptography and a general network security course that touches lightly on a few different areas. &amp;nbsp;While these are both good courses there is nothing currently available that will show students how to program securely, defend a network, implement services securely, or become a penetration tester. &amp;nbsp;These are all topics that many IT professionals should know regardless if you are a security professional, developer, or system administrator. &amp;nbsp;Most people you find in these roles today have been hired there from other positions they have held where they *hopefully* have gained some experience in these areas. &amp;nbsp;There are many security professionals today that are so under qualified in the role that they are in, and yet we wonder why major corporations and people's personal data is hacked and stolen all the time?! &amp;nbsp;Seriously though can you really blame the "security guys"? &amp;nbsp;What training is available to them? &amp;nbsp;Someone posed a question in a forum I'm a member of which asked for a recommendation on a training course. &amp;nbsp;This person said their boss wanted the entire IT team to go to a security class on defending a network for system administrators (or something related). &amp;nbsp;Do you know that after a week of suggestions and replies that there really was nothing available for them to attend? &amp;nbsp;The current offerings deal with basic entry level security (like the Security+ classes) or hard core penetration testing (like CEH and SANS). &amp;nbsp;What happened to providing quality education or education at all for that matter?!&lt;br /&gt;&lt;br /&gt;I think that both of these problems are serious areas that need to be addressed before you can really answer the question Business vs. Security. &amp;nbsp;If each person in the business had at least *some* knowledge of IT security and security professionals where better trained, companies would have an easier time defending themselves and not have to waste so much time on risk management and remediation from hacks. &amp;nbsp;Companies would also benefit from not having to spend so much on customized training programs, security products, and audits which would in turn increase their bottom line. &amp;nbsp;Seriously...find me a CEO who wouldn't be happy about that!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-3642659836775031890?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/3642659836775031890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/06/lack-of-education.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3642659836775031890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3642659836775031890'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/06/lack-of-education.html' title='A Lack of Education'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-5312330533081198326</id><published>2011-06-03T11:43:00.001-04:00</published><updated>2011-06-03T11:48:39.163-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Hacking'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><title type='text'>Lulz Security Strikes Again</title><content type='html'>For those of you that have been following security news lately a group called Lulz Security has been hitting some big name targets lately. &amp;nbsp;First they started off with FOX then moved on the PBS and the latest today includes Sony. &amp;nbsp;First off let me make a note that this is the fourth time Sony or one of its&amp;nbsp;subsidiaries has been hacked within the last 45 days.&lt;br /&gt;&lt;br /&gt;While I don't condone hacking (unless you have permission first of course), can you really blame Lulz Security? &amp;nbsp;Seriously....when you leave your house do you leave the front door open? &amp;nbsp;If you run into the store for an hour do you leave your laptop and cell phone on the front seat of your car with the windows open?! &amp;nbsp;It's not like Lulz Security is pulling off crazy insane hacks to compromise these sites...they used a basic SQL injection attack! &amp;nbsp;Not to mention that everything they stole from Sony was stored unencrypted....let me say that again UNENCRYPTED! &amp;nbsp;What is wrong with you Sony?!&lt;br /&gt;&lt;br /&gt;Once the PS3 network was compromised and 77 million people had their personal information stolen don't you think that you should started encrypting your other databases? &amp;nbsp;I mean seriously why would you take such a risk with peoples personal info like that?&lt;br /&gt;&lt;br /&gt;Another thing that I wanted to point out is that Lulz Security has been hit hard by DDoS attacks since&amp;nbsp;announcing&amp;nbsp;that they have made the data they stole available for download on their site. &amp;nbsp;As of this morning their site was&amp;nbsp;unavailable&amp;nbsp;although I'm sure it will come back up again later today. &amp;nbsp;Why would I assume it is going to come back up...well because the team over at Lulz Security actually *knows* a thing or two about security and are leveraging a product from &lt;a href="http://www.cloudflare.com/"&gt;CloudFlare&lt;/a&gt;. &amp;nbsp;This not only super charges their site providing them with more bandwidth, but also secures their data in the cloud. &amp;nbsp;Lulz Security has also made mention in their Twitter postings that their F5 is warding off attacks like they are nothing.&lt;br /&gt;&lt;br /&gt;Again while I don't condone hacking...kudos to Lulz Security for being able to leverage technology correctly showing companies like Sony what it means to implement a website securely and without issues :-P &amp;nbsp;Companies really need to start asking themselves...if hackers can break into their networks and websites...why is it that their very skilled, highly paid, security team can't protect against these attacks? &amp;nbsp;Many it is time for companies to start re-reevaluating their security staff and stop blaming people like Lulz Security for breaking into their site!&lt;br /&gt;&lt;br /&gt;I will update here as more information about these particular hacks or more hacks from Lulz Security develop.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-5312330533081198326?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/5312330533081198326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/06/lulz-security-strikes-again.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5312330533081198326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5312330533081198326'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/06/lulz-security-strikes-again.html' title='Lulz Security Strikes Again'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-2457454900588129266</id><published>2011-05-23T17:20:00.003-04:00</published><updated>2011-05-23T17:24:07.814-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><category scheme='http://www.blogger.com/atom/ns#' term='Zabbix'/><title type='text'>Zabbix Cross-Site Scripting Vulnerability</title><content type='html'>Apparently it's my lucky day! &amp;nbsp;Second vulnerability found in the Zabbix monitoring platform today. &amp;nbsp;This is a non-persistent XSS vulnerability found in the acknow.php web page. &amp;nbsp;The following bit of code is not sanitized or filtered at all:&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/-j3VDxr0_zeE/TdrPVnIPNeI/AAAAAAAAACY/NlGLfswZs3Q/s1600/zabbix_xss3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="98" src="http://4.bp.blogspot.com/-j3VDxr0_zeE/TdrPVnIPNeI/AAAAAAAAACY/NlGLfswZs3Q/s320/zabbix_xss3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;When making a request to the acknow.php web page the "backurl" parameter is populated with a value but never checked to ensure it hasn't changed (think integrity checking here). &amp;nbsp;By editing the "backurl" parameter and closing the JavaScript tag it is a part of you can complete a block of code. &amp;nbsp;Notice the underlined bit in red...this closing tag allows us to end one code block and then create our own injecting the XSS script. &amp;nbsp;Here is the initial web page:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-J83gOFhJzCQ/TdrMj0aQ8FI/AAAAAAAAACM/6CkLZ4-rdWw/s1600/zabbix_xss.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" src="http://4.bp.blogspot.com/-J83gOFhJzCQ/TdrMj0aQ8FI/AAAAAAAAACM/6CkLZ4-rdWw/s320/zabbix_xss.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;You can go ahead and insert any text in the message field it is irrelevant. &amp;nbsp;Use a proxy to capture the request and manipulate the "backurl" parameter:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-MtZTPLDxBGU/TdrQSINq0cI/AAAAAAAAACk/63JT2ns4crM/s1600/zabbix_xss1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="122" src="http://1.bp.blogspot.com/-MtZTPLDxBGU/TdrQSINq0cI/AAAAAAAAACk/63JT2ns4crM/s320/zabbix_xss1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The resulting web page should show you the XSS attack results:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-_57PveCsTTU/TdrMko2mSyI/AAAAAAAAACU/4kM7Gf3Yn7k/s1600/zabbix_xss2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" src="http://3.bp.blogspot.com/-_57PveCsTTU/TdrMko2mSyI/AAAAAAAAACU/4kM7Gf3Yn7k/s320/zabbix_xss2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I'm going to have to keep hunting to see if I can find anything else amiss in Zabbix ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-2457454900588129266?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2457454900588129266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/05/zabbix-cross-site-scripting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2457454900588129266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2457454900588129266'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/05/zabbix-cross-site-scripting.html' title='Zabbix Cross-Site Scripting Vulnerability'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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://4.bp.blogspot.com/-j3VDxr0_zeE/TdrPVnIPNeI/AAAAAAAAACY/NlGLfswZs3Q/s72-c/zabbix_xss3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-102306418194785795</id><published>2011-05-23T15:58:00.004-04:00</published><updated>2011-05-23T18:15:38.574-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><category scheme='http://www.blogger.com/atom/ns#' term='Zabbix'/><title type='text'>Zabbix Cookie Replay Vulnerability</title><content type='html'>Everyone should be&amp;nbsp;familiar&amp;nbsp;with monitoring software to some extent. &amp;nbsp;Zabbix is a distributed monitoring solution with an actually large support base. &amp;nbsp;Recently I discovered that you can replay a user's cookie to log in as that specific user without knowing their username or password. &amp;nbsp;The vulnerability works as follows:&lt;br /&gt;&lt;br /&gt;Generating an email/phising site/etc you can send the end user a link which would require them to login to the fake site. &amp;nbsp;Once they attempt to login you can log them into the zabbix portal via the API and pass the valid session off to the end user, but not before stealing a copy of the now valid cookie. &amp;nbsp;As long as their session remains valid (ie. they don't instantly logout), you can pass the caputred cookie to the login page and become authenticated as the user. &amp;nbsp;Obviously from here you can change the password and more depending on the permissions level. &amp;nbsp;While this may not give you access to servers and systems directly you will be able to view anything that the Zabbix monitor is setup for and depending on your Zabbix configuration remotely execute commands on each agent.&lt;br /&gt;&lt;br /&gt;Once you login the following cookie set on your system:&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/-vcpcI49N96E/Tdq8IU4LZfI/AAAAAAAAAB8/SUXsY08oG2A/s1600/zabbix_cookie.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="208" src="http://2.bp.blogspot.com/-vcpcI49N96E/Tdq8IU4LZfI/AAAAAAAAAB8/SUXsY08oG2A/s320/zabbix_cookie.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;From the image above you can see there is only a single cookie and it is accessible via script. &amp;nbsp;Once your end user has logged in go and visit the URL of the login page to obtain a cookie (a new value for the content field is generated but will be overwritten so it doesn't matter). &amp;nbsp;Replace the content field with the value stolen from the user's cookie:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-IN0MFRzbIHA/Tdq8vvSuIHI/AAAAAAAAACI/wBf9pOS5Iuk/s1600/zabbix_cookie1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" src="http://3.bp.blogspot.com/-IN0MFRzbIHA/Tdq8vvSuIHI/AAAAAAAAACI/wBf9pOS5Iuk/s320/zabbix_cookie1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Once you save the cookie, just refresh the page, and you should be authenticated:&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/-GHr0knAWuhI/Tdq8SFOuBWI/AAAAAAAAACE/r34YbO-JybY/s1600/zabbix_cookie2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="61" src="http://1.bp.blogspot.com/-GHr0knAWuhI/Tdq8SFOuBWI/AAAAAAAAACE/r34YbO-JybY/s320/zabbix_cookie2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If the user logs out before you have had a chance to conduct the attack it won't work. &amp;nbsp;The cookie is generated based on the sum of the following equation: MD5(username, password, current time). &amp;nbsp;The session is then recorded in a data with the MD5 and changed every time your login/logout/close the browser. &amp;nbsp;There is also a timeout value that you can set to force a session invalid, but it doesn't prevent this attack. &amp;nbsp;Once you are logged in, change the user's password to maintain access.&lt;br /&gt;&lt;br /&gt;Game Over.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Disclaimer: So far I have confirmed this works in all version of 1.8.x and 1.9.x of Zabbix. &amp;nbsp;The vendor has also been notified of the issue. &amp;nbsp;One idea would be to use a session ID to validate that only one session at a time can make use of a cookie value.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-102306418194785795?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/102306418194785795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/05/zabbix-cookie-replay-attack.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/102306418194785795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/102306418194785795'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/05/zabbix-cookie-replay-attack.html' title='Zabbix Cookie Replay Vulnerability'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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/-vcpcI49N96E/Tdq8IU4LZfI/AAAAAAAAAB8/SUXsY08oG2A/s72-c/zabbix_cookie.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-6592193923441164367</id><published>2011-05-23T09:39:00.000-04:00</published><updated>2011-05-23T09:39:23.314-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><title type='text'>LinkedIn Cookie/Session Vulnerability</title><content type='html'>Well it isn't *really* a vulnerability as much as it is a design / architectual flaw. &amp;nbsp;When you visit a website that uses cookies, the cookie set when you login. &amp;nbsp;When the cookie becomes set there is usually a time value associated with the cookie representing how long the cookie is valid for (which is essentially how long it will be until you need to re-authenticate to the site). &amp;nbsp;Usually you will see a cookie set to expire 24 - 48 hours after it is set. &amp;nbsp;Some sites like Google allow you to keep your cookie valid for a period of 30 days so you won't have to login every single time. &amp;nbsp;Banks on the other hand usually only allow for a few hours with a 10 - 15 minute timeout of inactivity. &amp;nbsp;Given all this what really is the problem with LinkedIn then? &amp;nbsp;Well a cookie that has not yet expired can be used to authenticate to a site, possibly without knowing the username or password of the user. &amp;nbsp;The question now remains, "how is LinkedIn Vulnerable then"?&lt;br /&gt;&lt;br /&gt;I'm sure many of you are now looking up your LinkedIn cookie in the browser and reviewing some other cookies for other sites too. &amp;nbsp;You may have noticed that many other sites don't expire their cookies for a year either. &amp;nbsp;The issue here isn't that the cookie doesn't expire for a year; it's that the what is contained in the cooke doesn't expire for a year. &amp;nbsp;For example here is what you might see:&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/-GE7PN0qKcMk/TdpjMXa5JYI/AAAAAAAAAB4/wj0FleIjGEs/s1600/auth.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="173" src="http://1.bp.blogspot.com/-GE7PN0qKcMk/TdpjMXa5JYI/AAAAAAAAAB4/wj0FleIjGEs/s320/auth.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Notice that the auth cookie is valid for one year. &amp;nbsp;Normally this wouldn't be an issue because the web application should still expire the session and force a new login when an "old" cookie is pushed up to the server during login. &amp;nbsp;With LinkedIn this isn't the case. &amp;nbsp;Even if you change your password and/or logout...the "old" cookie is still considered valid and can be used to replay the session. &amp;nbsp;If you copy the Content section of this cookie, then login/logout of LinkedIn, the value of content should change. &amp;nbsp;Just paste back in the original value and the cookie should still work no problem.&lt;br /&gt;&lt;br /&gt;This is actually a simple fix on LinkedIn's side in that they should not allow "old" cookies to be used after the session is expired or timed out. &amp;nbsp;Hopefully they will update this soon, but in the meantime you can delete your cookie after visiting the site or ensure that no one steals your cookie until they perform an update.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;Disclaimer&lt;/b&gt;: Rishi Narang is the person who discovered this vulnerability in LinkedIn's site. &amp;nbsp;This post is just an&amp;nbsp;explanation&amp;nbsp;of the issue.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6592193923441164367?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6592193923441164367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/05/linkedin-cookiesession-vulnerability.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6592193923441164367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6592193923441164367'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/05/linkedin-cookiesession-vulnerability.html' title='LinkedIn Cookie/Session Vulnerability'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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/-GE7PN0qKcMk/TdpjMXa5JYI/AAAAAAAAAB4/wj0FleIjGEs/s72-c/auth.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-2740635694293172661</id><published>2011-04-26T11:15:00.002-04:00</published><updated>2011-04-26T11:15:39.443-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OWASP'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><title type='text'>OWASP Challenge!</title><content type='html'>If you haven't already signed up you should head over to the OWASP Hackedemic Challenge! &amp;nbsp;OWASP has a fairly new open source project called OWASP Hackademic, which is really good for testing your web application security skills. &amp;nbsp;The open source version of the project can be found at:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://www.owasp.org/index.php/OWASP_Hackademic_Challenges_Project"&gt;https://www.owasp.org/index.php/OWASP_Hackademic_Challenges_Project&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In addition to the open source project there is a live version online! &amp;nbsp;There is a new challenge every week with the online versioin and the challenges range from quick and easy to "really make you think". &amp;nbsp;Take a look at the live version and see if you can complete each of the 3 challenges each week:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.hackademic.eu/index.php"&gt;http://www.hackademic.eu/index.php&lt;/a&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/5157720536595794113-2740635694293172661?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2740635694293172661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/04/owasp-challenge.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2740635694293172661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2740635694293172661'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/04/owasp-challenge.html' title='OWASP Challenge!'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-6687213312566072056</id><published>2011-04-24T21:51:00.000-04:00</published><updated>2011-04-24T21:51:00.989-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Are TV Shows Exposing Personal Data?</title><content type='html'>Every Friday for the last few weeks I sit down to watch my new favorite show, "Shark Tank"! &amp;nbsp;For those of you that don't know/follow the show let me give you a quick run down. &amp;nbsp;There is a panel of 5 billionaire investors that hear sales pitches from&amp;nbsp;entrepreneurs&amp;nbsp;who think that they have the next big "thing". &amp;nbsp;These investors, also called sharks, will either reject the deal presented to them or accept the deal and possibly fight the other sharks. &amp;nbsp;The concept of the show is great and it's amazing to see the things that people think of! &amp;nbsp;So what does this show have to do with your personal data?! &amp;nbsp;Let me tell you...&lt;br /&gt;&lt;br /&gt;According to recent information there are about 6 million people or so that are watching this show every Friday night. &amp;nbsp;Now that is a fairly decent audience that is being exposed to whatever the entreprenuer is demonstrating that night and of course...their products. &amp;nbsp;These 6 million viewers actually have a huge impact on the security of the small business that each entreprenuer has (I will explain how in a second). &amp;nbsp;For those of you that aren't aware, small businesses make up 85% of the business in the USA. &amp;nbsp;Unless you have a decent technical background, a good technical friend, or unlimited time on your hands; chances are you hire someone when it comes to the technology aspect of your small business. &amp;nbsp;Here are the common items usually needed when setting up your technology for a small business:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Website&lt;/li&gt;&lt;li&gt;E-Commerce System (Shopping Cart or Ordering System)&lt;/li&gt;&lt;li&gt;Hosting provider (to host your website)&lt;/li&gt;&lt;li&gt;Possibly a database (to track orders / customer data)&lt;/li&gt;&lt;li&gt;Email&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If you are like the average small business owner you are going to hire someone to help you put all this together. &amp;nbsp;A web design company for your website and e-commerce, someone else to setup the website on the hosting provider, and yet another to configure your email and software. &amp;nbsp;You could also hire the same company to do all of these things for you. &amp;nbsp;So where exactly is the problem? &amp;nbsp;Well...most of the small business owners are actually using other small businesses to setup/design/deploy the above items. &amp;nbsp;Most small businesses also aren't trained properly to code/setup/design websites and e-commerce sites&amp;nbsp;securely&amp;nbsp;(largely in part to the fact that they are a small business and don't have a huge training budget or staff to train them properly).&lt;br /&gt;&lt;br /&gt;So here is where TV and Shark Tank comes in. &amp;nbsp;Last week a woman who makes cakes went on the show and pitched her cakes as "the best". &amp;nbsp;It turns out that people really like cake and decided to visit her website and possibly buy a cake. &amp;nbsp;Out of the 6 million people watching somewhere around 75,000 of them tried to access her website at the same time within an hour, inadvertently causing a &lt;a href="http://en.wikipedia.org/wiki/Denial-of-service_attack"&gt;Denial of Service&lt;/a&gt; (DoS) attack on her website (this is where the website goes down because of too many requests at the same time). &amp;nbsp;Once the site came back up, Twitter was all buzzing about the tons and tons of people that ordered a cake from her site. &amp;nbsp;Being intrigued myself I looked around her website and actually found an error or two. &amp;nbsp;Then I checked the website of another small business owner that appeared on the show earlier that same day, and again found a few errors. &amp;nbsp;My point here is that these websites shouldn't be causing errors and these errors could *possibly* be security holes due to quick or inexperienced technical persons setting up the site.&lt;br /&gt;&lt;br /&gt;Imagine if you were one of the 75,000 people who ordered a cake only to find out that the website you ordered a cake from was compromised?! &amp;nbsp;You name, credit card, etc. are now in the hands of a malicous user and you probably won't know because small businesses don't usually have the resources to detect these kinds of attacks. &amp;nbsp;While I'm obviously talking in extremes at this point, the insecurity of small business websites and serious security concerns is not something we should just ignore. &amp;nbsp;Shows like Shark Tank are exposing small businesses to the masses and customers are flocking quickly to check out the latest products. &amp;nbsp;While small businesses are great and I'm a huge supporter of them, I strongly suggest that all small business owners take the time to invest in security for their websites and e-commerce platforms. &amp;nbsp;Nothing is more embarressing then your entire customer list or credit cards being stolen/exposed...that is defintely one quick way to lose all your customers. &amp;nbsp;Make sure as a small business owner you educate yourself to web attacks like Cross Site Scripting and SQL Injection. &amp;nbsp;Even if you know nothing about technology you should invest the time to learn.&lt;br /&gt;&lt;br /&gt;The best defense is a good offense, so small business owners should try the following:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Educate yourself on web application security (&lt;a href="https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project"&gt;OWASP Top 10&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Ensure you use strong passwords when working with small business accounts (&lt;a href="http://www.passwordmeter.com/"&gt;Strong Passwords&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Test (or hire a tester) for your website security&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If you have any questions about website security or would like any recommendations on companies that can help you with security, you &amp;nbsp;can check out &lt;a href="http://modlearning.com/"&gt;ModLearning&lt;/a&gt; or email &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;support [at] modlearning [dot] com&lt;/span&gt;. &amp;nbsp;Small business owner questions always welcome.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;**I'm not knocking on Shark Tank in any way and think the show is great! &amp;nbsp;I totally feel it is the responsibility of the business owner to ensure website security. &amp;nbsp;There are tons of other shows similar to Shark Tank that drive users to products.**&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6687213312566072056?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6687213312566072056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/04/are-tv-shows-exposing-personal-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6687213312566072056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6687213312566072056'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/04/are-tv-shows-exposing-personal-data.html' title='Are TV Shows Exposing Personal Data?'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-262737470408035090</id><published>2011-04-20T15:59:00.000-04:00</published><updated>2011-04-20T15:59:06.768-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Policies'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Password Suggestions?</title><content type='html'>It's no wonder that people are choosing bad or commonly guessed passwords today. &amp;nbsp;I was having a look over at Citibank's password policies and it seems that the passwords they suggest to customers aren't very secure. &amp;nbsp;I'm sure Citibank isn't the only guilty party, but I've decided to pick on them today.&lt;br /&gt;&lt;br /&gt;Here is what their password policy entails:&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/-oFr4GMDAPJw/Ta86XanxB4I/AAAAAAAAAB0/oizI_U0e2h4/s1600/citi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="217" src="http://2.bp.blogspot.com/-oFr4GMDAPJw/Ta86XanxB4I/AAAAAAAAAB0/oizI_U0e2h4/s320/citi.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Notice the highlighted words they suggest as a combination for your password choice. &amp;nbsp;Using&amp;nbsp;&lt;a href="http://www.passwordmeter.com/"&gt;http://www.passwordmeter.com/&lt;/a&gt;&amp;nbsp;as a reference to check the strength of the passwords they suggest, they all seem to score as "weak". &amp;nbsp;While it isn't Citibank's fault when users choose poor passwords, Citibank could take a few extra steps to suggest passwords that are....you know....actually strong?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-262737470408035090?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/262737470408035090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/04/password-suggestions.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/262737470408035090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/262737470408035090'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/04/password-suggestions.html' title='Password Suggestions?'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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/-oFr4GMDAPJw/Ta86XanxB4I/AAAAAAAAAB0/oizI_U0e2h4/s72-c/citi.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-2904688204005533696</id><published>2011-04-18T22:09:00.001-04:00</published><updated>2011-04-18T22:10:05.383-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RHCSA'/><category scheme='http://www.blogger.com/atom/ns#' term='Kickstart'/><title type='text'>New Kickstart Module</title><content type='html'>One of the most popular pages on this blog is for Kickstart setup and configuration. &amp;nbsp;Now you can check out a new module that is available over at &lt;a href="http://modlearning.com/"&gt;Modular Learning&lt;/a&gt;. &amp;nbsp;This module provides step by step instructions to setting up a Kickstart server, Kickstart config file building, and testing a client installation. &amp;nbsp;Also included is some sample config files.&lt;br /&gt;&lt;br /&gt;Check out the new course @ &lt;a href="http://modlearning.com/kickstart.php"&gt;http://modlearning.com/kickstart.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A more advanced course for Kickstart is currently being developed as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-2904688204005533696?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2904688204005533696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/04/new-kickstart-module.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2904688204005533696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2904688204005533696'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/04/new-kickstart-module.html' title='New Kickstart Module'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8801433524406868635</id><published>2011-04-05T18:14:00.000-04:00</published><updated>2011-04-05T18:14:37.642-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><title type='text'>Info Leakage through Web Site Stats</title><content type='html'>I went to go check the stats for my blog today and noticed an&amp;nbsp;unusual&amp;nbsp;link listed as being monitored. &amp;nbsp;Upon further research it seems that the link is actually a web page from the blog that someone had downloaded onto their desktop. &amp;nbsp;Looking back at some hits to the site, I noticed that this isn't the first time that someone's local location has been disclosed to my stats counter (see Figure).&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/-JfJT5Wfwghk/TZuULRFSXgI/AAAAAAAAABw/m7AKvZabR1I/s1600/info_leakage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://1.bp.blogspot.com/-JfJT5Wfwghk/TZuULRFSXgI/AAAAAAAAABw/m7AKvZabR1I/s320/info_leakage.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;You can see that the location of the user's desktop is shown (even though there is no use in that), the person's username (and therefore their account) is being exposed. &amp;nbsp;If you have high profile website that many people are pulling web pages from you could essentially put together a user list, which can be used later on for password guessing. &amp;nbsp;This little flaw is a great example of information leakage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8801433524406868635?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8801433524406868635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/04/info-leakage-through-web-site-stats.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8801433524406868635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8801433524406868635'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/04/info-leakage-through-web-site-stats.html' title='Info Leakage through Web Site Stats'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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/-JfJT5Wfwghk/TZuULRFSXgI/AAAAAAAAABw/m7AKvZabR1I/s72-c/info_leakage.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-6117066651528866946</id><published>2011-04-04T10:06:00.001-04:00</published><updated>2011-04-04T20:54:07.269-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>The Unavoidable</title><content type='html'>Ever notice that little fine print at the end of whatever service you are signing up for? &amp;nbsp;It usually has some baloney about being secure, you having a right to privacy, and the that they may/may not share your information with a 3rd party. &amp;nbsp;At the end of the day no one *really* halts the registration process because they are worried about who might be getting their data. &amp;nbsp;While this isn't a huge concern or worry....it becomes a nightmare when you start to find that the 3rd party one company refers to is the same 3rd party another company is referring too.&lt;br /&gt;&lt;br /&gt;Over the weekend a massive number of articles and postings about the company Epsilon being hacked. &amp;nbsp;Epsilon, which provides emailing services for about 2500 companies worldwide (about 40 billion e-mails a year), disclosed that they had been hacked...with hackers taking only first names and email addresses (so far). &amp;nbsp;The average person might be thinking at this point, "Who cares I've never even heard of Epsilon?! &amp;nbsp;Stuff like this happens all the time". &amp;nbsp;While normally I would agree with most of you, it turns out that Epsilon manages email for many big name companies including banks.&lt;br /&gt;&lt;br /&gt;Here is a list of companies so far that have been affected and have been sending out notices to their customers:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Barclay&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Kroger&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Brookstone.com&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Walgreens&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;U.S. Bank&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;New York &amp;amp; Co.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;JP Morgan Chase&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;McKinsey Quarterly&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;TiVo&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Capital One&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;City Market&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Fred Meyer&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Fry's&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Marriott Rewards&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Ritz Carlton&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Smith Brands&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Citi&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Home Shopping Network&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Dillons&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Jay C&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Food 4 Less&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;King Snoopers&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;QFC&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Ralphs&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Ameriprise&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;Disney Destinations&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;AbeBooks&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;RobertHalfTechnology&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, geneva, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;For those of your browsing this list...your eyes might be getting bigger by the second. &amp;nbsp;These aren't small companies. &amp;nbsp;The fact that so many companies are looking foolish because of placing their trust in the same 3rd party for email really makes me start to wonder why there aren't any audits or safeguards in place for things like these. &amp;nbsp;While we can't be protected from everything it's pathetic that such a simple hack affects such high profile companies and the phising/spamming that is about to ensure is going to be unreal....&lt;br /&gt;&lt;br /&gt;UPDATE - Add a few more to the list:&lt;br /&gt;&lt;br /&gt;Target.com&lt;br /&gt;Best buy&lt;br /&gt;&lt;br /&gt;There are about 50 major companies on the list so far....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6117066651528866946?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6117066651528866946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/04/unavoidable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6117066651528866946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6117066651528866946'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/04/unavoidable.html' title='The Unavoidable'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-5059119846666275590</id><published>2011-04-03T10:27:00.000-04:00</published><updated>2011-04-03T10:27:32.686-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCSA'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>Official Book Announcement</title><content type='html'>I know it's been a long time come and I'm sorry to all for the delay! &amp;nbsp;The digital release of my book is now available at the InformIT website:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.informit.com/store/product.aspx?isbn=0321767950"&gt;http://www.informit.com/store/product.aspx?isbn=0321767950&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The hard copy of the book will also be available sooner than I anticipated as well (coming between April 20th and April 30th). &amp;nbsp;You can purchase a hard copy through Amazon, InformIT, and others:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Hands--Guide-Red-Hat-Exams/dp/0321767950/ref=sr_1_3?ie=UTF8&amp;amp;qid=1301840369&amp;amp;sr=8-3"&gt;http://www.amazon.com/Hands--Guide-Red-Hat-Exams/dp/0321767950/ref=sr_1_3?ie=UTF8&amp;amp;qid=1301840369&amp;amp;sr=8-3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As more sites make the book available for order I will add them here.&lt;br /&gt;&lt;br /&gt;Thanks to all those that have provided feedback so far and good luck to all that are preparing for either the RHCSA or RHCE exams!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-5059119846666275590?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/5059119846666275590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/04/official-book-announcement.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5059119846666275590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5059119846666275590'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/04/official-book-announcement.html' title='Official Book Announcement'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-1065749406928785310</id><published>2011-04-01T09:38:00.002-04:00</published><updated>2011-04-01T09:48:10.324-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><title type='text'>Screen Scraping (XSS Hunting)</title><content type='html'>I was working with Damn Vulnerable Web App (DVWA) yesterday and the XSSMe plugin for Firefox and I wondered how hard it would be to write my own. &amp;nbsp;While this is a great plugin and very useful, I'm more of a command line person. &amp;nbsp;For those of you that haven't used the XSSMe plugin, it will search for all &amp;lt;input&amp;gt; tags on the current web page and then present you will a list of pre-defined strings you can use to exploit XSS.&lt;br /&gt;&lt;br /&gt;I wrote up a quick demo of something similar on the command line which gives a little more info than the XSSMe plugin, but still accomplishes the same goal. &amp;nbsp;Here is the code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;from HTMLParser import HTMLParser&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;from urllib2 import urlopen&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;sites = []&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;class Spider(HTMLParser):&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;def __init__(self, url):&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;HTMLParser.__init__(self)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;req = urlopen(url)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;self.feed(req.read())&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;def handle_starttag(self, tag, attrs):&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;if tag == 'form' and attrs:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print ""&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print "---- Form Found ----"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;print "Num of attributes: " + str(len(attrs)) + "\n"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;for key, value in attrs:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;print "[" + str(key) + "] -&amp;gt; [" + str(value) + "]"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;if tag == 'input' and attrs:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;global sites&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;for key, value in attrs:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;if key == "name" and value != "":&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;sites.append(value)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;print "Enter a URL (ie. http://example.com)"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;start_url = raw_input()&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;print ""&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;print "***** Starting Scan *****\n"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;print "URL: " + start_url + "\n"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Spider(start_url)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;print ""&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;print "There are " + str(len(sites)) + " possible targets on this page:"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;print sites&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;print ""&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When you launch this little python script it will prompt you for a URL. &amp;nbsp;The script will connect to the URL entered and hunt for any &amp;lt;form&amp;gt;&amp;nbsp;elements. &amp;nbsp;It will output the attributes associated with the  elements allowing you to see what method is being used and what action is being performed. &amp;nbsp;Once all the&amp;nbsp;&amp;lt;form&amp;gt;&amp;nbsp;elements are collected it will then move on to&amp;nbsp;&amp;lt;input&amp;gt;&amp;nbsp;tags. &amp;nbsp;All entries found will then be displayed as "possible" targets. &amp;nbsp;Although this isn't a complete script XSS automation tool...it is a good start to collect possible targets on a web page. &amp;nbsp;Here is a sample:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Enter a URL (ie. http://example.com)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;http://new.babbaco.com&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;***** Starting Scan *****&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;URL: http://new.babbaco.com&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;---- Form Found ----&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Num of attributes: 5&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[id] -&amp;gt; [search]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[class] -&amp;gt; [search]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[action] -&amp;gt; [http://babbaco.com/SearchResults/tabid/37/Default.aspx]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[method] -&amp;gt; [get]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[role] -&amp;gt; [search]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;---- Form Found ----&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Num of attributes: 4&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[name] -&amp;gt; [news]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[form] -&amp;gt; [None]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[action] -&amp;gt; [/thanks]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[method] -&amp;gt; [GET]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;---- Form Found ----&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Num of attributes: 2&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[action] -&amp;gt; [/thanks]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;[method] -&amp;gt; [GET]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;There are 4 possible targets on this page:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;['Search', 'email', 'enter', 'email']&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;From the output here you will see that there are three forms on this page and four possible targets to examine. &amp;nbsp;Each form uses the GET method so it should be pretty easy to send a response to the server with pre-defined XSS strings to test for vulnerabilites.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You could further extend this script by allowing it to spider across the entire site recursively and/or save the output to a file. &amp;nbsp;Furthermore you could also define some XSS strings to GET/POST back to the site using the "possible" targets list generated (you will know which method to use based on the forms shown from screen scraping).&lt;br /&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/5157720536595794113-1065749406928785310?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/1065749406928785310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/04/screen-scraping-xss-hunting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1065749406928785310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1065749406928785310'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/04/screen-scraping-xss-hunting.html' title='Screen Scraping (XSS Hunting)'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-5945693113300887829</id><published>2011-03-30T14:38:00.000-04:00</published><updated>2011-03-30T14:38:01.422-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network Security'/><title type='text'>Compiling Snort</title><content type='html'>Installing Snort is never an easy task, particulary on CentOS which has packages slightly older packages in their repositories. &amp;nbsp;This post isn't a complete walk through of installing Snort, but will guide you through the compiling of Snort for the latest version of CentOS (5.5). &lt;br /&gt;&lt;br /&gt;First off, you should take notice that the version of libpcap (required by Snort) is outdated in the CentOS repositories. &amp;nbsp;They are only up to version 0.9.4.&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;yum info libpcap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The latest version of Snort requires libpcap &amp;gt;= 1.0. &amp;nbsp;The latest version of Snort (2.9.0.4), requires you to also install the daq-0.5.tar.gz files (you can grab these from the Snort.org website). &amp;nbsp;This depends on libpcap &amp;gt;= 1.0 in order to compile as well. &amp;nbsp;Strangely daq also doesn't look for libpcap in the correct place (it searchs /usr/local) so you will need to make an adjustment for that.&lt;br /&gt;&lt;br /&gt;First remove the current version of libpcap since it is doing us no good:&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;yum remove libpcap libpcap-devel -y&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the latest version of libpcap, daq, and snort. &amp;nbsp;While you are downloading things you should also grab a copy of libdnet because it's required for the latest version of Snort on CentOS as well. &amp;nbsp;Next create a single directory structure for easy compiling:&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;cd ~&lt;/span&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;mkdir snort &amp;amp;&amp;amp; cd snort&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Put all your downloaded files into the ~/snort directory. &amp;nbsp;Untar each of the files that you just downloaded (your directory should look as follows):&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ls ~/snort&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;daq-0.5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libdnet-1.12 &amp;nbsp; &amp;nbsp; &amp;nbsp;libpcap-1.1.1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; snort-2.9.0.4&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;daq-0.5.tar.gz &amp;nbsp;libdnet-1.12.tgz &amp;nbsp;libpcap-1.1.1.tar.gz &amp;nbsp;snort-2.9.0.4.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First compile the libdnet libraries because they are a straight forward &lt;span class="Apple-style-span" style="color: red;"&gt;./compile, make, make install&lt;/span&gt;. &amp;nbsp;Second you will need to do libpcap.&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;cd libpcap-1.1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use the following to change the default install directory:&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;./configure --prefix=/usr&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finish off with the standard &lt;span class="Apple-style-span" style="color: red;"&gt;make&lt;/span&gt; and &lt;span class="Apple-style-span" style="color: red;"&gt;make install&lt;/span&gt;. &amp;nbsp;Once libpcap is done compiling successfully you will need to make sure that you export the newly created libaries or you will get errors when attempting to compile daq.&lt;br /&gt;&lt;br /&gt;Export the new libraries:&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ldconfig&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To verify you can run:&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ldconfig -p | grep libpcap&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;libpcap.so.1 (libc6,x86-64) =&amp;gt; /usr/lib/libpcap.so.1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;libpcap.so (libc6,x86-64) =&amp;gt; /usr/lib/libpcap.so&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;Now you can move on to compiling daq:&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;cd daq-0.5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This should also be a straight forward &lt;span class="Apple-style-span" style="color: red;"&gt;./configure, make, make install&lt;/span&gt;. &amp;nbsp;If everything was successful you should see the following:&lt;br /&gt;&lt;br /&gt;Build AFPacket DAQ module.. : yes&lt;br /&gt;Build Dump DAQ module...... : yes&lt;br /&gt;Build IPFW DAQ module...... : yes&lt;br /&gt;Build IPQ DAQ module....... : no&lt;br /&gt;Build NFQ DAQ module....... : no&lt;br /&gt;Build PCAP DAQ module...... : yes&lt;br /&gt;&lt;br /&gt;If you are getting errors that the libpcap version &amp;lt;= 1.0 make sure that you have exported the libaries like I mentioned above. &amp;nbsp;Finally you can move on to compiling Snort itself.&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;cd snort-2.9.0.4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since I'm on a x64 bit platform I will need to change my MySQL option slightly from the x86 version:&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;./configure --with-mysql-libraries=/usr/lib64/mysql/ --enable-dynamicplugin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For you x86 users just use:&lt;br /&gt;&lt;br /&gt;# &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;./configure --with-mysql --enable-dynamicplugin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To finish off you can do the standard &lt;span class="Apple-style-span" style="color: red;"&gt;make, make install&lt;/span&gt;. &amp;nbsp;Again, this isn't a full guide on how to install and setup Snort, but compiling it is usually the hardest part. &amp;nbsp;Hopefully you will find this information useful when attemping this on CentOS 5.5. &amp;nbsp;If I missed anything or you run into trouble just let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-5945693113300887829?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/5945693113300887829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/03/compiling-snort.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5945693113300887829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5945693113300887829'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/03/compiling-snort.html' title='Compiling Snort'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-5875607457024128077</id><published>2011-03-29T16:53:00.001-04:00</published><updated>2011-03-29T16:53:42.450-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><title type='text'>Client Side Filtering - Don't do it!</title><content type='html'>After&amp;nbsp;perusing&amp;nbsp;Twitter for my daily dose a few people were talking about the following site:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cadw.wales.gov.uk/"&gt;http://www.cadw.wales.gov.uk/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now at first glance you wouldn't think that anything was wrong with this site. &amp;nbsp;If you look a little deeper though (think evil hacker), you'd notice the cool little search field on the left side of the page. &amp;nbsp;These kind of input boxes are generally filtered so as to not allow malicious users to inject anything into back end databases for perform cross-site scripting. &amp;nbsp;When doesn't this work? &amp;nbsp;When you put the filtering on the client side in the source code of the page!!! &amp;nbsp;Viewing the source code of the page you will see the following snippet:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;var IllegalChars=new Array("select", "drop", ";", "--", "insert", "delete", "xp_", "update", "/", ":", "char(", "?", "`", "|", "declare", "convert", "cast(", "@@", "varchar", "2D2D", "4040", "00400040", "[", "]");&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;var IllegalFound=new Array();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;var IllegalCharsCount=0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It doesn't take much to understand what this site is trying to *prevent* from happening here. &amp;nbsp;What you could do &amp;nbsp;to bypass is intercept the response to the server and re-include any filtered out web attack you'd like! &amp;nbsp;Honestly people...if you are going to spend the time implementing security on your webstite; do it right.&lt;br /&gt;&lt;br /&gt;Epic Fail...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-5875607457024128077?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/5875607457024128077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/03/client-side-filtering-dont-do-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5875607457024128077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5875607457024128077'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/03/client-side-filtering-dont-do-it.html' title='Client Side Filtering - Don&apos;t do it!'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8374539571824616024</id><published>2011-01-11T14:01:00.000-05:00</published><updated>2011-01-11T14:01:31.058-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><category scheme='http://www.blogger.com/atom/ns#' term='ModLearning'/><title type='text'>Training Site Launch!</title><content type='html'>The training site has launched! &amp;nbsp;Check it out at &lt;a href="http://modlearning.com/"&gt;http://modlearning.com&lt;/a&gt;&amp;nbsp;and provide any feedback you might have. &amp;nbsp;Hoping to have the first courses and modules live by the end of the month.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8374539571824616024?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8374539571824616024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/01/training-site-launch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8374539571824616024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8374539571824616024'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/01/training-site-launch.html' title='Training Site Launch!'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7074228021169069911</id><published>2011-01-10T07:59:00.001-05:00</published><updated>2011-02-24T15:09:42.482-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Quick Update</title><content type='html'>So I know most of you are still waiting on the book. &amp;nbsp;I have been wrapped up in a work project this week migrating our data center. &amp;nbsp;The digital release (ebook) should be coming next week and the hardcover should be available in April. &amp;nbsp;When the digital release comes out I will also post the scripts for the book along with the digital release.&lt;br /&gt;&lt;br /&gt;On a separate note my training company will be going live in&amp;nbsp;February&amp;nbsp;so don't forget to check back for updates and the&amp;nbsp;official&amp;nbsp;launch.&lt;br /&gt;&lt;br /&gt;** &lt;span class="Apple-style-span" style="color: red;"&gt;UPDATE&lt;/span&gt;: The rough cut edition of the book is available through Safari Online Books.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://my.safaribooksonline.com/book/certification/linuxplus/9780132686075"&gt;http://my.safaribooksonline.com/book/certification/linuxplus/9780132686075&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7074228021169069911?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7074228021169069911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/01/quick-update.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7074228021169069911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7074228021169069911'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/01/quick-update.html' title='Quick Update'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-630733247837527936</id><published>2011-01-02T17:19:00.001-05:00</published><updated>2011-01-31T17:15:20.397-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10k Challenge'/><title type='text'>10,000 Page Challenge (2011)</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;For those that have been following along last year you know that one of the forums that I am a member of does a challenge every year to see if you can read 10,000 pages. &amp;nbsp;It doesn't matter what books or topics. &amp;nbsp;Since I read&amp;nbsp;a lot&amp;nbsp;throughout the year on a wide variety of topics I figured it would be easier to share here and others can see what I have read. &amp;nbsp;It is time to kick off the 2011 10,000 page challenge. &amp;nbsp;You can also view last years results &lt;a href="http://secnut.blogspot.com/2010/01/10000-page-challenge.html"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Books Read This Year&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Too Big to Fail &amp;nbsp;(640 pages)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;NX-OS and Cisco Nexus Switching (480) &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Total Pages: 112&lt;b&gt;0&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-630733247837527936?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/630733247837527936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2011/01/10000-page-challenge-2011.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/630733247837527936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/630733247837527936'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2011/01/10000-page-challenge-2011.html' title='10,000 Page Challenge (2011)'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-9121967848216975100</id><published>2010-12-23T11:20:00.001-05:00</published><updated>2010-12-23T11:20:38.073-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>2010 Wrap Up</title><content type='html'>First I want to say Happy Holidays to all!&lt;br /&gt;&lt;br /&gt;Second I wanted to wrap up the year with a recap of a few projects that have been going on. &amp;nbsp;The book that I am writing is finished (finally)! &amp;nbsp;Hopefully I will have some more time now to devote to blogging. &amp;nbsp;I will announce a release date for the book come January 3 2011. &amp;nbsp;The digital edition will be available on Safari books online for those that prefer digital to physical books.&lt;br /&gt;&lt;br /&gt;For anyone that has been following along with the 10K Challenge it is time to sum up your totals and see where you landed for the year. &amp;nbsp;I didn't break the 10K mark although I was close. &amp;nbsp;If you didn't get a chance to participate this year you can read about &lt;a href="http://secnut.blogspot.com/search/label/10k%20Challenge"&gt;the details&lt;/a&gt; and hopefully join us next year for the 2011 10K Challenge.&lt;br /&gt;&lt;br /&gt;Finally I wanted to announce that I will be starting an online training company! &amp;nbsp;Inspired by writing my book I think that training in the IT field can be better (and cheaper). &amp;nbsp;Starting mid January I will be launching an online training company that provides courses and modules for IT certification, sales, and other hot topics in the IT field. &amp;nbsp;One of the most viewed pages on this blog is about kickstart...so naturally I will be starting with some great modules on kickstart. &amp;nbsp;They will include videos, sample config files, troubleshooting, and more! &amp;nbsp;You can bookmark the site &lt;a href="http://modlearning.com/"&gt;Modular Learning&lt;/a&gt; and check back in January to see our launch and announcements!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-9121967848216975100?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/9121967848216975100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/12/2010-wrap-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/9121967848216975100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/9121967848216975100'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/12/2010-wrap-up.html' title='2010 Wrap Up'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4709471337614204229</id><published>2010-11-15T09:14:00.001-05:00</published><updated>2010-11-15T09:14:33.810-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCSA'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCT'/><title type='text'>Red Hat Exam Changes</title><content type='html'>At the beginning of this month Red Hat announced the release of RHEL6.&amp;nbsp; While everyone has been waiting a while for this release it includes a significant number of changes, updates, and fixes.&amp;nbsp; The scalability for RHEL6, particularly in the data center, has been improved as well.&amp;nbsp; One thing however that many people were not aware was coming is a complete change to the&amp;nbsp; Red Hat certifications.&lt;br /&gt;&lt;br /&gt;First up the RHCT has been immediately retired.&amp;nbsp; It has been replaced with a new certification called the Red Hat Certified System Administrator (RHCSA).&amp;nbsp; For those that already hold an RHCT certification will receive this new one in its place.&amp;nbsp; Red Hat claims that being certified with a title of "System Admin" vs "Technician" makes a large difference when searching for a job (as well as peoples egos).&amp;nbsp; While this may be true, the new exam also includes a completely revamped set of requirements.&amp;nbsp; Also as a complete surprise the RHCSA is now a pre-req to anyone going for the more advanced RHCE exam (you can take the RHCE without an RHCSA, but you won't receive the actual certificate until you have your RHCSA).&amp;nbsp; The cost for this new exam is $400.&amp;nbsp; You can find the new exam objectives here:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://www.redhat.com/certification/rhcsa/objectives/"&gt;https://www.redhat.com/certification/rhcsa/objectives/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Second, the RHCE exam has changed as well.&amp;nbsp; While a great deal of material stayed the same (I'd say about 60%) for the RHCE, the services that you are required to know also became more detailed in the amount of topics you need to know.&amp;nbsp; Due to this exam now having a pre-req the cost for the RHCE has dropped to $400 (down from $800), making it easier to obtain each exam for the price of $800.&amp;nbsp; The downfall here is that you are required to know more for each exam.&amp;nbsp; You can find the new exam objectives here:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://www.redhat.com/certification/rhce/objectives/"&gt;https://www.redhat.com/certification/rhce/objectives/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For anyone that already has version 5 of either Red Hat exam already schedule I would recommend checking with your testing provider as there are conflicting reports of which version of the exam you will actually be allowed to sit for.&amp;nbsp; According to Red Hat's website about 90% of testing centers will no longer allow you to book the old exam.&amp;nbsp; While I welcome a revamp to the Red Hat certification program I think there could have been a warning to those in the process of studying.&amp;nbsp; You can't change an entire program over night and expect that everyone will be alright with it, not to mention that the new exams are harder and cover more material.&amp;nbsp; I think that the biggest downfall here is that there is currently no books or study material on the market for these new exams and while Red Hat has also re-done all of their training courses they are each about $3000 (there are three training courses covering all the material from RCHSA to RHCE for a total of about $6000).&amp;nbsp; It is still too early to tell what kind of impact these exam changes will have, but I can tell that changing the exams and certification process without warning has left a bad taste in many peoples mouth.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4709471337614204229?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4709471337614204229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/11/red-hat-exam-changes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4709471337614204229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4709471337614204229'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/11/red-hat-exam-changes.html' title='Red Hat Exam Changes'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4261894872579902870</id><published>2010-10-29T13:29:00.001-04:00</published><updated>2010-10-29T13:29:23.553-04:00</updated><title type='text'>Checkpoint CCSA Self Study Course Review</title><content type='html'>There has been a few people talking about self study for Checkpoint lately and being lucky enough to have my job pay for the training materials I thought I'd do a quick review for everyone else considering this path. First I want to start off saying that Checkpoint's website for ordering is horrible! I tried ordering the latest version of this product in three different browsers and their site doesn't recognize their product as an item (not cool). &amp;nbsp;So, instead of buying the R71 version I got the R70 version for $600 (they are similar enough). Also as a warning I paid for express 2 day shipping, yet the order took 10 business days to process...so that was pointless. Anyway on to content...&lt;br /&gt;&lt;br /&gt;The self study training course includes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;1 Courseware book&lt;/li&gt;&lt;li&gt;1 Lab book&lt;/li&gt;&lt;li&gt;2 CDs that contain all the Checkpoint blade modules&lt;/li&gt;&lt;li&gt;1 Checkpoint backpack&lt;/li&gt;&lt;li&gt;1 Checkpoint mousepad (does anyone use these anymore?)&lt;/li&gt;&lt;/ul&gt;The course book is broken down into 12 chapters covering the following topics:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Checkpoint software blades&lt;/li&gt;&lt;li&gt;How to install/upgrade/manage an R70 security gateway&lt;/li&gt;&lt;li&gt;How to setup and manage a security management server&lt;/li&gt;&lt;li&gt;Licensing and centralized license management&lt;/li&gt;&lt;li&gt;User authentication (including external authentication against LDAP)&lt;/li&gt;&lt;li&gt;IPS&lt;/li&gt;&lt;li&gt;VPN concepts plus encryption&lt;/li&gt;&lt;/ul&gt;I read through the course book in 2 days (It's just shy of 500 pages cover to cover). The editing as far as image placement/quality and grammar checking could have been better. I found a handful of things completely mis-spelled and there are a few images that are just completely impossible to make out. The book is written by about 10 different engineers that contributed to different sections, so the book reads more like a compilation of study notes then an actual book. There are numerous references to R65 products and usage (which you can see in the screen shots as well), which isn't on this exam. &amp;nbsp;You can also see that come of the screen shots have entries from 2006 while others from 2008...leads me to wonder how much of this book was really updated for R70 content to begin with.&lt;br /&gt;&lt;br /&gt;I'd say if you know nothing about Checkpoint or their products this book might help you clear things up. That being said the book was written for those with 6 - 12 months of experience to take their exam...at which point you'd know how to do most of the tasks in the book. For someone that is seasoned or even some what experienced with Checkpoint products, I'd say forget this book as it is not worth $600, poorly written, and you can find most of the documentation for the products more useful than the content laid out in the book.&lt;br /&gt;&lt;br /&gt;The lab book is decent for those that wish to practice or have no real world exposure to Checkpoint products. Although the lab book is about 300+ pages and includes 12 labs...much of the content is one liner directions or white space for page filling.&lt;br /&gt;&lt;br /&gt;In closing I wouldn't recommend the self study course to anyone...it's not worth the $600, you can do better through research or having someone teach you (a friend or co-worker maybe), and the mistakes/outdated references just add negative feelings toward this course as a whole. There are also no sample test questions to help you actually prepare for the exam either. I'm still on the fence about buying the CCSE course given the quality of this one, however I might just to review it. &amp;nbsp;Maybe someone will step up and write a book for this exam although that hasn't been done since the R65 version came out in 2006.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4261894872579902870?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4261894872579902870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/10/checkpoint-ccsa-self-study-course.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4261894872579902870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4261894872579902870'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/10/checkpoint-ccsa-self-study-course.html' title='Checkpoint CCSA Self Study Course Review'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-401223613365472901</id><published>2010-10-20T19:27:00.001-04:00</published><updated>2010-10-20T19:27:53.695-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCSP'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Cisco CCSP Exam Change</title><content type='html'>For those of you in the networking world (or looking to get into it), Cisco is making some changes to their professional level security track. &amp;nbsp;The CCSP exams will be changing over to the CCNP:Security. &amp;nbsp;Personally I think this is a good refresh for this track as it has long been plauged as a hard track to follow with no real resources available. &amp;nbsp;With the change over Cisco will be releasing official books for each exam in the new track as opposed to leaving it up to us to hunt down the appropriate resources. &amp;nbsp;There is also a new focus on the exams to shift away from products like Cisco CNAC and Cisco MARS. &amp;nbsp;It's not clear if these products will go end of life soon or not, but focusing on more core security aspects seems like a good way to go.&lt;br /&gt;&lt;br /&gt;The new exams for the CCNP:Security track are as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;642-637 SECURE&lt;/li&gt;&lt;li&gt;642-617 FIREWALL&lt;/li&gt;&lt;li&gt;642-647 VPN&lt;/li&gt;&lt;li&gt;642-627 IPS&lt;/li&gt;&lt;/ul&gt;Thse four exams will be required to obtain the new CCNP:Security certification. &amp;nbsp;Along with the new exams the following books are being released as well:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Secure Quick Reference (eBook) - Coming January 2011&lt;/li&gt;&lt;li&gt;Secure Official Certification Guide - Coming Feburary 2011&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Firewall Quick Reference (eBook) - Coming January 2011&lt;/li&gt;&lt;li&gt;Firewall Official Certification Guide - Coming March 2011&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;VPN Quick Reference (eBook) - Coming January 2011&lt;/li&gt;&lt;li&gt;VPN Official Certification Guide - Coming January 2011&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;IPS Quick Reference (eBook) - Coming January 2011&lt;/li&gt;&lt;li&gt;IPS Official Certification Guide - Coming March 2011&lt;/li&gt;&lt;/ul&gt;I've been waiting for a refesh on this track for a long time so it will be good to start hitting the books as they come out. &amp;nbsp;Hopefully others will take on this new track as well.&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/5157720536595794113-401223613365472901?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/401223613365472901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/10/cisco-ccsp-exam-change.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/401223613365472901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/401223613365472901'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/10/cisco-ccsp-exam-change.html' title='Cisco CCSP Exam Change'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8965482143745934094</id><published>2010-09-21T07:52:00.005-04:00</published><updated>2010-09-21T11:21:10.264-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XSS'/><title type='text'>New Twitter XSS</title><content type='html'>This morning I was looking around Twitter and I noticed that a few people were working on testing a persistent&amp;nbsp;XSS script. &amp;nbsp;Finally someone got it right (not sure who discovered it originally). &amp;nbsp;I was able to recreate what they did for a demo. &amp;nbsp;It seems that when parsing an HTTP link the javascript is executed directly on Twitter. &amp;nbsp;Here is working example:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', sans-serif; font-size: 14px; line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;a class="tweet-url web" href="http://twitter.com/#@" rel="nofollow" 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; text-decoration: underline;" target="_blank"&gt;http://twitter.com/#@"onmouseover="javascript:alert('xss');"/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', sans-serif; font-size: 14px; line-height: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;When you tweet this and then "mouseover" the link you will get a javascript alert provided you aren't blocking scripts (some browsers also block this too). I tested this on Google Chrome (latest release). This goes to show that nothing is 100% secure. I suggest that everyone not use the twitter.com web client until they fix this issue as you can only imagine the amount of attacks that are forth coming.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;**Update&lt;/span&gt;&lt;/b&gt;: &amp;nbsp;The issue is apparently fixed although I have only seen 1 person confirm that. &amp;nbsp;Still waiting for an "official"&amp;nbsp;announcement&amp;nbsp;from Twitter that the issue has been resolved. &amp;nbsp;The code that was vulnerable is actually open source for anyone that wants to take a look.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://github.com/mzsanford/twitter-text-rb/commit/cffce8e60b7557e9945fc0e8b4383e5a66b1558f"&gt;http://github.com/mzsanford/twitter-text-rb/commit/cffce8e60b7557e9945fc0e8b4383e5a66b1558f&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8965482143745934094?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8965482143745934094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/09/new-twitter-xss.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8965482143745934094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8965482143745934094'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/09/new-twitter-xss.html' title='New Twitter XSS'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7134825251106319559</id><published>2010-08-31T20:59:00.000-04:00</published><updated>2010-08-31T20:59:08.482-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Google Me</title><content type='html'>Ever wonder what is out there on the internet about you?&amp;nbsp; Every new and then I "Google" myself just to see what comes up under my name.&amp;nbsp; It is interesting to see what gets reported and also how many "reconnect now" sites are there willing to sell you your entire life history.&amp;nbsp; Make sure you take some time to check that there is nothing out there that is inaccurate about you.&lt;br /&gt;&lt;br /&gt;For those looking I am &lt;b&gt;&lt;u&gt;NOT&lt;/u&gt;&lt;/b&gt; on Facebook!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7134825251106319559?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7134825251106319559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/08/google-me.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7134825251106319559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7134825251106319559'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/08/google-me.html' title='Google Me'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8649829990318454272</id><published>2010-08-30T19:08:00.000-04:00</published><updated>2010-08-30T19:08:00.713-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ShmooCon'/><title type='text'>ShmooCon 2011</title><content type='html'>For those of you that are interested the ShmooCon 2011 Call For Papers is now open.&lt;br /&gt;&lt;br /&gt;http://www.shmoocon.org/?page=57&lt;br /&gt;&lt;br /&gt;If anyone is going let me know, hoping to get a meet up going....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8649829990318454272?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8649829990318454272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/08/shmoocon-2011.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8649829990318454272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8649829990318454272'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/08/shmoocon-2011.html' title='ShmooCon 2011'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-6357105231297827832</id><published>2010-08-11T21:23:00.006-04:00</published><updated>2010-08-11T21:39:04.739-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Hacking'/><title type='text'>Starting Out With SQL Injection</title><content type='html'>Straight from Wikipedia, "SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application".  Usually this exploit is because the user's input is not sanitized when it's submitted to a web form or application.  On a virtual machine I have DVWA (Damn Vulnerable Web App) setup, which will help us with understanding the more hands-on approach.  For those of you that haven't used DVWA before, it is a web application that is full of security holes for you to practice solidify your understanding of web application security.  You can grab a copy to follow along.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dvwa.co.uk/download.php"&gt;http://www.dvwa.co.uk/download.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Normally you won't look at any code when attacking DVWA, however since we are just starting out and learning how SQL injection works I will give you an example to work with.  For our injection to be successful we will need to understand just how SQL works.  We know from looking over this server that the back end for DVWA is MySQL although the back end database doesn't really matter for this basic example.  Suppose you want to query the firstname and lastname of users in your database and the key value would be the user's ID.  Your query might look something like:&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;SELECT first_name, last_name FROM users WHERE user_id = 'jsmith';&amp;nbsp;&lt;/pre&gt;The results should come back as follows provided that the user exists:&lt;br /&gt;&lt;br /&gt;First Name: John&lt;br /&gt;Last Name: Smith&lt;br /&gt;&lt;br /&gt;This is simple enough.  What if I wanted to enumerate all the users though without having to check each individual userid by hand?  Let's look at a PHP code sample.&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;if(isset($_GET['submit'])){&lt;br /&gt;&lt;br /&gt;     // Get the user's ID from the submitted form field  &lt;br /&gt;     $id = $GET['userid'];    &lt;br /&gt;&lt;br /&gt;     // Build the query  &lt;br /&gt;     $q = "SELECT first_name, last_name FROM users WHERE user_id = '$id'";    &lt;br /&gt;&lt;br /&gt;     // Run the query and store the results  &lt;br /&gt;     $r = mysql_query($q);    &lt;br /&gt;&lt;br /&gt;     // Check if there were results from the query&lt;br /&gt;     $num = mysql_numrows($r);&lt;br /&gt; &lt;br /&gt; if ($num &amp;gt; 0){&lt;br /&gt; &lt;br /&gt;  $i = 0;&lt;br /&gt;  &lt;br /&gt;  while ($i &amp;lt; $num){&lt;br /&gt;  &lt;br /&gt;   $fname = mysql_results($r, $i, "first_name");&lt;br /&gt;   $lname = mysql_results($r, $i, "last_name");&lt;br /&gt;   &lt;br /&gt;   // Print out the info for the user&lt;br /&gt;   echo 'ID: '. $id .'&amp;lt;br /&amp;gt;';&lt;br /&gt;   echo 'First Name: '. $fname .'&amp;lt;br /&amp;gt;';&lt;br /&gt;   echo 'Last Name: '. $lname .'&amp;lt;br /&amp;gt;';&lt;br /&gt;   &lt;br /&gt;   $i++;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;} &lt;br /&gt;&lt;/pre&gt;This code should be self explanatory.  The query ($q) looks for the first name and last name of the user whose id is submitted to the form.  Now let's look a little deeper at how we can manipulate this query a little bit.  When I enter "jsmith" in the form and hit submit my query is evaluated out to:  &lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;SELECT first_name, last_name FROM users WHERE user_id = 'jsmith';&amp;nbsp;&lt;/pre&gt;Just like we saw originally.  What if I entered a character instead of a user_id?  Suppose I put in a single quote (') and submitted the form, what do you think will happen?  Turns out that the page displays the following message:  &lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''' at line 1"&lt;br /&gt;&lt;/pre&gt;This may seem a little weird at first, but the SQL is actually telling you that the single quote " ' ", which is surrounded by double quotes is causing an error when expanding out the query.  The one thing that you will learn with SQL injection is that errors are always a good thing.  How can we get the database to display the information of all users?  We would have to build an SQL statement that would have to be valid for not only my user_id, but for all user_id fields.  Actually the trick isn't to manipulate the field it is to ignore it all together.  To perform our first SQL injection we will want to submit the following in the web form:  &lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;jsmith' OR 1='1&amp;nbsp;&lt;/pre&gt;When you do this you will essentially be submitting an expression as your user_id variable.  The SQL query is now going to expand and give you the following:  &lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;SELECT first_name, last_name FROM users WHERE user_id = 'jsmith' OR 1='1';&lt;/pre&gt;Well we definitely have a user_id named jsmith so that will evaluate to true, however we have also introduced an OR statement.  When evaluated the SQL will check to see if there is a user_id = jsmith OR if 1 = 1, which is always true!  Since it is always true the results should always be returned and you should now see a list of the first name and last name of all users in the database!  Let's look again at how this actually works.  Instead of just a user_id being queried for, we created an input so that the first case is either true or false (user_id = 'jsmith') and a second case that will always be true (1=1).  Also because of the way we crafted the statement the SQL is well formed (notice the single quote after the user_id to close the first item and the single quote in front of the 1 to close the second item).  So our crafted jsmith' OR 1='1 gets dropped into the WHERE clause to form:  &lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;WHERE user_id = 'jsmith' OR 1='1';&amp;nbsp;&lt;/pre&gt;This is just the beginning of SQL injection and there are tons of different variables to take into consideration when trying to exploit a target.  Not all database back ends understand the same syntax, comments for databases are different, and different software prevents certain SQL injections all together!  Now that you have seen and done an example though you will have to get familiar with the different types of injection that you can perform.  In the next post I'll talk more about SQL injection and in particular how you can use it to map fields in the schema of the database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6357105231297827832?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6357105231297827832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/08/starting-out-with-sql-injection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6357105231297827832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6357105231297827832'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/08/starting-out-with-sql-injection.html' title='Starting Out With SQL Injection'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-1659602369003620178</id><published>2010-08-11T19:05:00.001-04:00</published><updated>2010-08-11T19:07:23.380-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LAMP'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>LAMP Security - A Case Study of a LAMP Appliance</title><content type='html'>Today in this world of cloud computing everyone wants to migrate their applications to some type of hosting platform.&amp;nbsp; The goal is to get your web application up and running quickly without the need for over complicating the configuration of different services (Right now every single security person is probably yelling at me for that last statement).&amp;nbsp; While it is true that you'd want to deploy your application quickly so as to have your customers start using it, you don't want to blow off the configuration details or lack of security.&amp;nbsp; Many of these applications are housed on a LAMP stack, and for those of you that don't know: &lt;b&gt;L&lt;/b&gt;inux &lt;b&gt;A&lt;/b&gt;pache &lt;b&gt;M&lt;/b&gt;ySQL &lt;b&gt;P&lt;/b&gt;HP.&amp;nbsp; Let's look at a sample deployment scenario, which involves setting up a LAMP stack.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Since I would like to hit the ground running I want a LAMP stack that is pre-configured to start off with.&amp;nbsp; It just so happens that Turnkey Linux makes a pre-made LAMP appliance and ISO.&amp;nbsp; This image is based on Ubuntu 8.04LTS and is updated to include security patches and additional features (see the changelog for complete details).&amp;nbsp; You can run the ISO as a Live CD to test out the product, which is what I'm going to do instead of installing it into the could.&amp;nbsp; By default the following connections are available when the system boots up (all IP addresses are based on a DHCP address my system received during boot).&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Web&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://192.168.1.6&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; https://192.168.1.6&lt;br /&gt;Web Shell&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; https://192.168.1.1:12320&lt;br /&gt;Webmin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; https://192.168.1.1:12321&lt;br /&gt;PHPMyAdmin&amp;nbsp;&amp;nbsp;&amp;nbsp; https://192.168.1.1:12322&lt;br /&gt;SSH/SFTP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; root@192.168.1.6 (port 22)&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;This is a large number of connections available for a preconfigured appliance and helpful for those that want many different ways to connect in and work on their system.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;Problem #1&lt;/div&gt;&lt;br /&gt;Each connection is configured with a login that uses the username 'root' and NO PASSWORD!&lt;br /&gt;&lt;br /&gt;Right away we can see that there is an issue with the way logins are configured here.&amp;nbsp; First of all the root user should never be able to connect remotely, let alone have a blank password.&amp;nbsp; Secondly, had the system been configured with a normal user they still should not use a blank password.&amp;nbsp; Many new system administrators that don't always check the connections to their system (sometimes because they may not have even learned how), may forget to shutdown a particular connection or change the password.&amp;nbsp; With a blank password configured on the root account (or any account for that matter), it is only a matter of hours or minutes before you get picked up by malicious users scanning the internet.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;&lt;b&gt;Mitigation&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Setup default LAMP installs with a specific user that can be used for testing if you are building an appliance, or only create accounts for users that need them.&amp;nbsp; All access to the root account should be cut off and a random strong password should be set.&amp;nbsp; All users accounts on the system should have a password even if just for demo purposes.&amp;nbsp; The following list should also be avoided when choosing a password even if for demo purposes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;admin&lt;/li&gt;&lt;li&gt;password&lt;/li&gt;&lt;li&gt;root&lt;/li&gt;&lt;li&gt;toor&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Now that our system is up and running we can start to look around at the default settings and software that comes with it.&amp;nbsp; The most obvious choice is to check out the homepage that the web server displays.&amp;nbsp; Navigating to http://192.168.1.6 brings us to a custom made index.html that presents us with the different ways that we can log into the system.&amp;nbsp; First let us take a look at the PHP info page, which will show us all the information about PHP for this appliance.&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/_WT187SbRvF0/TGMrX2WvRmI/AAAAAAAAABE/jAINoXOfMbs/s1600/PHP+Default.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/_WT187SbRvF0/TGMrX2WvRmI/AAAAAAAAABE/jAINoXOfMbs/s640/PHP+Default.png" width="553" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;default&gt;&lt;br /&gt;Now for those of you that have viewed this page before you already know the wealth of knowledge you can learn about your PHP installation from this page.&amp;nbsp; For those that haven't seen it before you should look through carefully and see what this page exposes about your setup (pretty much everything).&amp;nbsp; We will notice that the version of PHP being used here is 5.2.4, which sadly is out of date.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Problem #2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The current version of PHP is 5.3.3 and if you do a quick check the Ubuntu repositories have version 5.3.2 available.&amp;nbsp; Understandibly no appliance can keep up with the latest versions of everything, but the changelog and Turnkey's site indicate that the last date the appliance was compiled was April 2010 (fairly recently).&amp;nbsp; There was a patch that went into PHP as of version 5.2.6 to prevent SQL Injection as well.&amp;nbsp; Magic quotes are also disabled in this version of PHP however they are in the most recent version of PHP (5.3.3) as well to encourage better programming habits.&amp;nbsp; They depreceated the option in hopes that developers will start escaping their input.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #ffe599;"&gt;Mitigation&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The ISO could have updated their version of PHP to a more recent one.&amp;nbsp; They also could warn users that magic quotes are no longer used for PHP web applications.&lt;/default&gt;&lt;br /&gt;&lt;br /&gt;&lt;default&gt;&lt;/default&gt;&lt;br /&gt;&lt;default&gt;&lt;/default&gt;&lt;br /&gt;&lt;default&gt;Looking elsewhere on this page we can also see that the default server headers show all information about the server, software, and their versions.&amp;nbsp; This is just like opening the door to hackers looking to exploit specific software versions on your LAMP stack.&lt;/default&gt;&lt;br /&gt;&lt;br /&gt;&lt;default&gt;&lt;/default&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_WT187SbRvF0/TGMsk9EC6KI/AAAAAAAAABM/QeZbnkeShyw/s1600/server+defaults.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="336" src="http://3.bp.blogspot.com/_WT187SbRvF0/TGMsk9EC6KI/AAAAAAAAABM/QeZbnkeShyw/s640/server+defaults.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;default&gt; &lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Problem #3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A few options within the Apache configuration could have provided better security and not caused an information leak of your LAMP software.&lt;/default&gt;&lt;br /&gt;&lt;default&gt;&lt;br /&gt;&lt;/default&gt;&lt;br /&gt;&lt;default&gt;&lt;b style="color: #ffe599;"&gt;Mitigation&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&lt;/default&gt;&lt;br /&gt;Change the ServerToken option in the apache config for the appliance. &lt;default&gt; &lt;/default&gt;&lt;br /&gt;&lt;default&gt;&lt;/default&gt;&lt;br /&gt;&lt;default&gt;&lt;/default&gt;&lt;br /&gt;&lt;default&gt;&lt;br /&gt;To finish up I'm just going to point out a few more details I found when analyzing the Turnkey LAMP stack.&lt;br /&gt;&lt;/default&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;default&gt; phpMyAdmin is outdate and vulnerable to a number of remote attacks&lt;/default&gt;&lt;/li&gt;&lt;li&gt;&lt;default&gt; there is no firewall rules at all to protect the system&lt;/default&gt;&lt;/li&gt;&lt;li&gt;&lt;default&gt; root user login is allowed through SSH&lt;/default&gt;&lt;/li&gt;&lt;li&gt;&lt;default&gt; the root user for MySQL has no password&lt;/default&gt;&lt;/li&gt;&lt;/ul&gt;&lt;default&gt;  This should serve as a good indication that security and configuration of any LAMP stack should be taken seriously, regardless of whether you use a Turnkey product or not.&amp;nbsp; I also want to not that I'm not out to get Turnkey Linux in any way, it just happens to be packaged nicely for analysis and widely used.&amp;nbsp; You can also look at things like Red Hat, which has an even older version of PHP in their repository!!&amp;nbsp; If I ever get some time I'd like to start an open source project that provides a secure LAMP stack.&amp;nbsp; This would provide system admins a hardened and secure platform to build upon and deploy web applications to.&lt;br /&gt;&lt;br /&gt;&lt;/default&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-1659602369003620178?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/1659602369003620178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/08/lamp-security-case-study-of-lamp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1659602369003620178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1659602369003620178'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/08/lamp-security-case-study-of-lamp.html' title='LAMP Security - A Case Study of a LAMP Appliance'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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://4.bp.blogspot.com/_WT187SbRvF0/TGMrX2WvRmI/AAAAAAAAABE/jAINoXOfMbs/s72-c/PHP+Default.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-8948922584498980854</id><published>2010-08-10T18:57:00.002-04:00</published><updated>2010-08-10T18:58:41.422-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='File Systems'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>The btrfs File System</title><content type='html'>One of the great things that I love about Ubuntu is there 6 month release cycle. &amp;nbsp;It allows you to try out features that you normally would need to integrate into your distrobution yourself. &amp;nbsp;This post isn't about Ubuntu however, it's about the up and coming file system...btrfs. &amp;nbsp;I will start by saying that it isn't currently stable so please if you try implementing it, back up your system first! &amp;nbsp;The file system is being built as a replace for the ext family file system that is used as a default in a majority of Linux distrobutions. &amp;nbsp;Having a new file system however will allow for the integration of missing features from current Linux distros. &amp;nbsp;Let's look at some of the features that btrfs provides.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Online volume growth and shrinking&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Online block device addition and removal&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Snapshots (w00t w00t!)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Subvolumes&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;In-place conversion + rollback features&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;While this isn't all of the features that btrfs offers it is some of the most important improvements that this new file system can offer. &amp;nbsp;The developers are also looking to work data deduplication into the feature set for the stable release. &amp;nbsp;The reason that I mentioned Ubuntu at the beginning of this post is that the developers are currently working toward making btrfs the new default file system for Ubuntu. &amp;nbsp;Since Red Hat has an 18 month release cycle (which is more like 3 years at the moment), and that RHEL 6 is coming out in October of this year it won't have the new file system. &amp;nbsp;The good news though is that you can upgrade any ext family file system to btrfs, which is a huge plus! &amp;nbsp;Another big benefit is that you will be able to run file system checks online and offline. &amp;nbsp;This reduces the downtime needed during maintenance (making your customers happier).&lt;br /&gt;&lt;br /&gt;Personally I think that the addition of snapshots to the file system is the best feature. &amp;nbsp;Things like volume shadow services have been around in Windows for a while and it is nice to see that Linux is finally getting support for something similar. &amp;nbsp;This will help many admins with their users that tend to "delete things". &amp;nbsp;As of right now there is still no release date set for the stable release however there are many users that have been running the btrfs file system with no issues. &amp;nbsp;I will warn you again however not to use this on production systems as it is not stable (QA or DEV is always a good choice). &amp;nbsp;Between the large feature set and scalability that this file system provides I'm looking forward to the stable release as it will be a welcome upgrade to the current file systems in use today.&lt;br /&gt;&lt;br /&gt;Here is the link showing how the conversion alogrithm works and how you can convert your ext3/4 file system to btrfs (and roll back if you'd like too).&lt;br /&gt;&lt;br /&gt;&lt;a href="https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3"&gt;https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Additional Reading&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://btrfs.wiki.kernel.org/index.php/Main_Page"&gt;https://btrfs.wiki.kernel.org/index.php/Main_Page&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Btrfs"&gt;http://en.wikipedia.org/wiki/Btrfs&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8948922584498980854?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8948922584498980854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/08/btrfs-file-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8948922584498980854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8948922584498980854'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/08/btrfs-file-system.html' title='The btrfs File System'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4054462114682434450</id><published>2010-08-04T18:53:00.001-04:00</published><updated>2010-08-05T19:35:52.523-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Pen Test Audits</title><content type='html'>This month I'm looking at auditing.&amp;nbsp; Almost every company has some type of audit process and has to keep records of when they are audited (including the results).&amp;nbsp; I'm running a poll as to how often your company is audited.&amp;nbsp; Here I'm defining the term audit to include: pen testing and/or web application testing.&amp;nbsp; You can vote on the right and we will have a write up on the results at the end of the month.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4054462114682434450?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4054462114682434450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/08/pen-test-audtis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4054462114682434450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4054462114682434450'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/08/pen-test-audtis.html' title='Pen Test Audits'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8371584954171383277</id><published>2010-08-04T00:09:00.000-04:00</published><updated>2010-08-04T00:09:16.949-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Got FIOS?  Check your router and your connections....</title><content type='html'>Recently there has been some controversy about home routers and default passwords.&amp;nbsp; It seems particularly that on Verizon routers users aren't changing their default password and it makes them vulnerable with some of the new attacks coming out.&amp;nbsp; To counter act this Verizon is logging into the routers remotely (using a service port that they have open on your router) and changing the password for you!!&amp;nbsp; By default they have been setting it to the serial number of the router, but seriously talk about privacy invasion?!&amp;nbsp; Disabling this port on your router will help keep Verizon out, but I'm sure it will only infuriate them as well.&amp;nbsp; So if you use FIOS or any other Verizon internet service you may want to check if your password has been changed.&lt;br /&gt;&lt;br /&gt;On a similar note I bring this up because aside from passwords being changed firmware is being remotely installed on user's routers as well.&amp;nbsp; While everyone loves a good software update to keep them secure, we don't like it when they break things that were previously working.&amp;nbsp; The new firmware update seems to break Checkpoint's VPN-1 client software, so you'll have to rollback your firmware in order to get it functioning again.&amp;nbsp; I'm all for security, but this is going a little to far...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8371584954171383277?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8371584954171383277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/08/got-fios-check-your-router-and-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8371584954171383277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8371584954171383277'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/08/got-fios-check-your-router-and-your.html' title='Got FIOS?  Check your router and your connections....'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-1407724939458913678</id><published>2010-07-28T09:35:00.000-04:00</published><updated>2010-07-28T09:35:55.377-04:00</updated><title type='text'>Site Update</title><content type='html'>It's been a busy last two months and I just wanted to give an update that I haven't been posting because I've been working on a book, which has taken up most of my time.&amp;nbsp; I have a bunch of new topics that I will add shortly to try and get back up to speed with blogging.&amp;nbsp; In the mean time I hope to finish up with my book soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-1407724939458913678?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/1407724939458913678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/07/site-update.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1407724939458913678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1407724939458913678'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/07/site-update.html' title='Site Update'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7750266912003005645</id><published>2010-05-24T15:14:00.000-04:00</published><updated>2010-05-24T15:14:13.321-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><category scheme='http://www.blogger.com/atom/ns#' term='LPIC'/><title type='text'>Disk Partitioning</title><content type='html'>Working with disks is an important part to maintaining storage space on your system.  When adding more storage or creating it for the first time you will want to partition your disk space into a logical format for use later on.  Many installers come with an "automated" partitioning option for those that don't need a custom layout, however most system admins like to layout their own partitions.  In my virtual environment  I have a server that requires more space which already has Redhat install.  To start I created two new IDE disks and made them 4GB each (I'm using virtual box).  After the disk creation, boot the server and sign in.  The first thing to look at is the amount of disks that are available.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: #ffe599;"&gt;# cat /proc/partitions | grep hd&lt;br /&gt;   3     0   10485760 hda&lt;br /&gt;   3     1     104391 hda1&lt;br /&gt;   3     2   10377990 hda2&lt;br /&gt;   3    64    4194304 hdb&lt;br /&gt;   3    65    4194256 hdb1&lt;br /&gt;  22    64    4194304 hdd&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;If you are using SCSI disks instead of IDE disks you can just change the command to:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# cat /proc/partitions | grep sd&lt;/div&gt;&lt;br /&gt;As you can see we get a listing of three different disks.  These are hda, hdb, and hdd.  Now that we know there are three disks we want to check out which partitions are currently created on those disks.  We can use the fdisk command to view the current information.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# fdisk -l&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #ffe599;"&gt;Disk /dev/hda: 10.7 GB, 10737418240 bytes&lt;br /&gt;255 heads, 63 sectors/track, 1305 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/hda1   *           1          13      104391   83  Linux&lt;br /&gt;/dev/hda2              14        1305    10377990   8e  Linux LVM&lt;br /&gt;&lt;br /&gt;Disk /dev/hdb: 4294 MB, 4294967296 bytes&lt;br /&gt;16 heads, 63 sectors/track, 8322 cylinders&lt;br /&gt;Units = cylinders of 1008 * 512 = 516096 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/hdb1               1        8322     4194256+  83  Linux&lt;br /&gt;&lt;br /&gt;Disk /dev/hdd: 4294 MB, 4294967296 bytes&lt;br /&gt;16 heads, 63 sectors/track, 8322 cylinders&lt;br /&gt;Units = cylinders of 1008 * 512 = 516096 bytes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Disk /dev/hdd doesn't contain a valid partition table&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;You could have also run this command first to gain information about both disks and their current partitions, but it is good to know different ways of obtaining the same information.  Based on the current information above we can see a few things about the different disks.  The first line specifies the disk and the total amount of storage available for it (IE. Disk /dev/hda: 10.7 GB).  Under the disk info we can see the current partitions layed out for the disk.  Notice the last line however about "Disk /dev/hdd".  It gives information about the disk (it has 4GB of space), however there are currently no partitions on it.  Using the fdisk utility we will partition the 3rd disk and create two partitions which we will use later on.&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;# fdisk /dev/hdd&lt;br /&gt;&lt;br /&gt;Command (m for help): m&lt;br /&gt;Command action&lt;br /&gt;   a   toggle a bootable flag&lt;br /&gt;   b   edit bsd disklabel&lt;br /&gt;   c   toggle the dos compatibility flag&lt;br /&gt;   d   delete a partition&lt;br /&gt;   l   list known partition types&lt;br /&gt;   m   print this menu&lt;br /&gt;   n   add a new partition&lt;br /&gt;   o   create a new empty DOS partition table&lt;br /&gt;   p   print the partition table&lt;br /&gt;   q   quit without saving changes&lt;br /&gt;   s   create a new empty Sun disklabel&lt;br /&gt;   t   change a partition's system id&lt;br /&gt;   u   change display/entry units&lt;br /&gt;   v   verify the partition table&lt;br /&gt;   w   write table to disk and exit&lt;br /&gt;   x   extra functionality (experts only)&amp;nbsp;&lt;/pre&gt;&lt;pre style="color: #ffe599;"&gt;&amp;nbsp;&lt;/pre&gt;First we will use the 'p' command to print out the current partition table (which shouldn't exist but let's just verify).&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/hdd: 4294 MB, 4294967296 bytes&lt;br /&gt;16 heads, 63 sectors/track, 8322 cylinders&lt;br /&gt;Units = cylinders of 1008 * 512 = 516096 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&amp;nbsp;&lt;/pre&gt;&lt;pre style="color: #ffe599;"&gt;&amp;nbsp;&lt;/pre&gt;As you can see there is nothing here.  However we can see that we have 4294 MB of space to work with when dividing up the partitions on this disk.  For ease of use we are going to cut this disk directly in half.  We will create two paritions each with half of the disk space available, verify they are correct, and then write the changes to the disk.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: #ffe599;"&gt;Command (m for help): n&lt;br /&gt;Command action&lt;br /&gt;   e   extended&lt;br /&gt;   p   primary partition (1-4)&lt;br /&gt;p&lt;br /&gt;Partition number (1-4): 1&lt;br /&gt;First cylinder (1-8322, default 1): &lt;br /&gt;Using default value 1&lt;br /&gt;Last cylinder or +size or +sizeM or +sizeK (1-8322, default 8322): +2147M&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;Since we are cutting the disk in half based on the MB available we use the +sizeM syntax (as shown above).  We could have divided the disk based on KB or cylinders if we wanted too.  This creates the first partition, now lets make the second.&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;Command (m for help): n&lt;br /&gt;Command action&lt;br /&gt;   e   extended&lt;br /&gt;   p   primary partition (1-4)&lt;br /&gt;p&lt;br /&gt;Partition number (1-4): 2&lt;br /&gt;First cylinder (4162-8322, default 4162): &lt;br /&gt;Using default value 4162&lt;br /&gt;Last cylinder or +size or +sizeM or +sizeK (4162-8322, default 8322): [Press Enter]&lt;br /&gt;Using default value 8322&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;For this partition we don't need to specify a partition size because by default it will grow the partition to the size remaining on the disk.  When asked what the size should be, pressing enter will just allocate the remaining disk space available.  Next let's verify our newly created partitions:&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/hdd: 4294 MB, 4294967296 bytes&lt;br /&gt;16 heads, 63 sectors/track, 8322 cylinders&lt;br /&gt;Units = cylinders of 1008 * 512 = 516096 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/hdd1               1        4161     2097112+  83  Linux&lt;br /&gt;/dev/hdd2            4162        8322     2097144   83  Linux&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;You can see here the two partitions that we just created and based on their block size they are almost identical in size (there is some variation because of reserved space, superblocks, and other factors).  Finally let's write the changes to disk.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;Command (m for help): w&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;The partition table has been altered!&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Calling ioctl() to re-read partition table.&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Syncing disks.&lt;/div&gt;&lt;br /&gt;And verify one last time:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# fdisk -l&lt;/div&gt;&lt;pre style="color: #ffe599;"&gt;Disk /dev/hda: 10.7 GB, 10737418240 bytes&lt;br /&gt;255 heads, 63 sectors/track, 1305 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/hda1   *           1          13      104391   83  Linux&lt;br /&gt;/dev/hda2              14        1305    10377990   8e  Linux LVM&lt;br /&gt;&lt;br /&gt;Disk /dev/hdb: 4294 MB, 4294967296 bytes&lt;br /&gt;16 heads, 63 sectors/track, 8322 cylinders&lt;br /&gt;Units = cylinders of 1008 * 512 = 516096 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/hdb1               1        8322     4194256+  83  Linux&lt;br /&gt;&lt;br /&gt;Disk /dev/hdd: 4294 MB, 4294967296 bytes&lt;br /&gt;16 heads, 63 sectors/track, 8322 cylinders&lt;br /&gt;Units = cylinders of 1008 * 512 = 516096 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/hdd1               1        4161     2097112+  83  Linux&lt;br /&gt;/dev/hdd2            4162        8322     2097144   83  Linux&amp;nbsp;&lt;/pre&gt;&lt;pre style="color: #ffe599;"&gt;&amp;nbsp;&lt;/pre&gt;It is important to note that the default is to create the partition using a Linux System ID.  Should you want to create the partition in a different format you can use the 'l' option to list all the supported System IDs and the 't' option to change the partition type.  The fdisk utility is quiet useful and quick if you'd like to divide the disk in a hurry.  There is another utility called "parted" that offers similar functionality and more options as well.  I would advise looking into both fdisk and parted, using both to create partitions, and seeing which one you are more comfortable with.  The last utility that I would mention as well is the "partprobe" command.  When run it forces the kernel to re-read the partition tables.  While utilities like fdisk and parted do a decent job of updating the partition tables if you ever find something off after making changes to partitions, try running partprobe and letting the kernel update the partition tables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7750266912003005645?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7750266912003005645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/05/disk-partitioning.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7750266912003005645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7750266912003005645'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/05/disk-partitioning.html' title='Disk Partitioning'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-6857742585111061892</id><published>2010-05-24T15:07:00.000-04:00</published><updated>2010-05-24T15:07:17.666-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>Redhat Client Networking &amp; DNS</title><content type='html'>Networking in Centos/Redhat is pretty straight forward.  First we will look at our ip address configuration and the files used to edit this information.  Each network interface has its own config file that follows the format ifcfg-ethX where X is the number of the network card.  We can use any editor to make changes to the configuration file.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# cd /etc/sysconfig/network-scripts/&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# nano ifcfg-eth0&lt;/div&gt;&lt;br /&gt;Our config file looks like the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;DEVICE=eth0&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;BOOTPROTO=dhcp&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;HWADDR=00:11:22:33:44:55&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;ONBOOT=yes&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;TYPE=Ethernet&lt;/div&gt;&lt;br /&gt;We can see here that the DHCP protocol is in use and that it is active during the boot process.  We can determine then that this client is using DHCP to obtain an ip address from a DHCP server.  We can verify this with:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: #ffe599;"&gt;# ifconfig eth0&lt;br /&gt;eth0      Link encap:Ethernet  HWaddr 00:11:22:33:44:55  &lt;br /&gt;          inet addr:&lt;b&gt;172.168.1.203&lt;/b&gt;  Bcast:172.168.1.255  Mask:255.255.255.0&lt;br /&gt;          inet6 addr: fe80::a00:27ff:fe30:74aa/64 Scope:Link&lt;br /&gt;          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;          RX packets:19942 errors:8 dropped:0 overruns:0 frame:0&lt;br /&gt;          TX packets:966 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;          collisions:0 txqueuelen:1000 &lt;br /&gt;          RX bytes:2056708 (1.9 MiB)  TX bytes:176542 (172.4 KiB)&lt;br /&gt;          Interrupt:10 Base address:0xd020&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Perhaps though we want to change this network interface to have a static ip address that will never change.  We can edit the network interface config file to look like the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;DEVICE=eth0&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;BOOTPROTO=none&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;HWADDR=00:11:22:33:44:55&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;ONBOOT=yes&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;TYPE=Ethernet&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;USERCTL=no&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;IPV6INIT=no&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;PEERDNS=yes&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;IPADDR=172.168.1.1&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;NETMASK=255.255.255.0&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;GATEWAY=172.168.1.1&lt;/div&gt;&lt;br /&gt;Once complete you will need to restart the networking service for the changes to take effect.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# service network restart&lt;/div&gt;&lt;br /&gt;or bring down just the eth0 interface (if you have multiple adapters):&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# ifdown eth0&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# ifup eth0&lt;/div&gt;&lt;br /&gt;You can verify with the ifconfig command again to make sure that your static ip address is set correctly.  Aside from ip addresses you might also want to specify the DNS server for the client to use.  This config file is contained in /etc/resolv.conf.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# cat /etc/resolv.conf&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;search mydomain.com&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;nameserver 172.168.1.1&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;nameserver 172.168.1.2&lt;/div&gt;&lt;br /&gt;This config file is pretty easy to understand.  The first line is the domain which we want the client to search when making requests (the domain that the client belongs too).  The nameserver directive tells the client what the primary and secondary DNS servers are that it should use when making queries.&lt;br /&gt;&lt;br /&gt;Editing config files by hand however is not always the most efficeint way of doing things.  We can use some built in tools to help us configure ip addresses, gateways, and DNS information faster.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# system-config-network-tui&lt;/div&gt;&lt;br /&gt;This will open a menu driven configuration utility on the command line, which will allow you to configure the network interfaces, add a new network interface, and edit the client DNS information.  This method is much faster and easier to use.  You still will need to restart the networking service in order for these changes to take effect.  You can verify these changes however by checking the contents of the config files.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# cat /etc/sysconfig/network-scripts/ifcfg-eth0&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# cat /etc/resolv.conf&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# ifconfig eth0&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6857742585111061892?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6857742585111061892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/05/redhat-client-networking-dns.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6857742585111061892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6857742585111061892'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/05/redhat-client-networking-dns.html' title='Redhat Client Networking &amp; DNS'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-3996889381600756300</id><published>2010-04-15T13:00:00.010-04:00</published><updated>2011-04-19T12:13:46.883-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='Kickstart'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>PXE + Kickstart, Automating CentOS/RedHat Installs</title><content type='html'>&lt;span class="Apple-style-span" style="color: red;"&gt;***UPDATE - Check out the new module for Kickstart @&amp;nbsp;&lt;a href="http://modlearning.com/kickstart.php"&gt;http://modlearning.com/kickstart.php&lt;/a&gt;. &amp;nbsp;It includes images, sample kickstart files, and more. &amp;nbsp;A more advanced course for Kickstart is currently being developed as well.***&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In a previous post we looked at the install and setup of a kickstart server.  One of the last steps that had to be taken as the client was to use an "append" at the boot prompt to assign the client a static ip address.  This time we are going to look at setting up PXE services for clients to create a truly "hands-off" approach to installing desktops and servers with kickstart.  I will be using the HTTP protocol again for my kickstart and I must say resources out there for the PXE/Kickstart/HTTP are really limited.  It took a lot of trial and error to get this working, however the FTP and NFS method are much easier to implement.&lt;br /&gt;&lt;br /&gt;You should already have a working kickstart server in place before setting up anything else in this post.  For those that don't as a quick refresh you should have the following directory structure:&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;/var/www/pub&lt;br /&gt;|-- CentOS&lt;br /&gt;|-- images&lt;br /&gt;    `-- pxeboot&lt;br /&gt;|-- isolinux&lt;br /&gt;    `-- isolinux.cfg&lt;br /&gt;|-- kickstart&lt;br /&gt;|-- repodata&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;In the pxeboot folder should be vmlinuz and initrd.img files, and the kickstart folder should contain your kickstart file (test.cfg in our case).  You can also refer to this earlier post to setup this up.  Next you will need to setup a DHCP server first.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# yum -y install dhcp&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# vi /etc/dhcpd.conf&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style="color: #ffe599;"&gt;## /etc/dhcpd.conf file ##&lt;br /&gt;ddns-update-style interim;&lt;br /&gt;ignore client-updates;&lt;br /&gt;authoritative;&lt;br /&gt;allow booting;&lt;br /&gt;allow bootp;&lt;br /&gt;&lt;br /&gt;subnet 172.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;   # default gateway&lt;br /&gt;   option routers    172.168.1.1;&lt;br /&gt;   option subnet-mask   255.255.255.0;&lt;br /&gt;   option domain-name   "mydomain.org";&lt;br /&gt;   option domain-name-servers 172.168.1.1;&lt;br /&gt; &lt;br /&gt;   # EST Time Zone&lt;br /&gt;   option time-offset   -18000; &lt;br /&gt; &lt;br /&gt;   # Client IP range&lt;br /&gt;   range dynamic-bootp 172.168.1.100 172.168.1.1.200;&lt;br /&gt;   default-lease-time 21600;&lt;br /&gt;   max-lease-time 43200;&lt;br /&gt; &lt;br /&gt;   # PXE Server IP&lt;br /&gt;   next-server 172.168.1.1;&lt;br /&gt;   filename "pxelinux.0";&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;## END FILE ##&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;Now you will need to save the file and set the service to start on boot.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# chkconfig dhcpd on&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# service dhcpd restart&lt;/div&gt;&lt;br /&gt;Now your DHCP server should be setup and working properly.  You can test this if you'd like by allowing a client to lease an ip address from the server to verify that it is working (run the dhclient command on any linux box).  Next we will need to setup a TFTP server to server up the PXE file to clients.  We will need to install the server and configure it run with xinetd service.  Essentially all you need to do is change the "disable" option to "yes".&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# yum -y install tftp-server&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# vi /etc/xinetd.d/tftp&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="color: #ffe599;"&gt;## /etc/xinetd.d/tftp file ##&lt;br /&gt;&lt;br /&gt;service tftp&lt;br /&gt;{&lt;br /&gt;        socket_type           = dgram&lt;br /&gt;        protocol              = udp&lt;br /&gt;        wait                  = yes&lt;br /&gt;        user                  = root&lt;br /&gt;        server                = /usr/sbin/in.tftpd&lt;br /&gt;        server_args           = -s /tftpboot&lt;br /&gt;        disable               = no&lt;br /&gt;        per_source            = 11&lt;br /&gt;        cps                   = 100 2&lt;br /&gt;        flags                 = IPv4&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;## END FILE ##&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;Save the file and restart the service for it to take effect:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# service xinetd restart&lt;/div&gt;&lt;br /&gt;Next is going to be the install of syslinux which is required to allow the clients to actually PXE boot.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# yum -y install syslinux&lt;/div&gt;&lt;br /&gt;Simple enough.  Next we will need to create the TFTP directory layout for the clients to PXE boot from.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# cd /&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# mkdir tftpboot&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# cd tftpboot&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# mkdir images&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# mkdir pxelinux.cfg&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# cp /usr/share/syslinux/menu.c32 .&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# cp /usr/share/syslinux/pxelinux.0 .&lt;/div&gt;&lt;br /&gt;* Some will have to use /usr/lib/syslinux&lt;br /&gt;&lt;br /&gt;Now your directory structure should be in place with the required files.  Last we will just copy over the kernel for the clients to use when booting.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# cd images&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# cp /var/www/pub/images/pxeboot/vmlinuz .&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# cp /var/www/pub/images/pxeboot/initrd.img .&lt;/div&gt;&lt;br /&gt;Finally we just need to make the PXE file that directs the clients where you boot from.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# cd /tftpboot/pxelinux.cfg&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# vi default&lt;/div&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;## /tftpboot/default ##&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;default menu.c32&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;prompt 0&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;timeout 10&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;MENU TITLE PXE Menu&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;LABEL CentOS 5.4 x32&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;MENU LABEL CentOS 5.4 x32&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;KERNEL images/vmlinuz&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;append initrd=images/initrd.img linux ks=http://172.168.1.1/pub/kickstart/test.cfg&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;## END FILE ##&lt;/div&gt;&lt;br /&gt;Once you save and close this file you are done with the setup! There is one small change I forgot to mention...you will need to adjust your firewall settings for these new services.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# vi /etc/sysconfig/iptables&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 67 -j ACCEPT&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 68 -j ACCEPT&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# -A RH-Firewall-1-INPUT -m udp -p udp --dport 69 -j ACCEPT&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;#service iptables restart&lt;/div&gt;&lt;br /&gt;That should do it. Now if many of you haven't guessed by now I use the following addresses on my "lab" network to perform these test installs:&lt;br /&gt;&lt;br /&gt;DHCP Server: 172.168.1.1&lt;br /&gt;DNS Server: 172.168.1.1&lt;br /&gt;PXE Server: 172.168.1.1&lt;br /&gt;Clients: 172.168.1.100 - 172.168.1.200&lt;br /&gt;&lt;br /&gt;Most of this should be obvious from following this tutorial.  Now try PXE booting your client and it should pickup all that it needs from the PXE server, boot the linux kernel into RAM, and begin executing your kickstart file for installation.  I will note for those of you that are note using the HTTP protocol (NFS or FTP) there are very few changes that need to be made to this tutorial to make PXE booting work for you.  In particular you will have a different directory layout when starting and the /tftpboot/default file will need to have the last line changed to the format of the protocol you are using.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-3996889381600756300?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/3996889381600756300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/pxe-kickstart-automating-centosredhat.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3996889381600756300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3996889381600756300'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/pxe-kickstart-automating-centosredhat.html' title='PXE + Kickstart, Automating CentOS/RedHat Installs'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4965532108274602171</id><published>2010-04-08T15:43:00.000-04:00</published><updated>2010-04-08T15:43:03.222-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSH'/><category scheme='http://www.blogger.com/atom/ns#' term='Network Security'/><title type='text'>SSH Hardening (Part II)</title><content type='html'>Previously we looked at ways to harden the SSH service and reviewed a number of options that can be used in the config file.  Here we are going to look at public and private keys to make the SSH service more secure and possibly easier to use.  With key authentication users will have a private key (on their local client machines) and a private key (on the server which they want to connect to).  When the user goes to log into the server the two keys are used (with an optional passphrase) to allow the user to log in.  There are a few steps involved with settings this up, and most importantly is knowing where the keys will be located:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;~/.ssh/ -&amp;gt; is the location on the client machine where the private key is located&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;~/.ssh/authorized_keys -&amp;gt; is the location on the server where the public key is located&lt;/div&gt;&lt;br /&gt;Lets look at the steps for setting up key authentication.  Login to your client machine and execute the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;$ ssh-keygen -t rsa&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Generating public/private rsa key pair.&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Enter file in which to save the key (/home/tc_user/.ssh/id_rsa): [Press Enter]&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Created directory '/home/tc_user/.ssh'.&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Enter passphrase (empty for no passphrase): [Enter a STRONG password]&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Enter same passphrase again: &lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Your identification has been saved in /home/tc_user/.ssh/id_rsa.&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Your public key has been saved in /home/tc_user/.ssh/id_rsa.pub.&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;The key fingerprint is:&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;8f:a2:03:e9:5b:df:52:a4:8d:80:ad:3b:50:01:7e:23 tc_user@localhost.localdomain&lt;/div&gt;&lt;br /&gt;Here you can see both the private and public key being generated.  You should cd over into ~/.ssh and use ls -l to check and make sure that you are the only user that has read/write access to your private key.&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;$ cd ~/.ssh&lt;br /&gt;$ ls -l&lt;br /&gt;total 8&lt;br /&gt;-rw------- 1 tc_user tc_user 1743 Apr  8 10:32 id_rsa&lt;br /&gt;-rw-r--r-- 1 tc_user tc_user  411 Apr  8 10:32 id_rsa.pub&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;Now that your private key is in place and secured from other users viewing it you will need to take your public key and give it to your system admin.  We are going to assume that you are the admin, so you will take the public key of the user and copy the contents of it into the users account on the server under the authorized_keys file.  You should also secure this file:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;$ cat ./id_rsa.pub &amp;gt;&amp;gt; /home/tc_user/.ssh/authorized_keys&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;$ chmod 600 /home/tc_user/.ssh/authorized_keys&lt;/div&gt;&lt;br /&gt;There is one final change that you should make on the server.  In the /etc/ssh/sshd_config file change the following two options:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;PasswordAuthentication no&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;PubKeyAuthentication yes&lt;/div&gt;&lt;br /&gt;This will prevent users from logging on with anything but their public/private key combination.  Reload the SSH server for the settings to take effect.  Now you should be all set!  Assuming that you are not currently logged into the server remotely, go ahead and log in.  You should now be asked for a passphrase (which pertains to your password created above and not your system password).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Command line:&lt;/b&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;$ ssh -i /home/tc_user/.ssh/id_rsa tc_user@ssh_server_ip&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Putty:&lt;/b&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;Under Connection -&amp;gt; SSH -&amp;gt; Auth specify the private key file and then login normally&lt;/div&gt;&lt;br /&gt;In one more post we will look at a final program that can be used to take hardening the SSH service one step further.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4965532108274602171?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4965532108274602171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/ssh-hardening-part-ii.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4965532108274602171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4965532108274602171'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/ssh-hardening-part-ii.html' title='SSH Hardening (Part II)'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-3007116758291561512</id><published>2010-04-08T15:39:00.000-04:00</published><updated>2010-04-08T15:39:51.263-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSH'/><category scheme='http://www.blogger.com/atom/ns#' term='Network Security'/><title type='text'>SSH Hardening (Part I)</title><content type='html'>One of the most common uses of remote management in the Linux world is SSH.  In another post I talked about setting up an SSH server including a few tweaks to make it more secure.  Today though I want to talk about SSH Hardening.  Being that it is the most common way into a system it is important that you take the time to harden the service and review any log messages that may be produced.  The first thing to look at when hardening SSH is the server's config file which can be found at /etc/ssh/sshd_config.&lt;br /&gt;&lt;br /&gt;Lets look at a few options that should be changed in config file:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# Disallow users to forward ports from the server&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;AllowTcpForwarding no&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# Explicitly allow only the follow users&lt;/div&gt;&lt;span style="color: #ffe599;"&gt;AllowUsers &lt;/span&gt;&lt;username&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # The root user should never be able to log in remotely&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; DenyUsers root&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; DenyGroup root&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; PermitRootLogin no&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Don't read the rhosts file of clients&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; IgnoreRhosts yes&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Display a banner for users&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; Banner /etc/ssh_banner # You must create /etc/ssh_banner if it doesn't exist&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Send info to the syslog service&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; LogLevel INFO&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Don't allow anyone to log in without a password&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; PermitEmptyPasswords no&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Enforce using the more secure protocol (v2)&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; Protocol 2&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Don't allow X11 to forward anything&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; X11Forwarding no&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Change the default port to listen on&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; Port 222&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a good set of options to configure your sshd_config file with to make the SSH service more secure.  On top of locking down the service itself however there are other steps we can take to ensure more security for SSH.  We can setup TCP Wrappers to only allow particular hosts or subnets to be able to access the SSH server remotely.  The following assumes that I'm only allowing connections from the 172.168.1.x /24 network:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;echo "sshd: 172.168.1." &amp;gt;&amp;gt; /etc/hosts.allow&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; echo "ALL: ALL" &amp;gt;&amp;gt; /etc/hosts.deny&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will allow all clients within the 172.168.1.x subnet to connect into the SSH server (provided they have a valid user account), and it will disallow anything else.  One mistake that some people make is assuming this is a firewall, it is not!  Conveniently the next topic to touch on is iptables however.  For those that prefer the GUI interface there are dozens of utilities that interface with iptables to configure ports and services.  Essentially you are going to need to create a rule which allows access to whatever port you have defined the SSH service to run on (port 222 for the example given above).  For those following this guide and the command line oriented:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# -A RH-Firewall-1-INPUT -s 172.168.1.0/24 -m state --state NEW -p tcp --dport 222 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this point you should be all set with the hardening for SSH.  You will want to restart the iptables service and the SSH service so that all the new settings take effect, and then test out your connections.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# service iptables restart&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # service sshd restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is just a sample sshd_config file to show what it looks like with all the changes made.  Most sshd_config files will be longer and have more options to set or choose from.  Check the official documentation for a full list of options.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;### Sample sshd_config File ###&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt; &lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # General Options&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; Port 222&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; Protocol 2&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; AllowTcpForwarding no&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; Banner /etc/ssh_banner&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; IgnoreRhosts yes&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; X11Forwarding no&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt; &lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Logging&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; SyslogFacility AUTHPRIV&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; LogLevel INFO&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt; &lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Authentication&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; PermitEmptyPasswords no&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; DenyUsers root&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; DenyGroups root&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; PermitRootLogin no&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; AllowUsers jsmith&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; UsePAM yes&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; PasswordAuthentication yes&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; ChallengeResponseAuthentication no&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt; &lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # GSSAPI options&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; GSSAPIAuthentication yes&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; GSSAPICleanupCredentials yes&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt; &lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; # Accept locale-related environment variables&lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES &lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT &lt;/span&gt;&lt;br style="color: #ffe599;" /&gt;&lt;span style="color: #ffe599;"&gt; AcceptEnv LC_IDENTIFICATION LC_ALL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In a separate post we will talk about the use of public/private keys with SSH making the service even more secure and for home users, easier.&lt;/username&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-3007116758291561512?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/3007116758291561512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/ssh-hardening-part-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3007116758291561512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3007116758291561512'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/ssh-hardening-part-i.html' title='SSH Hardening (Part I)'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8693397466355572064</id><published>2010-04-07T12:29:00.000-04:00</published><updated>2010-04-07T12:29:05.144-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacking'/><category scheme='http://www.blogger.com/atom/ns#' term='XSS'/><title type='text'>An Interesting XSS</title><content type='html'>Reading another blog (SkullSecurity) the poster was talking about XSS attacks.&amp;nbsp; While these are a common in many web applications today it is hard to find an XSS that will provide useful.&amp;nbsp; There was also a discussion about creating an XSS within the HTML img tag.&amp;nbsp; Curious I decided to see if I could replicate this, so on my Apache server I created a simple "Hello World" page.&amp;nbsp; In it I put the following:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #ffe599;"&gt;&amp;lt;img src="" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;I pulled up Google Chrome and loaded the web page to find nothing more then the words "Hello World" and a broken image.&amp;nbsp; Now I went back and adjusted the page with the following:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #ffe599;"&gt;&amp;lt;img onload="alert('XSS')" src="" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Save and reload the page.&amp;nbsp; Sure enough I'm greeted with the pop up!&amp;nbsp; Now before you go plotting world domination there are some things to consider with this.&amp;nbsp; This may be a quick and dirty XSS trick but it isn't as easy to get img tags into a web page.&amp;nbsp; I spent some time looking around for forums or other posting sites where I might be able to try this out more effectively and there aren't many that I can find.&amp;nbsp; However, like the poster at SkullSecurity mentions, image getting this into a webpage without anyone detecting it.&amp;nbsp; This could cause alot of damage and just goes to show why we should all take security seriously.&amp;nbsp; This won't work in IE8 or Firefox 3.6 which is why I used Chrome.&amp;nbsp; It will probably work however if you have an older browser however.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8693397466355572064?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8693397466355572064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/interesting-xss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8693397466355572064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8693397466355572064'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/interesting-xss.html' title='An Interesting XSS'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8123275602987236833</id><published>2010-04-07T12:26:00.000-04:00</published><updated>2010-04-07T12:26:33.828-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><category scheme='http://www.blogger.com/atom/ns#' term='Network Security'/><category scheme='http://www.blogger.com/atom/ns#' term='SELinux'/><title type='text'>Getting Started With SELinux</title><content type='html'>One topic that I have tried to stay away from is SELinux.&amp;nbsp; Why?&amp;nbsp; It is a large, time consuming, and complex topic that you really need to work with to gain a good understanding of how it works and how to effectively create policies.&amp;nbsp; Many people that work with it usually turn it off as a first step when building a server.&amp;nbsp; Another way to use SELinux more effectively would be to enable it, but set it to "permissive".&amp;nbsp; This way while everything will still be allowed it will be logged.&amp;nbsp; While it isn't imperative to have it running it does add another layer of security when used properly.&amp;nbsp; I finally decided that it was time to start taking a look into this topic.&amp;nbsp; I am currently using SELinux for my Apache servers, which allow me to add security and flexibility with controls.&lt;br /&gt;&lt;br /&gt;First lets check to see if SELinux is running and what the status is set too.&amp;nbsp; You will need to be the root user and then you can run the following:&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;# sestatus&lt;br /&gt;SELinux status:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enabled&lt;br /&gt;SELinuxfs mount:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /selinux&lt;br /&gt;Current mode:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; permissive&lt;br /&gt;Mode from config file:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   permissive&lt;br /&gt;Policy version:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21&lt;br /&gt;Policy from config file:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; targeted&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;Here we see that SELinux is enabled and the current mode is set to permissive.&amp;nbsp; If you do not have SELinux enabled or you want to change the settings of it, you will need to edit the /etc/selinux/config file and reboot your machine.&amp;nbsp; It will relabel the drive and its files to match the new policy and remain persistent across all further reboots.&amp;nbsp; Next I want to look at what the Apache process is running under for SELinux.&amp;nbsp; This can be done by:&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;# ps -ZC httpd&lt;br /&gt;LABEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PID TTY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TIME CMD&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2180 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2184 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2190 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2191 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2192 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2193 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2194 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2195 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&lt;br /&gt;system_u:system_r:httpd_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2196 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:00:00 httpd&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;There are few things to notice here.&amp;nbsp; First you can see normal information about each process (9 in total), including the process ID and its label.&amp;nbsp; The labels are what we need to focus on to better understand how SELinux is handling the Apache process.&amp;nbsp; This should be fairly easy to understand from looking at it; the system_u means that the process is a system user and the system_r means that it is a process and not a file.&amp;nbsp; The third column represents the type however we will hold off on talking about that for the moment.&amp;nbsp; Everything looks good here so far for setting up Apache so lets go ahead and start adding files to the web server.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# cd /var/www/html&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# touch selinux_web_ref&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# touch index.html&lt;/div&gt;&lt;br /&gt;Here we are going into the web directory and creating two files (assuming they don't exist already).&amp;nbsp; The selinux_web_ref leave alone for the moment, but the index.html should contain some test code that you can use to test that the web server works (you can leave the default index.html if you prefer).&amp;nbsp; Now lets look at how SELinux defines access control.&amp;nbsp; There are five fields which you need to know:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;user:role:type:sensativity:category&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;User -&amp;gt; system_u for system users, user_u for normal users&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Role -&amp;gt; object_r for files, system_r for system or user processes&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Type -&amp;gt; used for access control&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Sensitivity -&amp;gt; used by government agencies&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;Category -&amp;gt; used to allow/deny access even for root user&lt;/div&gt;&lt;br /&gt;To understand how these work we look at our index.html file that we just created:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# ls -Z&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;-rwxr--r--&amp;nbsp; apache apache system_u:object_r:httpd_sys_content_t index.html&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;-rwxr--r--&amp;nbsp; apache apache system_u:object_r:httpd_sys_content_t selinux_web_ref&lt;/div&gt;&lt;br /&gt;Looking at the reference above we can see that both of these files are owned by the apache user and apache group, they are labeled as files belonging to a system user, and their type is httpd_sys_content_t.&amp;nbsp; So far so good, next we will need to check which boolean values are set in SELinux either enabling or disabling certain things from running on our web server.&amp;nbsp; We can check with the following command:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# getsebool -a | grep httpd&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;allow_httpd_anon_write --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;allow_httpd_bugzilla_script_anon_write --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;allow_httpd_cvs_script_anon_write --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;allow_httpd_mod_auth_pam --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;allow_httpd_nagios_script_anon_write --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;allow_httpd_prewikka_script_anon_write --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;allow_httpd_squid_script_anon_write --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;allow_httpd_sys_script_anon_write --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_builtin_scripting --&amp;gt; on&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_can_network_connect --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_can_network_connect_db --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_can_network_relay --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_can_sendmail --&amp;gt; on&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_disable_trans --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_enable_cgi --&amp;gt; on&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_enable_ftp_server --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_enable_homedirs --&amp;gt; on&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_rotatelogs_disable_trans --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_ssi_exec --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_suexec_disable_trans --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_tty_comm --&amp;gt; on&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_unified --&amp;gt; on&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_use_cifs --&amp;gt; off&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;httpd_use_nfs --&amp;gt; off&lt;/div&gt;&lt;br /&gt;As you can see there are many different options which can be modified.&amp;nbsp; Some research will be required to gain a better understanding of each option and allow you to set your policies correctly.&amp;nbsp; The defaults should work for most that are just starting out with SELinux.&amp;nbsp; You can also modify these settings using the setsebool command.&amp;nbsp; The final thing I wanted to touch on was why we made the selinux_web_ref file.&amp;nbsp; Most admins won't just allow users to create web content in their /var/www/html directory, they expect users to develop files on their own machines and then they will send the files to the admin to be uploaded.&amp;nbsp; This will make the security context of each file/folder different however when they are uploaded to the correct directories.&amp;nbsp; With SELinux you will want to keep all your web files/folders the same context so that the same policies apply to them.&amp;nbsp; SELinux has a nice feature where you can copy or "reference" another file for its settings and apply them.&amp;nbsp; Using the chcon command we can change the SELinux settings of the selinux_web_ref file until we are satisfied with it then apply it as the reference file for our /var/www/html directory.&amp;nbsp; I changed the context of the index.html file just as an example here:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;# ls -Z&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;-rw-r--r--&amp;nbsp; apache apache user_u:object_r:httpd_sys_content_t index.html&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;-rwxr--r--&amp;nbsp; apache apache system_u:object_r:httpd_sys_content_t selinux_web_ref&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# chcon --reference selinux_web_ref index.html &lt;/div&gt;&lt;div style="color: #ffe599;"&gt;# ls -Z&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;-rw-r--r--&amp;nbsp; apache apache system_u:object_r:httpd_sys_content_t index.html&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;-rwxr--r--&amp;nbsp; apache apache system_u:object_r:httpd_sys_content_t selinux_web_ref&lt;/div&gt;&lt;br /&gt;You can see above that the index.html file was set as a user file, but was changed to a system file after referencing the context of selinux_web_ref.&amp;nbsp; This can obviously be scripted to make life easier for the system admin.&amp;nbsp; As a final note it is worth mentioning that SELinux by default shouldn't have any trouble with .html pages, but will deny or disallow most scripts.&amp;nbsp; You will need to adjust the policy and settings to fit your needs.&lt;br /&gt;&lt;br /&gt;Additional Reference:&lt;br /&gt;&lt;a href="http://wiki.centos.org/TipsAndTricks/SelinuxBooleans"&gt;http://wiki.centos.org/TipsAndTricks/SelinuxBooleans&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.centos.org/HowTos/SELinux"&gt;http://wiki.centos.org/HowTos/SELinux&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8123275602987236833?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8123275602987236833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/getting-started-with-selinux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8123275602987236833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8123275602987236833'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/getting-started-with-selinux.html' title='Getting Started With SELinux'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4575930171179065808</id><published>2010-04-05T15:50:00.001-04:00</published><updated>2010-04-05T15:50:56.399-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HIDS'/><category scheme='http://www.blogger.com/atom/ns#' term='Network Security'/><title type='text'>Installing OSSEC</title><content type='html'>After hearing some great reviews about OSSEC I have decided to give this a go.&amp;nbsp; From what I have seen so far it is very flexible and works with databases, syslog servers, splunk, and more.&amp;nbsp; OSSEC is a HIDS so it offers you file integrity checking, root-kit detection, real-time alerts, active responses, and more.&amp;nbsp; I did a basic local installation although you can setup OSSEC to follow the client/server model and have all your clients report back to the master server.&amp;nbsp; Here are the steps for the install:&lt;br /&gt;&lt;br /&gt;Download files&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;wget http://www.ossec.net/files/ossec-hids-latest.tar.gz&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;wget http://www.ossec.net/files/ossec-hids-latest_sum.txt&lt;/div&gt;&lt;br /&gt;Check the MD5 or SAH1 to make sure they are legit (Don't skip!!) &lt;br /&gt;&lt;div style="color: #ffe599;"&gt;md5sum ossec-hids-latest.tar.gz&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;cat ossec-hids-latest_sum.txt&lt;/div&gt;&lt;br /&gt;Extract the files from the tar&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;tar zxvf ossec-hids-latest.tar.gz&lt;/div&gt;&lt;br /&gt;Cd into the directory and run the installer **&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;cd ossec-hids-latest/&lt;/div&gt;&lt;div style="color: #ffe599;"&gt;./install.sh&lt;/div&gt;&lt;br /&gt;If you are not running a local install make sure to adjust the firewall&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p udp --dport 1514 -j ACCEPT&lt;/div&gt;&lt;br /&gt;Start the service&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;/var/ossec/bin/ossec-control start&lt;/div&gt;&lt;br /&gt;**Before you install this program you will need to make sure that you have a compiler installed, such as gcc.&lt;br /&gt;&lt;br /&gt;That's all there is to it!&amp;nbsp; You should see the service start successfully and the monitoring will begin.&amp;nbsp; My recommendation from here would be to looking through /var/ossec/logs/ to see what the system is reporting as well as /var/ossec/etc to make any adjustments to the configuration files as you see fit.&amp;nbsp; I'm sure there are going to be directories and files that you don't want monitored because they change so frequently.&amp;nbsp; Currently I'm using this on my Apache servers which sit in the DMZ so its good to see the reporting from OSSEC as well as the firewall rules you can tune within the program.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4575930171179065808?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4575930171179065808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/installing-ossec.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4575930171179065808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4575930171179065808'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/installing-ossec.html' title='Installing OSSEC'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-1033081870035957342</id><published>2010-04-04T09:55:00.000-04:00</published><updated>2010-04-04T09:55:07.899-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Cryptography'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Shift Cipher</title><content type='html'>While working on a coding challenge one of the requires was to create a shift cipher.&amp;nbsp; As a quick introduction to this you will usually be given a clue that looks like a dictionary in Python.&amp;nbsp; One character will represent another:&lt;br /&gt;&lt;br /&gt;A --&amp;gt; C&lt;br /&gt;E --&amp;gt; G&lt;br /&gt;&lt;br /&gt;Here we can see that if all 'A' is 'C' and all 'E' is 'G' then we can count the shift and tell this is a shift 2 cipher.&amp;nbsp; This isn't too hard to calculate by hand however when the text becomes longer and the shifts are much larger this process can become very tedious.&amp;nbsp; Here I used a Python script as it is quick and easy to perform what we are looking for.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: #ffe599;"&gt;#!/usr/bin/python&lt;br /&gt;&lt;br /&gt;from string import maketrans&lt;br /&gt;&lt;br /&gt;plaintext = raw_input("Enter your text: ")&lt;br /&gt;shift_num = int(raw_input("Enter number to shift by: "))&lt;br /&gt;&lt;br /&gt;alphabet = 'abcdefghijklmnopqrstuvwxyz'&lt;br /&gt;&lt;br /&gt;code_string = alphabet[shift_num:] + alphabet[:shift_num]&lt;br /&gt;encode = maketrans(alphabet + alphabet.upper(), code_string + code_string.upper())&lt;br /&gt;print '\n'&lt;br /&gt;print "Encoded text is: " + plaintext.translate(encode)&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;The code_string line will rearrange the alphabet to look like the cipher alphabet making translation easier.&amp;nbsp; The maketrans function will then replace each character in the string or text provided with its equal in the shift alphabet.&amp;nbsp; the alphabet.upper() is to make sure that upper and lower case characters don't break the script.&amp;nbsp; An additional challenge for this script might be to add a decode function.&amp;nbsp; This can be done by checking the frequency of occurring letters in the cipher text and then making a guess at the number used for the shift in the cipher.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-1033081870035957342?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/1033081870035957342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/shift-cipher.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1033081870035957342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1033081870035957342'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/shift-cipher.html' title='Shift Cipher'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-6128340535343877040</id><published>2010-04-04T09:46:00.000-04:00</published><updated>2010-04-04T09:46:24.519-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Needle In a Haystack</title><content type='html'>Recently I was working through a coding challenge online which involved Python coding.&amp;nbsp; One challenge required the user to parse a string of text for rare characters.&amp;nbsp; After studying a cryptography course in college I knew the challenge was looking for frequencies, or the number of times each character appear in the string.&amp;nbsp; Given the parameters that they want only the rare characters in the string I was looking for the characters that appeared the least.&amp;nbsp; A quick Python script and i was good to go:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: #ffe599;"&gt;#!/usr/bin/python&lt;br /&gt;&lt;br /&gt;string_to_search = raw_input("Enter text to search: ")&lt;br /&gt;&lt;br /&gt;print ''.join(filter(lambda x: x.isalpha(), string_to_search))&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/pre&gt;Here we are asking the user to enter the text or string that they want to search through.&amp;nbsp; The second line can be a little more confusing.&amp;nbsp; We are using the join command as an append function to add together any alpha characters that are returned.&amp;nbsp; The filter function will only filter out what is define in the function following it, the lambda function.&amp;nbsp; The lambda x is way to create inline function within Python and in this case to search for anything that is an alpha character.&amp;nbsp; This function will work for relatively long string however if you are parsing a really long text item or one that contains special characters which the bash shell will attempt to interpret, I suggest you modify this script slight to read the characters from a text file and parse from there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6128340535343877040?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6128340535343877040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/needle-in-haystack.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6128340535343877040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6128340535343877040'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/needle-in-haystack.html' title='Needle In a Haystack'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-1464645025086318731</id><published>2010-04-03T21:39:00.000-04:00</published><updated>2010-04-03T21:39:17.732-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><title type='text'>Locked Out User Accounts</title><content type='html'>In the process of coming up with daily/weekly checklists one thing that we wanted to check for was locked out user accounts.&amp;nbsp; This would tell us if someone accidentally locked out their account or if an account got locked out due to a brute force attack.&amp;nbsp; I threw together a perl script that would parse the /etc/shadow file for locked out user accounts and then made a cron job for it to check every six hours.&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;#!/usr/bin/env perl&lt;br /&gt;&lt;br /&gt;# Open the /etc/shadow file for reading&lt;br /&gt;open(my $in, "&amp;lt;", "/etc/shadow") or die "Can't open the file: $!";&lt;br /&gt;&lt;br /&gt;# Parse each line looking for locked out accounts&lt;br /&gt;while (&amp;lt;$in&amp;gt;){&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # File Format username:password:0:99999:0:::&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($_ =~ m/:!/){&lt;br /&gt;&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; # If a locked out user is found print their username&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; @user = split (/:/);&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; print "Found locked out account: $user[0]\n";&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-1464645025086318731?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/1464645025086318731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/locked-out-user-accounts.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1464645025086318731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1464645025086318731'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/locked-out-user-accounts.html' title='Locked Out User Accounts'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-853607796562670094</id><published>2010-04-02T09:25:00.007-04:00</published><updated>2010-04-02T09:33:58.074-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VMware'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Windows 7 vSphere Issues</title><content type='html'>Here is common scenario in IT.&amp;nbsp; You just got a new laptop at work as the company is upgrading and you decide to move over your applications from your old Windows XP laptop.&amp;nbsp; You begin reinstalling each application and tweaking it to your liking.&amp;nbsp; Finally you run across "the application", you know the one that is going to give you trouble because you are on a new operating system.&amp;nbsp; You check the vendors website and sure enough it says Windows 7 support, but installer throwing error messages at you begs to differ.&amp;nbsp; Well for me it just happens to be vSphere.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Apparently there is a Windows 7 version of the client however there is an issue with using the .NET 3.5 SP1 framework on Windows 7 and the program.&amp;nbsp; So what's the fix?&amp;nbsp; You need to download and install the .NET 3.5 SP1 framework on Windows XP!!&amp;nbsp; Seriously?!&amp;nbsp; Anyway to resolve this issue isn't too complicated but does require a little work.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;1.&amp;nbsp; First you will need to install the vSphere client, but don't run it just yet.&lt;br /&gt;&lt;br /&gt;2.&amp;nbsp; Download the following system.dll to replace the broken one in Windows 7 &lt;a href="http://www.techhead.co.uk/files/system.dll"&gt;[Download Here]&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;3.&amp;nbsp; Go to C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher and create a folder called "lib".&lt;br /&gt;&lt;br /&gt;4.&amp;nbsp; Copy the system.dll to lib.&lt;br /&gt;&lt;br /&gt;5.&amp;nbsp; Going back to the launcher directory rename VpxClient.exe.config to VpxClient.exe.old and open it for editing.&lt;br /&gt;&lt;br /&gt;6.&amp;nbsp; Add the following line right before the close of the "configuration" tag and "Save As" VpxClient.exe.config.&lt;br /&gt;&lt;pre&gt;&lt;div style="color: #ffe599;"&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: inherit;"&gt;[runtime]&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;   [developmentMode developerInstallation="true"/]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: inherit;"&gt;[/runtime]&lt;/span&gt;&lt;/span&gt;&lt;configuration&gt;&lt;br /&gt;&lt;/configuration&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;* Replace [ with &amp;gt;&lt;br /&gt;&lt;br /&gt;7. Open the advanced tab of system properties and create a new environment variable.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #ffe599;"&gt;Variable Name: DEVPATH&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Variable Value: C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finished!&amp;nbsp; You should now be able to launch the vSpphere client with no problems, however there are some reports that you must "Run as Administrator" if it still gives you errors.&amp;nbsp; This isn't a huge fix to get the application working however VMware is a big enough company where they should put some time into researching why things like this don't work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-853607796562670094?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/853607796562670094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/windows-7-vsphere-issues.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/853607796562670094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/853607796562670094'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/windows-7-vsphere-issues.html' title='Windows 7 vSphere Issues'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-1356297511467501638</id><published>2010-04-01T10:27:00.003-04:00</published><updated>2011-04-19T12:14:25.672-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='Kickstart'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>Building a Kickstart Install Server (CentOS/Redhat)</title><content type='html'>&lt;span class="Apple-style-span" style="color: red;"&gt;***UPDATE - Check out the new module for Kickstart @&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;a href="http://modlearning.com/kickstart.php"&gt;http://modlearning.com/kickstart.php&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;. &amp;nbsp;It includes images, sample kickstart files, and more. &amp;nbsp;A more advanced course for Kickstart is currently being developed as well.***&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In a recent project I needed to build a kickstart server which would be used to automate the deployment of some new servers that were being setup.&amp;nbsp; We will build a simple kickstart server offering installs over HTTP to the clients.&amp;nbsp; I will also post a sample kickstart script that I used to accomplish the installs of the servers.&amp;nbsp; This little project actually turned out to be quiet easy, and the most difficult part was writing the custom scripts to execute after the installation of the server completed.&amp;nbsp; First we are going to install/setup the kickstart server itself.&amp;nbsp; I will be using Virtualbox as my test environment to demonstrate here.&amp;nbsp; Using the CentOS install DVD, walk through the install instructions to get the system up and running.&amp;nbsp; This should be fairly simple although I will make one note; I only install the base packages and the Gnome desktop manager to keep the install quick and easy.&amp;nbsp; If you'd like to add other packages to your install just be aware that it can raise the amount of time that the install takes (my install time was about 10 minutes).&amp;nbsp; After the installation of the server is complete you will be brought to the desktop for the first time.&amp;nbsp; When performing network installations with kickstart you can actually offer up the install files via NFS, HTTP, or FTP.&amp;nbsp; I choose to use HTTP because it was the quickest and slightly easier than the other two methods.&amp;nbsp; It also requires less configuration for those attempting this for the first time.&lt;br /&gt;&lt;br /&gt;While you don't need Gnome in order for this server to work properly it is easier to use and saves time in the configuration aspects.&amp;nbsp; Once you have a desktop go to System -&amp;gt; Administration -&amp;gt; Security Level &amp;amp; Firewall.&amp;nbsp; Here you can make changes to SELinux and the Firewall.&amp;nbsp; First we will need to check off the boxes for NFS, SSH, and HTTP (don't disable the firewall unless you are in a totally isolated environment).&amp;nbsp; In the second tab change the SELinux setting to permissive or disabled (I choose disabled because I have no need for it on this server).&amp;nbsp; Confirm all the changes and allow the settings to take effect.&amp;nbsp; Next we will need to install Apache which will serve up the installation files.&amp;nbsp; Open a shell, change to the root user, and install Apache with: yum install httpd.&amp;nbsp; Once the install has completed verify that the service is running with: service httpd status.&amp;nbsp; The last part of the configuration will be to create the directory structure we will use to serve the installation files and populate them.&amp;nbsp; You will need to make sure that the install DVD for CentOS is in the CD-ROM drive.&amp;nbsp; In the same shell use the following commands to create directories and copy over the files for installation.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;cd /var/www&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;mkdir pub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;cd pub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;mkdir kickstart&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;cp -vr /media/CentOS_5.4_Final/ /var/www/pub/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You should now have a pub directory that is filled with the install files from the CentOS 5.4 install DVD, which will be used to install clients via kickstart.&amp;nbsp; For the last steps we will need to build a kickstart file and copy it into /var/www/pub/kickstart where the clients will pull it from during install.&amp;nbsp; Below I will paste a basic kickstart files (with comments) that you can copy &amp;amp; paste into a file called test.cfg, which will need to be moved to /var/www/pub/kickstart.&amp;nbsp; Kickstart files can get very complex with scripts and custom settings which is why we are going to use this basic template.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Kickstart file for a basic install.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;install&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;url --url http://192.168.1.100/pub/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;lang en_US.UTF-8&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;keyboard us&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Assign the client a static IP upon first boot &amp;amp; set the hostname&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;network --device eth0 --bootproto static --ip=192.168.1.105 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=192.168.1.1 --hostname RHEL01 --noipv6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Set the root password&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;rootpw --iscrypted &lt;encrypted goes="" here="" md5="" password=""&gt;&lt;/encrypted&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Enable the firewall and open port 22 for SSH remote administration&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;firewall --enabled --port=22:tcp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Setup security and SELinux levels&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;authconfig --enableshadow --enablemd5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;selinux --permissive&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Set the timezone&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;timezone --utc America/New_York&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Create the bootloader in the MBR with drive sda being the drive to install it on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;bootloader --location=mbr --driveorder=hda&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Wipe all partitions and build them with the info below&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# ***hda may be different on your machine depending on the type of drives you use***&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;clearpart --drives=hda --all --initlabel&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;part /boot --fstype ext3 --size=100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;part / --fstype ext3 --size=5000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;part swap --size=2000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;part /home --fstype ext3 --size=100 --grow&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Install the Base and Core software package groups for a minimal install, plus OpenSSH server &amp;amp; client&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;%packages&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;@Core&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;@Base&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;openssh-clients&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;openssh-server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now everything is in place.&amp;nbsp; The kickstart server has been built, the kickstart file is in place, and you are ready to boot up your client to start testing a kickstart installation.&amp;nbsp; For our test we will kick off another virtual machine and boot from the netinstall.iso (available from the CentOS downloads page).&amp;nbsp; This will boot off the CD and give us a prompt for parameters to be passed to the kernel during boot up.&amp;nbsp; We will use the following command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;$ linux text ks=http://192.168.1.100/pub/kickstart/test.cfg append ip=192.168.1.105 netmask=255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This command tells the client to boot the kernel, look for the 192.168.1.100 server (our kickstart server), retrieve the test.cfg file from /pub/kickstart/, and assign the client a static address of 192.168.1.105.&amp;nbsp; There are two things to note here; one is that in order to not use a static address you will need a functional DHCP server with specific settings configure (this will be detailed in another post), two the static ip assignment can actually take place in the kickstart file however there is a bug in CentOS currently which prevents this from happening, which is why we must specify a static ip via kernel boot parameters.&amp;nbsp; If you typed the command correctly and the server is setup properly you will see the client begin to install the system automatically.&amp;nbsp; When finished you will be prompted to reboot and your system will be ready for use!&amp;nbsp; While the install is happening you can view log files in the background by switching virtual terminals.&amp;nbsp; Alt+F2 will give you a shell once the system is installed, Alt+F3 will show command line logs, Alt+F4 shows the kernel logs.&amp;nbsp; This process to automatically install servers and clients via kickstart is extremely helpful in rolling out new systems and fairly easy to accomplish.&amp;nbsp; Hopefully you will take this further and work on customizing your installations and post install scripts.&amp;nbsp; For a reference on kickstart files see the documentation:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-kickstart2-options.html"&gt;http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-kickstart2-options.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For a more automated approach to kickstart check out my other posting for PXE booting, hands free install:&lt;br /&gt;&lt;a href="http://www.blogger.com/goog_311129399"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://secnut.blogspot.com/2010/04/pxe-kickstart-automating-centosredhat.html"&gt;http://secnut.blogspot.com/2010/04/pxe-kickstart-automating-centosredhat.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-1356297511467501638?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/1356297511467501638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/04/building-kickstart-install-server.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1356297511467501638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1356297511467501638'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/04/building-kickstart-install-server.html' title='Building a Kickstart Install Server (CentOS/Redhat)'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-50717796313697736</id><published>2010-03-29T20:27:00.000-04:00</published><updated>2010-03-29T20:27:37.522-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network Mapping'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Network Documentation</title><content type='html'>Every time I have started a new job over the last few years I have always gone in hoping to get a look at the companies network documentation, which would enable me to get up to speed and working with the team in no time.&amp;nbsp; Sadly I have always been told the same thing, "What documentation"?!&amp;nbsp; I think that network documentation is an important aspect of any network and should be taken seriously.&amp;nbsp; There are many benefits to documenting your network which include:&lt;br /&gt;&lt;ul style="color: #ffe599;"&gt;&lt;li&gt;Ease in troubleshooting&lt;/li&gt;&lt;li&gt;Helping with new hires&lt;/li&gt;&lt;li&gt;Makes project planning easier&lt;/li&gt;&lt;li&gt;Helps with collaboration between different departments&lt;/li&gt;&lt;/ul&gt;Being that I have had to start from scratch with network documentation every time I thought I would share some tips that I have put together over the years.&amp;nbsp; First you will need a good IP scanner which can pull live IP addresses from the network.&amp;nbsp; Personally I use NMAP or Angry IP Scanner as both are very quick and provide valuable information.&amp;nbsp; NMAP is also useful later on when you want to run port scans against a machine to find out what services are running.&amp;nbsp; Angry IP Scanner will allow you to dump the output of the scan to an excel spreadsheet making it easier to reference later on.&amp;nbsp; You should also start by locating and looking through the DHCP scopes on your network.&amp;nbsp; This will help you weed out "client" addresses when looking for servers and network devices from your scan.&amp;nbsp; I usually start to draw out some diagrams by hand when starting to get an idea of what goes where on the network.&amp;nbsp; As I start to get a better idea and can put IP to device I will move my diagram over into Microsoft's Visio (one of the better programs they have produced).&amp;nbsp; Many vendors out there produce stencils for Visio making it easy to put together documentation, diagrams, and subnet depictions.&lt;br /&gt;&lt;br /&gt;When working on your documentation look through the different subnets and VLANs that your network holds.&amp;nbsp; You may also need to work with other departments to acquire all the information that you need.&amp;nbsp; You should also look through and document configuration files for routers, switches, and firewalls.&amp;nbsp; This might also include mapping switch ports to VLANs and making sure that your firewall/router interfaces are configured properly.&amp;nbsp; I must say that I continuously use my own documentation to work through projects and they have always been worth the effort.&amp;nbsp; Below is just a quick list of places to acquire information from when putting together your documentation that I have used in the past.&lt;br /&gt;&lt;ul style="color: #ffe599;"&gt;&lt;li&gt;Active Directory (Site Replication, Group Policy)&lt;/li&gt;&lt;li&gt;DHCP Servers (Scopes, DHCP Options, Subnets, PXE Options)&lt;/li&gt;&lt;li&gt;Routers/Switches (VLANs and Subnets)&lt;/li&gt;&lt;li&gt;Firewalls (Security Policies, Access rules)&lt;/li&gt;&lt;li&gt;DMZ (IDS servers/appliances, Web Servers)&lt;/li&gt;&lt;li&gt;PING &amp;amp; TRACEROUTE&lt;/li&gt;&lt;li&gt;Nmap &amp;amp; Angry IP Scanner&lt;/li&gt;&lt;li&gt;www.maxmind.com (IP address lookup for remote offices)&lt;/li&gt;&lt;li&gt;VPN Configs (IPSEC &amp;amp; Site-to-Site)&lt;/li&gt;&lt;li&gt;Model &amp;amp; Serial Numbers&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-50717796313697736?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/50717796313697736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/03/network-documentation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/50717796313697736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/50717796313697736'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/03/network-documentation.html' title='Network Documentation'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8475395249690984405</id><published>2010-03-16T16:38:00.000-04:00</published><updated>2010-03-16T16:38:36.399-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='VBScript'/><title type='text'>Automating Outlook Signatures</title><content type='html'>Recently I was tasked with a way to standardize our signatures in Outlook. I came up with the follow script that was applied as a group policy to all users. There are a few things to note however:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The script works on Outlook 2003/2007&lt;/li&gt;&lt;li&gt;Other then IE, Webmail, and Outlook other browsers or Operating System will distort the layout of the signature&lt;/li&gt;&lt;li&gt;The script pulls all information from Active Directory&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;pre&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;Set objSysInfo = CreateObject("ADSystemInfo")&lt;br /&gt;strUser = objSysInfo.UserName&lt;br /&gt;Set objUser = GetObject("LDAP://" &amp;amp; strUser)&lt;br /&gt;&lt;br /&gt;strConfidS = "Confidentiality Note:"&lt;br /&gt;strConfid = "Notice goes here"&lt;br /&gt;strFname = objUser.FirstName&lt;br /&gt;strLname = objUser.LastName&lt;br /&gt;strInitial = objUser.Initials&lt;br /&gt;strTitle = objUser.Title&lt;br /&gt;strWebsite = "www.mycompanieswebsite.com"&lt;br /&gt;strCompany = objUser.Company &lt;br /&gt;strPhone = objUser.telephoneNumber&lt;br /&gt;strFax = objUser.facsimileTelephoneNumber&lt;br /&gt;strStreet = objUser.streetAddress&lt;br /&gt;strCity = objUser.l&lt;br /&gt;strState = objUser.st&lt;br /&gt;strZip = objUser.postalCode&lt;br /&gt;strEmail = objUser.mail&lt;br /&gt;&lt;br /&gt;Set objWord = GetObject(, "Word.Application")&lt;br /&gt;If objWord Is Nothing Then&lt;br /&gt;Set objWord = CreateObject("Word.Application")&lt;br /&gt;blnWeOpenedWord = True&lt;br /&gt;End If&lt;br /&gt;Set objDoc = objWord.Documents.Add()&lt;br /&gt;Set objSelection = objWord.Selection&lt;br /&gt;Set objEmailOptions = objWord.EmailOptions&lt;br /&gt;Set objSignatureObjects = objWord.EmailOptions.EmailSignature&lt;br /&gt;Set objSignatureEntries = objSignatureObjects.EmailSignatureEntries&lt;br /&gt;objSelection.Style = "No Spacing"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Name&lt;br /&gt;objSelection.Font.Size = "11"&lt;br /&gt;objselection.Font.Bold = true&lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; strFname &amp;amp; " "&lt;br /&gt;if strInitial then &lt;br /&gt;objSelection.TypeText UCase(strInitial) &amp;amp; ". "&lt;br /&gt;end if&lt;br /&gt;objSelection.TypeText strLname&lt;br /&gt;objselection.Font.Bold = false&lt;br /&gt;&lt;br /&gt;objSelection.Font.Size = "8"&lt;br /&gt;objSelection.TypeText Chr(11)&lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; strCompany&lt;br /&gt;objSelection.TypeText Chr(11)&lt;br /&gt;if strTitle then &lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; strTitle&lt;br /&gt;end if&lt;br /&gt;&lt;br /&gt;objSelection.TypeText Chr(11)&lt;br /&gt;objSelection.TypeText Chr(11)&lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; strStreet &amp;amp; Chr(11)&lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; strCity &amp;amp; ", " &amp;amp; strState &amp;amp; " " &amp;amp; strZip &amp;amp; Chr(11)&lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; "tel. " &amp;amp; strPhone &amp;amp; Chr(11)&lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; "fax. " &amp;amp; strFax &amp;amp; Chr(11)&lt;br /&gt;objSelection.TypeText Chr(11)&lt;br /&gt;&lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; "email. " &amp;amp; strEmail &amp;amp; Chr(11)&lt;br /&gt;objSelection.TypeText vbTab &amp;amp; " " &amp;amp; "website. " &amp;amp; strWebsite &amp;amp; Chr(11)&lt;br /&gt;objSelection.TypeText Chr(11)&lt;br /&gt;&lt;br /&gt;objSelection.Font.Bold = True&lt;br /&gt;objSelection.TypeText strConfidS &amp;amp; " "&lt;br /&gt;objSelection.Font.Bold = False&lt;br /&gt;objSelection.TypeText strConfid&lt;br /&gt;Set objSelection = objDoc.Range()&lt;br /&gt;&lt;br /&gt;Set objShape = objDoc.Shapes&lt;br /&gt;objShape.AddPicture("\\server\netlogon\logo.png")&lt;br /&gt;&lt;br /&gt;objSignatureEntries.Add "AD Signature", objSelection&lt;br /&gt;objSignatureObjects.NewMessageSignature = "AD Signature"&lt;br /&gt;objSignatureObjects.ReplyMessageSignature = "AD Signature"&lt;br /&gt;&lt;br /&gt;objDoc.Close 0&lt;br /&gt;If blnWeOpenedWord Then&lt;br /&gt;objWord.Quit&lt;br /&gt;End If&lt;br /&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_WT187SbRvF0/S5_rvxVECRI/AAAAAAAAAA8/nVIAE3OgsNg/s1600-h/sig.jpg" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="210" src="http://1.bp.blogspot.com/_WT187SbRvF0/S5_rvxVECRI/AAAAAAAAAA8/nVIAE3OgsNg/s640/sig.jpg" vt="true" width="640" /&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/5157720536595794113-8475395249690984405?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8475395249690984405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/03/automating-outlook-signatures.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8475395249690984405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8475395249690984405'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/03/automating-outlook-signatures.html' title='Automating Outlook Signatures'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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/_WT187SbRvF0/S5_rvxVECRI/AAAAAAAAAA8/nVIAE3OgsNg/s72-c/sig.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-3118501601991629564</id><published>2010-03-04T09:11:00.001-05:00</published><updated>2010-03-04T09:14:34.757-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><category scheme='http://www.blogger.com/atom/ns#' term='LPIC'/><title type='text'>Red Hat Package Management</title><content type='html'>A package in linux contains files and directories of the software we wish to use. &amp;nbsp;There are two different package types, .rpm used by Red Hat/CentOS/Fedora and .deb used by Debian/Ubuntun. &amp;nbsp;We are going to focus on the Red Hat version. &amp;nbsp;Each package in Red Hat is broken down into the following format:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;package_name-version-release.arch.rpm&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;postfix-2.3.3-2.1.el5_2.i386.rpm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To download and install packages you obtain them from repositories. &amp;nbsp;Needless to say you should only use repositories and files from trusted sources. &amp;nbsp;The Red Hat Network (RHN) also provides packages and software updates from Red Hat clients. &amp;nbsp;It also provides a web interface which allows for snapshots, scheduled commands, and kickstart installations. &amp;nbsp;Instead of going into every single detail relating to rpm and yum (the frontend to rpm), we will look at common tasks and commands for system administration.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Querying Packages&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To list all install packages on the system:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$rpm -qa&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;- or -&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$rpmquery -a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use commands like sort, grep, and wc to filter the results.&lt;br /&gt;&lt;br /&gt;Check to see if Apache is installed:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$rpm -qa | grep httpd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If it returns the package then it is installed, otherwise nothing will be returned meaning it is not installed.&lt;br /&gt;&lt;br /&gt;Also available is the yum commands which produce alot of output so make sure to pipe them:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum list | grep httpd&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;httpd.i386 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.2.3-31.el5.centos.2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; installed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Searching for Packages&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To find a package to install:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum search httpd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Installing Packages&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To install Apache with no prompts:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum -y install httpd.i386&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can also use rpm to install packages that you have downloaded:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$rpm -ivh mypackage.rpm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Removing Packages&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To uninstall Apache:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum remove httpd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can also do the same with the rpm command:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$rpm -e mypackage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Some other commands that may be useful include updating, upgrading, obtaining information on packages, and group installs.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum update&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum check-update&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum info &lt;package name=""&gt;&lt;/package&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum groupinstall &lt;group name="" package=""&gt;&lt;/group&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum clean all&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For those of you can don't like the command line you can also use the GUI tool that comes with Red Hat called pirut. &amp;nbsp;This is the package manager which can perform all the same commands that we have discussed via the command line. &amp;nbsp;The last part of package management that we will discuss deals with YUM repositories. &amp;nbsp;When handling a large number of systems and installs you will probably want to configure a local package repository (unless you happen to have a massive bandwidth pipe to the internet). &amp;nbsp;It also will help with dependency issues because it will make certain that all packages are using the versions. &amp;nbsp;to create a local repository follow these steps:&lt;br /&gt;&lt;br /&gt;1) Download the needed package&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$yum -y install createrepo&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2) Create a directory for the repors&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$mkdir -p /var/yum/repos.d &amp;amp;&amp;amp; cd /var/yum/repos.d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3) Move all packages that you wish to be made available&lt;br /&gt;&lt;br /&gt;4) Execute the createrepo command to convert the packages to local distribution&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$createrepo -v .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5) Create the repo file for the repository&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$nano /etc/yum.repos.d/server01.repo&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;[server01]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;name=yum repository for server01&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;baseurl=ftp://server01/var/yum/repos.d/&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;enabled=1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;gpgcheck=1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally you will need to make sure that your main yum configuration file is in order and specifies you local repositories as well. &amp;nbsp;You can find the file in /etc/yum.conf. &amp;nbsp;You now should have a pretty good handle on managing packages for your system. &amp;nbsp;There are obviously many other commands and options that you can use with yum or rpm however it is better to have a foundation and then work through the --help parameters. &amp;nbsp;This will show you all the options available and as always use the man pages for clarification of anything you may need.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-3118501601991629564?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/3118501601991629564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/03/red-hat-package-management.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3118501601991629564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3118501601991629564'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/03/red-hat-package-management.html' title='Red Hat Package Management'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-5869654440036010877</id><published>2010-03-04T09:06:00.000-05:00</published><updated>2010-03-04T09:06:20.813-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='LPIC'/><title type='text'>Working with Linux Processes</title><content type='html'>Each time a program or command is run a process is created for it. &amp;nbsp;These processes are all unique and identified by the process identification (PID) which becomes allocated to it. &amp;nbsp;System processes, or daemons, are critical to keeping the system up and running or providing services to clients. &amp;nbsp;To work with processes we have two commands available to us. &amp;nbsp;The first is ps which can list information about processes helping us to manage them. &amp;nbsp;If using the ps command with no arguments it will just show the processes specific to the terminal that it is run in. &amp;nbsp;This isn't very useful, so we can look at some of the commonly used arguments.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;-e&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;shows all processes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;-u&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;shows the user related to the process&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;-f&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;shows full output&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;a&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;shows all processes including other users&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;x&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;shows processes without a controllering ttys&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These particular arguements are important because they help you identify which processes are running, who they are ownered by, processes that normally aren't seen (because they aren't associated to a terminal), and other information. &amp;nbsp;The following is a partial example (because the output can be quite large):&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ps aux&lt;/span&gt;&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/_WT187SbRvF0/S4--SgnwFLI/AAAAAAAAAA0/F3yCYF8fIkU/s1600-h/ps_aux.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="208" src="http://4.bp.blogspot.com/_WT187SbRvF0/S4--SgnwFLI/AAAAAAAAAA0/F3yCYF8fIkU/s640/ps_aux.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Looking here you can see the header which details what the different columns mean. &amp;nbsp;You can also do ps -ef which will show the PPID column, representing the parent process. &amp;nbsp;While this output is useful there is always multiple ways to obtain information. &amp;nbsp;A second way to view process information, in more of "real time" use can use the top command. &amp;nbsp;Top is also interactive so once you launch it you can manipulate processes through different keys.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$top&lt;/span&gt;&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/_WT187SbRvF0/S4-9ySp3LMI/AAAAAAAAAAs/dqTCkdxMVWQ/s1600-h/top_process.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="337" src="http://2.bp.blogspot.com/_WT187SbRvF0/S4-9ySp3LMI/AAAAAAAAAAs/dqTCkdxMVWQ/s640/top_process.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As you can see here there is some extra information that you get with using top as well as being able to set the refreash rate for the program. &amp;nbsp;These are just two programs that you can use to view processes at the command line. &amp;nbsp;For those of you that like the GUI you can use the system monitor in Gnome (or launch gnome-system-monitor) or Ktop for the KDE environment.&lt;br /&gt;&lt;br /&gt;If you would like specific information about processes there are two more commands that you should know. &amp;nbsp;The first is pidof, which takes a process name as a parameter. &amp;nbsp;It will return the PID of that particular process, however you must obviously know the name of the process in order to use this command. &amp;nbsp;Next we have pgrep that can be used to list all processes owned by a particular user using the -U argument or list all processes owned by a particular group using the -G argument. &amp;nbsp;Similar to pidof it will only list the PID of the processes.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$pidof sshd&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;2208 1982&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$pgrep -U apache&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;2258&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;2259&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;2260&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;2261&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now that we have multiple ways to look up information about processes we shuold also know how to manage them. &amp;nbsp;everytime that a process is created it receives a priority, or nice value. &amp;nbsp;By default this value is set to 0, with -20 being the highest and +19 being the lowest. &amp;nbsp;Using our commands from above you can use ps -el to view a list of processes and also view their nice value. &amp;nbsp;If you want to create a process or launch a program with a different priority you can use the nice command. &amp;nbsp;If the program is already in execution then you can use the renice command to change it.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$nice --2 firefox&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;#Launch the firefox program with a higher priority&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$renice -5 2208&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;#Change priority of process 2208 from its current value to -5&lt;br /&gt;&lt;br /&gt;The final part to processes is how to kill them. &amp;nbsp;Suppose you have a run away process that is hogging all the system resources or a process that no longer has a parent (called a zombie), you will need some way to stop them. &amp;nbsp;You can use the kill command for a single process ID or use the killall command if you want to use a program name. &amp;nbsp;This will kill the running process allowing you to recreate it or figure out what happened.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$killall apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;#Kill all apache processes&lt;br /&gt;&lt;br /&gt;Clearly process management is important for system stability and helping maintain server uptime as well.&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/5157720536595794113-5869654440036010877?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/5869654440036010877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/03/working-with-linux-processes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5869654440036010877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5869654440036010877'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/03/working-with-linux-processes.html' title='Working with Linux Processes'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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://4.bp.blogspot.com/_WT187SbRvF0/S4--SgnwFLI/AAAAAAAAAA0/F3yCYF8fIkU/s72-c/ps_aux.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-8621665452560785607</id><published>2010-03-04T09:00:00.001-05:00</published><updated>2010-03-04T09:00:44.017-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WSUS 3.0'/><title type='text'>WSUS Troubleshooting</title><content type='html'>A useful set of tools that I ran across when working on a WSUS problem are available on Microsoft's website. &amp;nbsp;They provide utilities for the server and client to troubleshoot each individually and report back results for basic functionality tests. &amp;nbsp;You can check out the site here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://technet.microsoft.com/en-us/wsus/bb466192.aspx"&gt;http://technet.microsoft.com/en-us/wsus/bb466192.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Most of the time it is enough to just run the client tool and it will give you an indication as to where the update is failing. &amp;nbsp;Downloading the utility you can double click to run it. &amp;nbsp;Here is an example output of what the utility produces.&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/_WT187SbRvF0/S4-80dSWwBI/AAAAAAAAAAk/ceoj7Aw92I4/s1600-h/WSUS+Client+Tool.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="416" src="http://1.bp.blogspot.com/_WT187SbRvF0/S4-80dSWwBI/AAAAAAAAAAk/ceoj7Aw92I4/s640/WSUS+Client+Tool.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Here you can see that two areas failed when checking out the client. &amp;nbsp;The last setting is clear that the WSUS isn't even configured on this client. &amp;nbsp;This would mean that instead of policy the client is dependent on the settings under the Automatic Updates tab to direct it for Windows Updates. &amp;nbsp;We can also see here though that the first setting which failed shows that the Automatic Updates options are turned off as well. &amp;nbsp;Browsing through the output though you can see that there are other options that will alert you too different settings either being disabled or not functioning properly. &amp;nbsp;The server utility produces the same type of output only based on server (WSUS) settings instead of the client. &amp;nbsp;I would recommended that anyone dealing with WSUS and updates always use a seperate well labeled policy just for WSUS and updates. &amp;nbsp;This way it is easier to troubleshoot when something goes wrong. &amp;nbsp;You should never make this part of the default domain policy because it just leads to trouble down the road when attempting to diagnose whats wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8621665452560785607?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8621665452560785607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/03/wsus-troubleshooting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8621665452560785607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8621665452560785607'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/03/wsus-troubleshooting.html' title='WSUS Troubleshooting'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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/_WT187SbRvF0/S4-80dSWwBI/AAAAAAAAAAk/ceoj7Aw92I4/s72-c/WSUS+Client+Tool.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5157720536595794113.post-6109613312180719529</id><published>2010-02-23T11:29:00.003-05:00</published><updated>2010-02-23T11:41:32.344-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>The /proc Filesystem</title><content type='html'>Most of the /proc filesystem is read only, however there are some directories and files like /proc/sys which can be edited to modify the kernel. &amp;nbsp;Lets look into each area of the /proc filesystem.&lt;br /&gt;&lt;br /&gt;/proc/apm -&amp;gt; used for checking the battery status and gaining information about a system's battery&lt;br /&gt;&lt;br /&gt;/proc/buddyinfo -&amp;gt; used to diagnose fragmentation issues in memory&lt;br /&gt;&lt;br /&gt;/proc/cmdline -&amp;gt; parameters that were passed to the kernel during boot&lt;br /&gt;&lt;br /&gt;/proc/cpuinfo -&amp;gt; identifies the CPU and information about it on the system&lt;br /&gt;&lt;br /&gt;/proc/crypto -&amp;gt; lists all installed cryptographic ciphers used by the kernel&lt;br /&gt;&lt;br /&gt;/proc/devices -&amp;gt; displays information on various character and block devices&lt;br /&gt;&lt;br /&gt;/proc/dma -&amp;gt; contains a list of registered ISA DMA channels&lt;br /&gt;&lt;br /&gt;/proc/fb -&amp;gt; contains a list of frame buffer devices&lt;br /&gt;&lt;br /&gt;/proc/filesystems -&amp;gt; shows a list of file system types that are currently supported by the kernel&lt;br /&gt;&lt;br /&gt;/proc/interrupts -&amp;gt; lists the number of interrupts per IRQ&lt;br /&gt;&lt;br /&gt;/proc/iomem -&amp;gt; shows a current map of the system's memory for each physical device&lt;br /&gt;&lt;br /&gt;/proc/ioports -&amp;gt; contains a list of currently registered port regions&lt;br /&gt;&lt;br /&gt;/proc/loadvg -&amp;gt; contains load average of the CPU and IO over time, as well as the number of running processes&lt;br /&gt;&lt;br /&gt;/proc/mdstat -&amp;gt; contains information about multi-disk RAID configurations&lt;br /&gt;&lt;br /&gt;/proc/meminfo -&amp;gt; contains information about memory usage on the system&lt;br /&gt;&lt;br /&gt;/proc/modules -&amp;gt; contains the modules currently loaded into the kernel&lt;br /&gt;&lt;br /&gt;/proc/mounts -&amp;gt; contains a list of all mounts in use by the system (similar to /etc/mtab)&lt;br /&gt;&lt;br /&gt;/proc/partitions -&amp;gt; contains partition block allocation information&lt;br /&gt;&lt;br /&gt;/proc/pci -&amp;gt; lists all pci devices on the system, use /sbin/lspci -vb for a more readable version&lt;br /&gt;&lt;br /&gt;/proc/slabinfo -&amp;gt; detailed information about system memory&lt;br /&gt;&lt;br /&gt;/proc/stat -&amp;gt; information about the system since last reboot&lt;br /&gt;&lt;br /&gt;/proc/swaps -&amp;gt; shows swap space and utilization&lt;br /&gt;&lt;br /&gt;/proc/uptime -&amp;gt; shows amount of time system has been up (uptime command is better)&lt;br /&gt;&lt;br /&gt;/proc/version -&amp;gt; shows kernel version information as well as gcc&lt;br /&gt;&lt;br /&gt;These are just some of the files contained in the /proc directory which provide information useful for troubleshooting and maintanence. &amp;nbsp;There are also a number of directories listed in the /proc directory which are numbered. &amp;nbsp;These numbers represent the process ID (PID) of different programs and stores the information of them within these directories.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ ls -l | grep apache&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;dr-xr-xr-x&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;5 apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;0 Feb 23 09:54 4427&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;dr-xr-xr-x&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;5 apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;0 Feb 23 09:54 4324&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;dr-xr-xr-x&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;5 apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;0 Feb 23 09:54 4387&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;dr-xr-xr-x&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;5 apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;0 Feb 23 09:54 4426&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;dr-xr-xr-x&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;5 apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;apache&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;0 Feb 23 09:54 4427&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can see from the example that these directories are owned by the apache process and the folders are numbered after the processes running them. &amp;nbsp;This makes it easier for troubleshooting to hunt down information about particular processes. &amp;nbsp;There are a few other directories worth noting in the /proc filesystem as well.&lt;br /&gt;&lt;br /&gt;/proc/bus -&amp;gt; this directory contains information relating to the various buses available on the system&lt;br /&gt;/proc/driver -&amp;gt; contains information relating to drivers in use by the kernel&lt;br /&gt;/proc/fs -&amp;gt; this directory shows which file systems are exported if an NFS server is running&lt;br /&gt;/proc/ide -&amp;gt; this directory contains information about each IDE device, each channel has a directory&lt;br /&gt;/proc/irq -&amp;gt; each IRQ has its own directory which contains configuration for each IRQ&lt;br /&gt;/proc/net -&amp;gt; provides details about system networking including parameters and statistics&lt;br /&gt;/proc/scsi -&amp;gt; same as /proc/ide but for SCSI drives&lt;br /&gt;/proc/sys -&amp;gt; this directory is unique in that it allows you to tune the kernel and its features&lt;br /&gt;/proc/sys/dev -&amp;gt; contains parameters for particular devices&lt;br /&gt;/proc/sys/fs -&amp;gt; contains information relating to filesystem parameters and features&lt;br /&gt;&lt;br /&gt;The one particular directory to note here is the /proc/sys directory. &amp;nbsp;This directory contains files that can be used to tune the kernel in its running state. &amp;nbsp;You can use the echo command to insert changes into the different files and change the paremeter of the kernel, however note that a reboot to the system will restore any changes made with the echo command. &amp;nbsp;An easy way to see which files can be modifed is to use the ls -l command and look for the 'w' write access to the particular file. &amp;nbsp;There is another command sysctl which can be used in place of directing echo output to files. &amp;nbsp;The sysctl command will also change parameters in the kernel. &amp;nbsp;In order for the changes to be&amp;nbsp;permanent&amp;nbsp;you must edit them in the /etc/sysctl.conf file which is executed during system boot. &amp;nbsp;This would be used more after testing is done with the echo command to tune the kernel the way you want. &amp;nbsp;You shouldn't try to memorize all the locations and files in the /proc directory. &amp;nbsp;An administrator should have an understanding of where the files are and an idea of what they do in order to troubleshoot or tune their system. &amp;nbsp;There are also other utilities including lspci, top, free, apm, lsusb, and other which can produce the same output of many of the /proc files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6109613312180719529?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6109613312180719529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/proc-filesystem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6109613312180719529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6109613312180719529'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/proc-filesystem.html' title='The /proc Filesystem'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-482894639592265702</id><published>2010-02-22T23:06:00.002-05:00</published><updated>2010-02-22T23:06:57.881-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>CentOS SSH Server</title><content type='html'>We all know that at some point or another we will need to be able to administer our servers remotely, and we wouldn't want to do this without some sort of security in place...right? &amp;nbsp;SSH can protect the traffic that passes from your computer to a remote computer making the tunnel secure for administration. &amp;nbsp;It is a fairly easy thing to setup and useful in many different ways. &amp;nbsp;On CentOS the SSH server comes install by default which we can verify with:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;rpm -qa | grep sshd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To get started we will need to configure the settings for the SSH server. &amp;nbsp;The configuration is located at /etc/ssh/ssh_config and before doing anything you should make a backup copy of the original file incase something happens to the configuration file later on. &amp;nbsp;After you make a back of the configuration file there are only a few options you should change before using the server. &amp;nbsp;First you should change the configuration file to not allow the root user to log in, for obvious reasons this is a bad idea. &amp;nbsp;Next, unless you really want to use X11 forward (where you can run X programs remotely) you should disable this. &amp;nbsp;Finally if you wish you can restrict access by user or by user from a particular host, gaining access to the system. &amp;nbsp;By default the SSH server runs on port 22, however if you'd like to increase the security of the server you can change the port that the SSH server wil listen on for connections.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ nano /etc/sshd.conf&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;# Disable Root Login&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;PermitRootLogin no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;# Disable X11 Forwarding&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;X11Forwarding no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;# Only allow user John to login&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;AllowUsers john&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once your settings are configured you just need to restart (or start) the service for the changes to take effect. &amp;nbsp;Personallu I think that SSH is one of the most useful tools in Linux making it easy to jump from server to server and remotely administer everything securly and efficiently. &amp;nbsp;Once the SSH server is fully setup you can test it by connecting from the remote machine.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;# The general syntax is ssh user@host&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ ssh jsmith@192.168.1.50&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will be prompted for a password for the user. &amp;nbsp;Once you login you are good to go. &amp;nbsp;SSH keys will be logged in ~/.ssh/config for remote connections. &amp;nbsp;Should you connect to a remote server where the keys don't match what you have on file the SSH client will warn you that the SSH server is possibly being spoofed and you should check that the connection or server hasn't changed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-482894639592265702?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/482894639592265702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/centos-ssh-server_22.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/482894639592265702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/482894639592265702'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/centos-ssh-server_22.html' title='CentOS SSH Server'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-2219989805332772254</id><published>2010-02-22T22:18:00.000-05:00</published><updated>2010-02-22T22:18:41.541-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>CentOS DHCP Server Setup</title><content type='html'>One of the basics elements found on all networks in a DHCP server, making it an important part of any network. &amp;nbsp;DHCP makes network administration easy because you can make changes to a single point (the DHCP server) on your network and let it filter down to the rest of the network. &amp;nbsp;To begin setting up a DHCP server we are going to first need to configure our machine with a static ip address. &amp;nbsp;As the root user you will need to open the following file, /etc/sysconfig/network-scripts/ifcfg-eth0 (assuming you want the eth0 interface to distribute ip addresses to the network). &amp;nbsp;Configure the following:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;TYPE=Ethernet&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;DEVICE=eth0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;BOOTPROTO=&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;IPADDR=192.168.1.50&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;NETMASK=255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;USERCTL=yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;IPV6INIT=no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;PEERDNS=yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ONBOOT=yes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once finished you will need to restart the networking service: service networking restart&lt;br /&gt;&lt;br /&gt;Now that you have static ip address setup you will need to install the dhcpd package which contains the DHCP server software. &amp;nbsp;After this package is installed there are two important files which we will need to work with. &amp;nbsp;The first is /etc/dhcpd.conf which is the configuration file for the DHCP server. &amp;nbsp;This file may not exist in which case you will need to create it. &amp;nbsp;You can find a sample to work off of (recommended) at /usr/share/doc/dhcp-&lt;version&gt;/dhcp.conf.sample. &amp;nbsp;Copy this over to the main configuration file and then edit the main configuration file to your specifications. &amp;nbsp;This is the easiest and fastest way to setup the DHCP. &amp;nbsp;The second file to take note of is /var/lib/dhcpd/dhcpd.leases which stores all the client leases for the DHCP server.&lt;/version&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ yum install dhcp.i386&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ cp /usr/share/doc/dhcp-3.0.5/dhcp.conf.sample /etc/dhcpd.conf&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ nano /etc/dhcpd.conf&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;# Sample DHCP Config File&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ddns-update-style interim;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;authoritative;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;subnet 192.168.1.0 netmask 255.255.255.0 {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;nbsp;    &lt;/span&gt;# Parameters for the local subnet&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&amp;nbsp;    &lt;/span&gt;option routers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;192.168.1.254;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; option subnet-mask &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;255.255.255.0;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; option domain-name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  "testbed.edu";&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; option domain-name-servers &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;      192.168.1.50;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; default-lease-time&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;21600;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; max-lease-time&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;       4&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;3200;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; range dynamic-bootp 192.168.1.100 192.168.1.200;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;$ service dhcpd restart&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As we can see above looking through the configuration file, there is only one subnet for this network. &amp;nbsp;The gateway has been defined by the "option routers" paramters, the DNS information by the "option domain-name" parameters, and the leases for the client by the "range" parameter. &amp;nbsp;Restarting the DHCP service will allow the configuration file to be loaded into the server and it will begin to lease ip addresses to clients. &amp;nbsp;One other configuration parameter that you should know if how to setup reserved ip addresses.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;# In the configuration file&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;host client01 {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;option host-name “client01.example.com”;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;hardware ethernet 02:B4:7C:43:DD:FF;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;fixed-address 192.168.1.109;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;This basically reserves this ip address for the client01 host with the specified MAC address. &amp;nbsp;This can be usefu for printers or particular addresses that you wish to reserve. &amp;nbsp;You can now watch as clients should begin leasing their ip addresses from the server as they connect to the network. &amp;nbsp;Some other ideas you might want to consider implementing with a DHCP server is a failover server, relay servers, and backing up the configuration file and/or the lease database. &amp;nbsp;As a tip, instead of editing the dhcpd.conf file and then restarting the server to make changes you can use the omshell command which will allow you to connect to, query, and change the configuration while the server is running.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-2219989805332772254?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2219989805332772254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/centos-dhcp-server-setup.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2219989805332772254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2219989805332772254'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/centos-dhcp-server-setup.html' title='CentOS DHCP Server Setup'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7268722422925260497</id><published>2010-02-22T17:03:00.000-05:00</published><updated>2010-02-22T17:03:02.754-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>The Boot Process</title><content type='html'>When a computer boots the BIOS is the first program that is run. &amp;nbsp;Once loaded the BIOS will begin to test the system through the power on self test (POST), and then begin loading peripherials. &amp;nbsp;The BIOS will then look to whatever is contained in the first sector of this device. &amp;nbsp;This usually contains the master boot record (MBR) which will start to boot the machine via the boot loader. &amp;nbsp;Once the boot loader has been loaded, the BIOS yields control to it. &amp;nbsp;The default boot loader for most systems these days is GRUB. &amp;nbsp;From here GRUB will look to boot into the kernel that is labeled as the "default". &amp;nbsp;Finally the Kernel will call the init process which boots up the rest of the system. &amp;nbsp;Understanding how the system boots is essential to troubleshooting should the system ever have a problem booting, or if you are working with a kernel. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;GRUB&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;GRUB has become the default boot loader for Red Hat &amp;amp; Debian as well. &amp;nbsp;GRUB can be used to boot into different operating systems (usually called a multiboot system), for system recovery, and to boot the kernel using special parameters. &amp;nbsp;When GRUB loads you are given a list of kernels from which you can choose to boot from. &amp;nbsp;There is also a list of commands which you can select from.&lt;br /&gt;&lt;br /&gt;e -&amp;gt; edit the commands before booting&lt;br /&gt;a -&amp;gt; modify the kernel arguments before booting&lt;br /&gt;c -&amp;gt; grub command line&lt;br /&gt;&lt;br /&gt;Although working with GRUB can save you time to diagnose system boot issues make sure that you record all changes to /boot/grub/grub.conf otherwise your changes will be lost on next boot. &amp;nbsp;On Red Hat the /etc/grub.conf is actually a link to /boot/grub/grub.conf so all changes will be made to the same file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;The Kernel&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After GRUB has loaded the kernel takes over and begins to initialize and configure the computer's hardware. &amp;nbsp;depending on how your GRUB configuration file is setup you may or may not see anything during this process. &amp;nbsp;The "quiet" parameter in GRUB hides this process from the user (usually a gaphic of some sort is shown in its place). &amp;nbsp;All the information gathered during this processes is logged to /var/log/dmesg. &amp;nbsp;You can also use the dmesg tool to query information about bootup messages. &amp;nbsp;Once the systems drivers are in place the kernel will execute the /sbin/init program.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;The init Program&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The init program is the first process that is created by the kernel. &amp;nbsp;It is responsible for the rest of the boot process and setting up the environment for the user. &amp;nbsp;First it will call /etc/rd.d/rc.sysinit which is responsible for a number of tasks including setting the system clock, networking, user environment, and others. &amp;nbsp;After is it finished, the init command then runs the /etc/inittab script. &amp;nbsp;This script defines how all services should be handle in each runlevel as well as which run level to boot the system into. &amp;nbsp;In Red Hat and CentOs the default runlevel is 5 while Debian is 2. &amp;nbsp;The last thing you will see is the screen to login, which will either be a virtual terminal (if no X window is configured) or a GUI login.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Runlevels&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The runlevel system helps organize services which create a standard for controlling system services. &amp;nbsp;There are six runlevels which can be found in /etc/inittab.&lt;br /&gt;&lt;br /&gt;0 - Halt&lt;br /&gt;1 - Singe-user mode&lt;br /&gt;2 - Multi-user with partial services&lt;br /&gt;3 - Full multi-user with networking (text mode)&lt;br /&gt;4 - Not used&lt;br /&gt;5 - Full multi-user graphical mode (provides a GUI desktop login)&lt;br /&gt;6 - Reboot&lt;br /&gt;&lt;br /&gt;Located in the /etc/rc.d/ directory there are different directories containing which services should be started or stoped at each runlevel. &amp;nbsp;There are three utilities that are provided to manage services during system boot. &amp;nbsp;The first is the chkconfig command.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;chkconfig --list [service-name]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you specify no service it will list all services and their status at each run level. &amp;nbsp;You can narrow this down and look at a particular service by specifing the service name. &amp;nbsp;You will see that each service is either "on" or "off" at each runlevel respresenting a started or not started state. &amp;nbsp;This utility can also be used to enable or disable services at each runlevel.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;chkconfig --level &lt;level&gt; &lt;name&gt; &lt;on|off&gt;&lt;/on|off&gt;&lt;/name&gt;&lt;/level&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The second utility is ntsysv. &amp;nbsp;Instead of modifying each indivual service at the command line you can use this command to modify multiple services at multiple runlevels at once.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ntsysv [--level &lt;level(s)&gt;]&lt;/level(s)&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For example if I wanted to modify all services at runlevels 3 &amp;amp; 4 I would type:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ntsysv --level 34&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This utility produces a list of all services which can be checked or unchecked to either start or stop that at the runlevels that you specified. &amp;nbsp;That last utility that you can use is system-config-services. &amp;nbsp;This utility is a GUI program that can't be launch from a system that without a GUI. &amp;nbsp;Similar to ntsysv it provides a listing of services which can be easily modified to each runlevel. &amp;nbsp;You should now be pretty comfortable with the boot process and have an idea of how you can go about troubleshooting should your system not boot correctly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7268722422925260497?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7268722422925260497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/boot-process_22.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7268722422925260497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7268722422925260497'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/boot-process_22.html' title='The Boot Process'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-6214515151807490015</id><published>2010-02-17T22:35:00.002-05:00</published><updated>2010-02-18T13:33:46.974-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCNA:Security'/><category scheme='http://www.blogger.com/atom/ns#' term='CCNA'/><title type='text'>Cisco Standard Access Lists</title><content type='html'>&lt;div class="MsoNormal"&gt;One thing that can help filter traffic on your network is access control lists (ACL).&amp;nbsp; Cisco uses these in a variety of ways to filter traffic, restrict access, and block certain protocols on a network.&amp;nbsp; We are going to look specifically at standard ACLs.&amp;nbsp; There are others that Cisco has, but we will save those for another day.&amp;nbsp; There are two different types of standard access lists that you can have; named and numbered.&amp;nbsp; First let us look at the syntax of a numbered standard ACL:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;access-list &amp;lt;#&amp;gt; {permit | deny}&amp;nbsp;[wildcard mask] [log]&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;There are a few different things going on here.&amp;nbsp; First we have the access-list command and a number that we will use to identify this access list.&amp;nbsp; For standard access lists you must choose a number between 1-99 and 1300-1999.&amp;nbsp; Next we can choose if we want to permit or deny the traffic, followed by the source ip address that we want to permit or deny traffic to/from.&amp;nbsp; The next field may be a little different to those that haven't worked with access lists before, the wild card field is used much like a subnet mask to determine which traffic should be allowed or denied.&amp;nbsp; To figure out what the wildcard mask should be you can use a little trick.&amp;nbsp; Determine what you want the subnet to be and just take the inverse of each octet to equal 255.&amp;nbsp; The easiest way to understand is with an example.&amp;nbsp; Suppose you want to block all traffic coming from a particular subnet, say 192.168.5.0/24.&amp;nbsp; We know looking at this that there are 255 addresses that we want to block.&amp;nbsp; Let's calculate what the wildcard mask should be and then apply it to the full command to use in order to block all traffic coming from this network.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;192.168.5.0/24&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Subnet Mask: /24 or 255.255.255.0&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;- Inverse for wildcard mask -&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Wildcard Mask: 0.0.0.255&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;ACL is: &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;access-list 5 deny 192.168.5.0 0.0.0.255&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Another example would be:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;192.168.3.0/22&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Subnet Mask: /22 or 255.255.252.0&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;- Inverse for wildcard mask -&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Wildcard Mask: 0.0.3.255&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;ACL is: &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;access-list 5 deny 192.168.5.0 0.0.3.255&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;You can see that the original subnet mask has a 255. in the first two octets which makes the first two octets of the wildcard mask 0.&amp;nbsp; The third octet is 252 and the inverse needs to be what would bring it to 255, which is where we get the 3 from.&amp;nbsp; The final octet is a 0 in the subnet mask so the inverse would be 255.&amp;nbsp; Another point you should notice about wildcard masks is that a 0 means to match specifically, while a 255 means "any".&amp;nbsp; So the above wildcard mask can be read as specifically deny all ip address that are 192.168.1.0 - 192.168.1.255.&amp;nbsp; If you omit a wildcard mask in the ACL all together it will default to 0.0.0.0 meaning a specific host.&amp;nbsp; Next we will jump back and look at the syntax of a named standard ACL:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ip access-list standard &lt;name&gt;&lt;/name&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;{permit | deny} {source [wildcard] | any} [log]&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;As you can see this is slightly different from the "numbered" approach.&amp;nbsp; Again lets take the example of want to block all traffic coming from 192.168.5.0/24.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;192.168.5.0/24&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Subnet Mask: /24 or 255.255.255.0&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;- Inverse for wildcard mask -&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Wildcard Mask: 0.0.0.255&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;ACL is:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ip access-list standard deny5&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;deny 192.168.5.0 0.0.0.255&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Although this syntax is slightly different the concept of the command is similar.&amp;nbsp; Once you have built your ACL and included all the statements needed the last thing that you will need to do is apply your ACL to a particular interface.&amp;nbsp; The rule for applying access lists to interfaces is, ACLs which filter based on source (standard ACLs) should be placed closest to the destination.&amp;nbsp; You will have to examine your particular topology to determine where that will be.&amp;nbsp; To apply the ACL to an interface once you have decided where it will go is done with:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;interface fastethernet 0/1&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ip access-group &amp;lt;# or name&amp;gt; {in | out}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Based on the numbered ACL above:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ip access-group 5 in&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Based on the named ACL above:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;ip access-group deny5 in&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;This is just an introduction to access lists.&amp;nbsp; There are other types and they can become complex as they start to grow in size.&amp;nbsp; Standard access lists also have some limitations, which include only being able to filter traffic based on the source port and only being able to inspect layer 3 traffic.&amp;nbsp; They are however much easier to setup and normally used to restrict access to things like the vty and aux ports.&amp;nbsp; In another post we will look at extended access lists, which offer us more flexibility at slightly more complexity.&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/5157720536595794113-6214515151807490015?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6214515151807490015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/cisco-standard-access-lists.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6214515151807490015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6214515151807490015'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/cisco-standard-access-lists.html' title='Cisco Standard Access Lists'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-2832782985367105829</id><published>2010-02-15T15:37:00.000-05:00</published><updated>2010-02-15T15:37:39.043-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Hat'/><category scheme='http://www.blogger.com/atom/ns#' term='RHCE'/><title type='text'>Working With RPM</title><content type='html'>&lt;!--StartFragment--&gt;  &lt;br /&gt;&lt;div class="MsoNormal"&gt;Red hat uses the rpm command to manage packages for the system.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;This tool is broken down into five major categories:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Install&lt;/li&gt;&lt;li&gt;Uninstall&lt;/li&gt;&lt;li&gt;Upgrading&lt;/li&gt;&lt;li&gt;Querying&lt;/li&gt;&lt;li&gt;Verifying&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;By breaking RPM down into these subsections it makes using the package manager much easier.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;If you’d like detailed information about the rpm utility you can check the man pages.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;First we can look at how rpm packages are structured and then an example of using each of the five categories. &lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Sample Package:&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;foo-1.0-1.i386.rpm&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Package Name: foo&lt;/div&gt;&lt;div class="MsoNormal"&gt;Package Version: 1.0&lt;/div&gt;&lt;div class="MsoNormal"&gt;Package Release: 1&lt;/div&gt;&lt;div class="MsoNormal"&gt;Package Architecture: i386&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;As you can see there is a lot of information that can be derived just from looking at the package.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;Now lets see an example of the five categories.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Install&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Syntax: rpm -i [install-options] &lt;package&gt;&lt;/package&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;ie. rpm -i foo-1.0-1.i386.rpm&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Uninstalling&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Syntax: rpm -e &lt;package&gt;&lt;/package&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;ie. rpm -e foo-1.0-1.i386.rpm&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Upgrading&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Syntax: rpm -U &lt;package&gt;&lt;/package&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;ie. rpm -U foo-1.0-1.i386.rpm&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Querying&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Syntax: rpm -q &lt;package&gt;&lt;/package&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;ie. rpm -q foo-1.0-1.i386.rpm&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Verifying&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Syntax: rpm -V &lt;package&gt;&lt;/package&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;ie. rpm -V foo-1.0-1.i386.rpm&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;As you can see the rpm utility is pretty easy to use.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;Lets also just quickly look at three useful examples that you might use.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Verify all packages on your system: &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;rpm -Va&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Find the package that owns a specific file: &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;rpm -qf &lt;file&gt;&lt;/file&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Find a programs documentation: &lt;span class="Apple-style-span" style="color: #ffe599;"&gt;rpm -qdf &lt;file&gt;&lt;/file&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;There are tons of different ways to use rpm and I suggest a read of the man pages to familarize yourself with some of the different commands.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;In another post we will look at another utility called yum which offers an interactive, rpm based, package manager.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;!--EndFragment--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-2832782985367105829?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2832782985367105829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/working-with-rpm.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2832782985367105829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2832782985367105829'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/working-with-rpm.html' title='Working With RPM'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-1303088457359016143</id><published>2010-02-15T11:23:00.003-05:00</published><updated>2010-02-15T11:23:54.339-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCIE:Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Protocols'/><title type='text'>FTP</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Ports Used&lt;/span&gt;&lt;/b&gt;: TCP 20, 21&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Function&lt;/span&gt;&lt;/b&gt;: Allows users to transfer files from one host to another. &amp;nbsp;It has a mechanism for user authentication via username and password combination. &amp;nbsp;There are two modes which FTP can function in; PORT mode (sometimes called active mode) and PASV mode (somtimes called passive mode). &lt;br /&gt;&lt;br /&gt;Active mode is less secure because the FTP server initiates the data channel. &amp;nbsp;Also, port 20 must be open to the outside world which is inherently less secure than just using port 21. &amp;nbsp;The source port on the client is random generated above 1023.&lt;br /&gt;&lt;br /&gt;Passive mode is initiated from the client to the server in both the control and data channel. &amp;nbsp;The source port on the server is negotiated with the client above 1023. &amp;nbsp;There is less of a chance for data compromise when using passive mode.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-1303088457359016143?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/1303088457359016143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/ftp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1303088457359016143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1303088457359016143'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/ftp.html' title='FTP'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-1238337939883041371</id><published>2010-02-15T11:22:00.003-05:00</published><updated>2010-02-15T11:22:54.725-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCIE:Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Protocols'/><title type='text'>TFTP</title><content type='html'>&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;b&gt;Ports Used&lt;/b&gt;&lt;/span&gt;: UDP 69&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Function&lt;/span&gt;&lt;/b&gt;: Allows transfer of files from one device to another using a connectionless protocol. &amp;nbsp;There is no method to authenticate users. &amp;nbsp;TFTP uses directory security on the TFTP server itself by predefining file security prior to client use.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;b&gt;Configuration Examples&lt;/b&gt;&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;To Copy an IOS Image from a TFTP Server&lt;br /&gt;copy tftp flash&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;To Backup an IOS Image to a TFTP Server&lt;br /&gt;copy flash tftp&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-1238337939883041371?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/1238337939883041371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/tftp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1238337939883041371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/1238337939883041371'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/tftp.html' title='TFTP'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-6296528153028369984</id><published>2010-02-15T11:17:00.004-05:00</published><updated>2010-02-15T11:20:30.219-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCIE:Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Protocols'/><title type='text'>DNS</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Ports Used&lt;/span&gt;&lt;/b&gt;: TCP/UDP 53&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Function&lt;/span&gt;&lt;/b&gt;: DNS is used for domain lookups, and zone transfers. &amp;nbsp;When doing domain lookups and browsing the UDP protocol is used. &amp;nbsp;When performing zone transfers the TCP protocol is used.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Configuration Examples&lt;/span&gt;&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Disable Domain Lookups&lt;br /&gt;no ip domain lookup&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;Local IP Host Mapping&lt;br /&gt;ip host &lt;hostname&gt; &lt;ip&gt;&lt;/ip&gt;&lt;/hostname&gt;&lt;br /&gt;ie. ip host Router1 192.168.1.1&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;Set the Domain Name&lt;br /&gt;ip domain-name &lt;domain&gt;&lt;/domain&gt;&lt;br /&gt;ie. ip domain-name example.com&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;Set the DNS Server&lt;br /&gt;ip name-server &lt;ip&gt;&lt;/ip&gt;&lt;br /&gt;ie. ip name-server 192.168.1.10&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6296528153028369984?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6296528153028369984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/02/dns.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6296528153028369984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6296528153028369984'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/02/dns.html' title='DNS'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4251558692143795620</id><published>2010-01-30T08:43:00.008-05:00</published><updated>2010-12-14T10:51:34.230-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='10k Challenge'/><title type='text'>10,000 Page Challenge (2010)</title><content type='html'>One of the forums that I am a member of does a challenge every year to see if you can read 10,000 pages. &amp;nbsp;It doesn't matter what books or topics. &amp;nbsp;Since I read&amp;nbsp;a lot&amp;nbsp;throughout the year on a wide variety of topics I figured it would be easier to share here and others can see what I have read.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #ffe599;"&gt;Books Read This Year&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;MCSE: 70-293 Exam Cram&amp;nbsp;&amp;nbsp;(504 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;MCSE: 70-293 Study Guide, Sybex Edition&amp;nbsp;&amp;nbsp;(888 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;RHCE Red Hat Certified Engineer Linux Study Guide&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;(848 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;LPI Linux Certification in a Nutshell (In a Nutshell (O'Reilly))&amp;nbsp;&amp;nbsp;(922 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;CCSP Securing Cisco IOS Network Study Guide &amp;nbsp;(544 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Red Hat Certified Technician &amp;amp; Engineer (746 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Hacking Red Hat Enterprise Linux (180 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Web Security Testing Cookbook, 1st Ed (300 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;LPIC-1 in Depth (499 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;The Girl with the Dragon Tattoo (568 pages)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Red Hat Enterprise Linux 6 Documentation (834 pages)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Total Pages: &lt;b&gt;6833&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4251558692143795620?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4251558692143795620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/01/10000-page-challenge.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4251558692143795620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4251558692143795620'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/01/10000-page-challenge.html' title='10,000 Page Challenge (2010)'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-179943487165630059</id><published>2010-01-26T14:53:00.003-05:00</published><updated>2010-01-26T15:03:14.521-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Layer 2 Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Cisco Switch Hardening</title><content type='html'>Some quick little tips that should be used when hardening Cisco switches.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;First and foremost should always be to change the default passwords and set a strong password on all interfaces that someone can login on. &amp;nbsp;There are many interfaces and passwords can easily be forgotten so you may want to also device a simple&amp;nbsp;algorithm&amp;nbsp;to remember or to easily regenerate the password in your head.&lt;/li&gt;&lt;li&gt;If you are going to be monitoring switches in your environment (which is always a good idea) you will probably be using SNMP. &amp;nbsp;Make sure that you use SNMPv3 as it is the most secure. &amp;nbsp;If you aren't using v3 make sure to use a long community string because sooner or later someone will compromise it (even if only gaining read access it is still a compromise).&lt;/li&gt;&lt;li&gt;Setup some type of logging. &amp;nbsp;Even if you have tons of switches and want to be that insane person that logs everything locally...local logging is better then no logging.&lt;/li&gt;&lt;li&gt;Documentation! &amp;nbsp;Enough said.&lt;/li&gt;&lt;li&gt;Not everyone wants to sit there banging out commands on the cli, so for those of you using the web interface of the switch make sure to enable SSL. &amp;nbsp;For those that do prefer the command line make sure to disable the web interface.&lt;/li&gt;&lt;li&gt;For remote access, which everyone will want, make sure to use SSHv2 and disable telnet. &amp;nbsp;Nothing is worse then logging into a switch to check something "suspicious" only to have your credentials snagged over the wire.&lt;/li&gt;&lt;li&gt;Separate&amp;nbsp;your network traffic. &amp;nbsp;Setup a management VLAN to use for all switches (and other network devices). &amp;nbsp;Use VLANs and maybe some ACLs to lock down and segment traffic on your network. &amp;nbsp;You will be thankful later as it will contain virus outbreaks and makes troubleshooting that much easier.&lt;/li&gt;&lt;/ul&gt;This is not a finite list but a good start to steps to take when hardening Cisco switches. &amp;nbsp;If you Google it, the NSA has an entire guide (very large document) on hardening Cisco switches as well that you may want to flip through for more ideas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-179943487165630059?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/179943487165630059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/01/cisco-switch-hardening.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/179943487165630059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/179943487165630059'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/01/cisco-switch-hardening.html' title='Cisco Switch Hardening'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-2026374130818183142</id><published>2010-01-26T07:42:00.000-05:00</published><updated>2010-01-26T07:42:47.218-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows 2008'/><title type='text'>Working With Error Logs</title><content type='html'>One thing that I have learned when working with Microsoft products is that no matter how convoluted the error message given to you is, the answer is always right there in front of you. &amp;nbsp;Recently while working on our primary domain controller I noticed a single error in the logs that was constantly happening every 3-4 minutes. &amp;nbsp;As you can image this will fill the logs up with messages rather quickly if left alone for a few days. &amp;nbsp;I looked at the event and saw the following information:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Application Log&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Source: SceCli&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Event ID: 1202&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Level: Warning&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;User: N/A&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;OpCode: [Blank]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Right off the bat this information is useless. &amp;nbsp;I can google for the source type and event id and try to figure out what is going on. &amp;nbsp;Instead Windows 2008 has some new layouts in the logs which make troubleshooting these kinds of things much easier! &amp;nbsp;Scrolling further through the information available I come across the following information:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Security policies were propagated with warning. 0x534: No mapping between account names and security IDs was done.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now based off this we are getting somewhere. &amp;nbsp;Here I can tell that there is an issue with a user account being mapped to a SID. &amp;nbsp;Since information "usually" don't get corrupt in an AD environment without some sort of other related issue, it lead me to believe that either the account was missing or had been from the path the policy was looking for. &amp;nbsp;Now I don't know about you but I have hundreds of users and we don't really track which ones are added, deleted, disabled, etc. &amp;nbsp;So now the question becomes how do I find the missing or damaged user? &amp;nbsp;Well it turns out that Windows 2008 new log features can help us out again. &amp;nbsp;As I continue to keep reading through the same log Windows has some recommendations on how I might be able to solve this issue (instead of the usual, "go to this Microsoft article which is usually irrelevant to the issue at hand"). &amp;nbsp;The first suggestion on the list is that I look through security logs to find out which user the system "Cannot find". &amp;nbsp;Windows 2008 even goes a step further to provide you with a command to use:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;FIND /I "Cannot find" %SYSTEMROOT%\Security\Logs\winlogon.log&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sure enough I run this command and it spits out:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Cannot find TsInternetUser.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well now we are getting somewhere! &amp;nbsp;I quickly do a search through our Active Directory and sure enough that user is no where to be found. &amp;nbsp;A quick google check (now that I know exactly what I'm looking for)&amp;nbsp;reveilles that this account is for Windows 2000 servers and Terminal Server use, and that it should actually be disabled on newer server. &amp;nbsp;Just to verify I also pull up my group policies and quickly comb through a few select policies and notice that sure enough, some of them are trying to apply settings to that specific user for a legacy Windows 2000 terminal server that we have! &amp;nbsp;I recreate the account in the built-in users folder, assign a strong password, then disable the account. &amp;nbsp;Five minutes later I refresh the logs and what do you know:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Event ID: 1704&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;"Security policy in the Group policy objects has been applied successfully."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Problem solved. &amp;nbsp;I think that in Windows 2008 the reporting in the logs and the ability to create custom filters is a big improvement. &amp;nbsp;As you can see by this post it makes troubleshooting easier and System Admins can spend less time hunting down event IDs on google and more time managing their systems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-2026374130818183142?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2026374130818183142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/01/working-with-error-logs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2026374130818183142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2026374130818183142'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/01/working-with-error-logs.html' title='Working With Error Logs'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-2004790064911852257</id><published>2010-01-21T08:25:00.000-05:00</published><updated>2010-01-21T08:25:33.882-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Printers'/><title type='text'>Windows Printer Tidbits</title><content type='html'>Some tricks that I have learn when troubleshooting / dealing with Windows printers and print servers. &amp;nbsp;There is a screen where you can delete the print drivers on the client computers (which isn't well documented in any Microsoft book). &amp;nbsp;When you open printers and faxes where you can see all the current printers, go to File --&amp;gt; Server Properties. &amp;nbsp;Here you will see a listing of all the currently installed print drivers which you can remove and clear out old or non-functioning print drivers. &amp;nbsp;Sometimes when trying to delete them you will get an error that they are in use, you can either kill all print related tasks through the task manager or (what I find easier) just reboot the computer and it will release hold of the driver for deletion.&lt;br /&gt;&lt;br /&gt;Another quick tip is one which I recently discovered. &amp;nbsp;On our client machines they have multiple connections to different printers on the print server. &amp;nbsp;Once of the connections became "stuck" and would not allow us to delete the connection. &amp;nbsp;We would get errors saying "Access Denied", "The printer is in use", etc... &amp;nbsp;To fix this you can actually remove the printer connection right out of the registry. &amp;nbsp;Open the registry (regedit) and go to HKEY_Current_User\Printers\Connections. &amp;nbsp;Under this key just look for the connection that you are trying to remove and delete that key. &amp;nbsp;You can now re-establish the connection to the same printer or reconnect to a new one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-2004790064911852257?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2004790064911852257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/01/windows-printer-tidbits.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2004790064911852257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2004790064911852257'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/01/windows-printer-tidbits.html' title='Windows Printer Tidbits'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-6764990845891087076</id><published>2010-01-20T13:37:00.002-05:00</published><updated>2010-01-20T13:38:45.314-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='LAMP'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Apache &amp; PHP Security</title><content type='html'>Working on setting up some new LAMP stacks there are a few things that I do to harden the servers. &amp;nbsp;Although none of these are huge security improvements they can help overall with the security of the systems. &amp;nbsp;First we will look at apache. &amp;nbsp;While most of the settings in apache are pretty secure there are a few tweaks which we can make to secure it a little further. &amp;nbsp;You will need root&amp;nbsp;privileges&amp;nbsp;to make these changes as you will need to edit the main config file for apache. &amp;nbsp;In Ubuntu the file is locate in /etc/apache2/apache2.conf. &amp;nbsp;Add the following lines to the configuration file at the bottom:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Prevent apache from giving away information about itself&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;ServerTokens ProductOnly&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;ServerSignature Off&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Disable the TRACE function&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;TraceEnable Off&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first two prevent the server from giving out its version and other information in the header of any web request. &amp;nbsp;This can be used to enumerate what version (major and minor) you are running and help attackers narrow down on specific attacks against you. &amp;nbsp;There are other options for "ServerTokens" which can be found in apache's documentation however the "ProductOnly" is the most secure. &amp;nbsp;The second option doesn't really make your system more secure but all vulnerability scanners complain when TRACE is left on. &amp;nbsp;It is basically for debugging purposes against the server, but again why give out any more information then it totally necessary to an attacker.&lt;br /&gt;&lt;br /&gt;Next we look at PHP which only requires a single change. &amp;nbsp;When you disable apache from sending out information about itself, requesting php web pages still reveals information about the version of php that you are using. &amp;nbsp;Again you should protect yourself from handing out information to attackers. &amp;nbsp;For this you will once more need to be root, and you should look for /etc/php5/apache2/php5.ini. &amp;nbsp;This file is pretty big so make sure you know how to search using vi or nano. &amp;nbsp;Search for the following variable: "expose_php", and once found make the following modification.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;# Disable information disclosure&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;expose_php = Off&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will now prevent php from giving out any information when php pages are queried. &amp;nbsp;Once you make these changes to apache and php you will need to reload/restart the apache web service in order for them to take effect. &amp;nbsp;Lets take a look at the output from the server based on the changes that we made.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Before:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;HEAD http://10.0.0.206/helpdesk/index.php&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;200 OK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Connection: close&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Date: Wed, 20 Jan 2010 18:32:53 GMT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;Server: Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.4 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Vary: Accept-Encoding&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Content-Type: text/html&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Client-Date: Wed, 20 Jan 2010 18:32:53 GMT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Client-Peer: 10.0.0.206:80&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Client-Response-Num: 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;X-Pad: avoid browser bug&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;X-Powered-By: PHP/5.2.6-3ubuntu4.4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;After:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;HEAD http://10.0.0.206/helpdesk/index.php&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;200 OK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Connection: close&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Date: Wed, 20 Jan 2010 18:31:05 GMT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;Server: Apache&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Vary: Accept-Encoding&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Content-Type: text/html&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Client-Date: Wed, 20 Jan 2010 18:31:05 GMT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Client-Peer: 10.0.0.206:80&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Client-Response-Num: 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;(PHP line is completely removed)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hopefully this gives you some security tips on apache and php hardening for your server. &amp;nbsp;This also protects against information disclosure which is always a good way to stop attackers from getting information about your system.&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/5157720536595794113-6764990845891087076?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6764990845891087076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/01/apache-php-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6764990845891087076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6764990845891087076'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/01/apache-php-security.html' title='Apache &amp; PHP Security'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4289798864440865303</id><published>2010-01-20T10:00:00.000-05:00</published><updated>2010-01-20T10:00:10.914-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Ubuntu Kernels</title><content type='html'>Today we are looking at the kernel in Ubuntu and the different types&lt;br /&gt;that are included with each version of Ubuntu. &amp;nbsp;Currently I am using the&lt;br /&gt;server version although most of you will be using the desktop version. &amp;nbsp;To locate the current version of the kernel that you are running open a shell and type:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;uname -a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For me I get:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;Linux DOCSRV 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009 i686 GNU/Linux&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From here you can determine a few things. &amp;nbsp;First we have the hostname of the server that I'm on, DOCSRV. &amp;nbsp;Second we can see the current kernel version which is 2.6.28-11-server. &amp;nbsp;This shows that I am running the server version of the kernel (more on that later). &amp;nbsp;The SMP signifies that multiprocessor support is enabled and the i686 is the architecture of the machine. &amp;nbsp;This is all the information you really need. &amp;nbsp;On a desktop version of ubuntu you would see the word "generic" instead of "server". &amp;nbsp;Whats the difference? &amp;nbsp;The generic kernel includes more support for hardware (particularly video and wireless), how it sacrifices some performance benefits because it needs to be able to run across all different types of hardware.&lt;br /&gt;&lt;br /&gt;Another difference in the two kernels is the I/O scheduler that is used. &amp;nbsp;For the desktop the kernel is set to use CFQ scheduling and for the server it uses deadline scheduling. &amp;nbsp;The difference here is that deadline scheduling optomizes disk "read" for better performance, while the desktop kernel optomizes for read/writes which allows for multiple applications to be running at one time seem to flow smoother (having music playing, surfing the web, word processing, etc...).&lt;br /&gt;&lt;br /&gt;One last difference I want to point out is a memory limit on the two different kernels. &amp;nbsp;For the generic kernel which is used on desktops there is a 4GB memory limit on 32bit machines. &amp;nbsp;This is actually more like 3 - 3.5 in reality. &amp;nbsp;In order to get around this we can use a PAE (Physical Address Extension) enabled kernel. &amp;nbsp;This will allow you to break the 4GB barrier on the 32bit machines. &amp;nbsp;The other alternative is to use the 64bit version of the operating system. &amp;nbsp;To get the PAE kernel installed we can run the following commands:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;sudo apt-get install linux-image-generic-pae&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This should pull down and install the correct PAE enabled kernel for your machine. &amp;nbsp;After the install is complete you need to reboot and select the newly installed kernel. &amp;nbsp;You should now be able to verify that you machine recognizes more then 4GB of memory using the "free -m" command.&lt;br /&gt;&lt;br /&gt;There are other differences between the kernels and you can even compile a custom kernel if you wanted to however there just isn't enough room to discuss all the options or steps here. &amp;nbsp;As just a quick bulletlist I will point out a few other differences:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Preemption is disabled on the server kernel&lt;/li&gt;&lt;li&gt;The server kenel includes support for PAE&lt;/li&gt;&lt;li&gt;Virtualization is better supported on the server kernel&lt;/li&gt;&lt;li&gt;The timer interrupt is set to 100 Hz in the server kenerl and 250 Hz in the dekstop kernel&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;In the end the kernel that comes with the installed version of the operating system will do for 90% of people using it. &amp;nbsp;Those that want to tweak their operating system or have a better understanding can try different kernels to understand the differences. &amp;nbsp;Just be aware that working with kernels can leave your system in an unstable or unusable state, so have a backup plan or know what you are doing in advance!&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/5157720536595794113-4289798864440865303?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4289798864440865303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/01/ubuntu-kernels.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4289798864440865303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4289798864440865303'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/01/ubuntu-kernels.html' title='Ubuntu Kernels'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-924357885207425427</id><published>2010-01-09T12:31:00.002-05:00</published><updated>2010-01-09T12:31:35.147-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>User Management on Ubuntu</title><content type='html'>&lt;div style="color: white;"&gt;Creating users is on of those everyday things that we all have to deal with.&amp;nbsp; In Windows Active Directory there is a nice little wizard that walks you through the creation of a user and some of their basic settings.&amp;nbsp; While this may be useful it doesn't always allow for customization or flexibility.&amp;nbsp; If you have used Ubuntu desktop (or Ubuntu server with a GUI installed) you will notice a similar setup which walks you through user creation.&amp;nbsp; However we all know that every environment is different and at some point everyone wants to customize the user creation process.&amp;nbsp; In Linux the advantage that you have is being able to create and manage users from the command line.&amp;nbsp; This allows for scripting and complete flexibility.&amp;nbsp; I mostly work with Ubuntu/Debian servers so we will look at the user creation process on there.&lt;br /&gt;&lt;br /&gt;The first thing to note is that there are two commands that will add a user to the system, useradd and adduser.&amp;nbsp; What's the difference?&amp;nbsp; Well on Ubuntu adduser is actually a perl script which utilizes useradd to create users.&amp;nbsp; If you would really like a deeper understanding of user creation I suggest spending some time reading the adduser script (its in perl).&amp;nbsp; Although a little lengthy it is full of information of how users are created, and the checks that go into making a user.&amp;nbsp; It is important to understand that during user creation each user is given a UID and a GID.&amp;nbsp; This allows the system to uniquely identify users and groups.&amp;nbsp; For Ubuntu the first UID is 1000 and the last is 29999, GID is also the same.&amp;nbsp; These are the range allocated for "user" accounts and groups.&amp;nbsp; There is another range of UIDs and GIDs (100 - 999) which are allocated for "system" accounts and groups.&amp;nbsp; While logged into your Ubuntu system you can use the "id" command to get information on your UID/GID as well as groups that you are also a member of.&lt;br /&gt;&lt;br /&gt;While some system admins spend time developing their own scripts using the useradd command this will take some work to get it down right.&amp;nbsp; Again this is also a good way to build a better understanding of users and groups though.&amp;nbsp; The adduser script on the other had takes a lot of the work out of making users by automating many tasks through the command line with only a little information needed.&amp;nbsp; I would suggest make a few users with the adduser script and then trying to recreate the same users using your own scripts.&amp;nbsp; There are two other commands which can help in user creation as well, usermod and groupmod which both edit properties of users and groups.&lt;br /&gt;&lt;br /&gt;User management is an important part of system administration and having a good standard and handle of how users are managed and created on your system makes the administration of them much easier.&amp;nbsp; When I get some time I will post some of the user creation scripts that I use for my own systems.&lt;br /&gt;&lt;/div&gt;&lt;div style="color: white;"&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/5157720536595794113-924357885207425427?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/924357885207425427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2010/01/user-management-on-ubuntu_09.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/924357885207425427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/924357885207425427'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2010/01/user-management-on-ubuntu_09.html' title='User Management on Ubuntu'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8149433929035914405</id><published>2009-11-21T20:59:00.000-05:00</published><updated>2009-11-21T20:59:24.904-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Ubuntu &amp; The Nobody User</title><content type='html'>There are certain programs that run on linux which require a nobody user in order to work.&amp;nbsp; It's also a good idea to have a nobody account if you want to assign files to someone that no long needs access on the system and you don't want to delete their files just yet.&amp;nbsp; With Ubuntu their default for the nobody user is to assign them a shell.&amp;nbsp; This is a bad idea as it leaves a user account open to brute force attack.&amp;nbsp; This may also be the case on other distros as well however I have only been using Ubuntu as of late.&amp;nbsp; A quick for this is to just change the login shell of the nobody user.&amp;nbsp; We can do this by editing /etc/shells and adding the following line to the end:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;/dev/null&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Save the file and run the following command to change the shell of the nobody user.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;sudo chsh -s /dev/null nobody&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;While this doesn't bring a huge overhaul to system security it does help prevent attacks against the nobody account.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8149433929035914405?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8149433929035914405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/11/ubuntu-nobody-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8149433929035914405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8149433929035914405'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/11/ubuntu-nobody-user.html' title='Ubuntu &amp; The Nobody User'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4129325812426275545</id><published>2009-11-18T21:53:00.000-05:00</published><updated>2009-11-18T21:53:21.419-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Auditing'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>MySQL Security</title><content type='html'>Yesterday I talked about SSH security in relation to a security audit that I was conducting of our internal network.&amp;nbsp; I also know that we have database systems on our network (MySQL) and I needed a way to also check for either default credentials that were left when the system was setup or a way to bruteforce weak passwords.&amp;nbsp; Well a little time with python and I managed to write a script that will do everything I needed.&amp;nbsp; The script requires the MySQLdb package in python (which throws a warning that it is deprecate, but it still works fine).&amp;nbsp; You might also want to put together some word lists for username/password combination's if you plan to use the brute forcing feature.&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: #ffe599;"&gt;import MySQLdb&lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;user_list = []&lt;br /&gt;pass_list = []&lt;br /&gt;&lt;br /&gt;def mysql_connect(u, p, ip):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&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; print "[+] Attempting Connection..."&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; db = MySQLdb.connect(user = u, passwd = p, host = ip, connect_timeout = 5)&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; print "[+] Connection Successful!\n"&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; print "[+] ----------------------------------------"&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; print "[+] Username: ", u, "&amp;nbsp; Password: ", p&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; print "[+] IP: ", ip&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; print "[+] Server Info: ", db.get_server_info()&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; print "[+] ----------------------------------------"&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; db.close()&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; print "[-] Connection Closed\n"&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; exit(0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except Exception:&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; print "Access denied\n"&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; print u, " | ", p&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; print ip&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; pass&lt;br /&gt;&lt;br /&gt;# Begin main program&lt;br /&gt;print ""&lt;br /&gt;print "+--------------------+"&lt;br /&gt;print "| MySQL Scanner v1.0 |"&lt;br /&gt;print "| Written by Damian&amp;nbsp; |"&lt;br /&gt;print "+--------------------+"&lt;br /&gt;&lt;br /&gt;if(len(sys.argv) == 2):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "[+] Setting up default credentials list\n"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_list = ["admin", "administrator", "root"]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass_list = ["password", "admin", "", "locked"]&lt;br /&gt;elif(len(sys.argv) == 4):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "[+] Building word list\n"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f = open(sys.argv[2], 'r')&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for line in f.readlines():&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_list.append(line)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.close&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "[+] Building password list\n"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f = open(sys.argv[3], 'r')&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for line in f.readlines():&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; pass_list.append(line)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.close()&lt;br /&gt;&lt;br /&gt;else:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "\nUsage:"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "\tsql_scanner.py [host]"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "\tsql_scanner.py [host] [word_list] [password_list]\n"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0)&lt;br /&gt;&lt;br /&gt;ip_address = str(sys.argv[1])&lt;br /&gt;&lt;br /&gt;for x in user_list:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for y in pass_list:&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; mysql_connect(x, y, ip_address)&lt;br /&gt;&lt;br /&gt;print "Scan Complete\n"&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp; &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4129325812426275545?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4129325812426275545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/11/mysql-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4129325812426275545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4129325812426275545'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/11/mysql-security.html' title='MySQL Security'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8339520675017889855</id><published>2009-11-17T15:43:00.000-05:00</published><updated>2009-11-17T15:43:17.203-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='SSH'/><title type='text'>SSH Security</title><content type='html'>While working on an internal security audit I was looking for everything that I can relating to SSH.&amp;nbsp; SSH is used on all our non-windows servers for remote management and therefore we needed to make sure that everything is secure and updated frequently.&amp;nbsp; The best way I find to go about auditing things is to always have a plan in place first.&amp;nbsp; First thing on the list was to perform a visual inspection of the config files to make sure that things were configured correctly.&amp;nbsp; I was looking for the following during visual inspection:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A copy of the original config file accessible by only the root user&lt;/li&gt;&lt;li&gt;The listen address was configured correctly&lt;/li&gt;&lt;li&gt;The protocol was set to 2 (version 1 has many vulnerabilities)&lt;/li&gt;&lt;li&gt;The port which the SSH server is listening on (for extra security make it non-standard)&lt;/li&gt;&lt;li&gt;For security reasons, also ensure that X11 forwarding is off unless absolutly necessary&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;After these things have been confirmed and documented, I moved on to password cracking to ensure that all users are using strong passwords.&amp;nbsp; For this I used brutessh which you can grab [http://www.edge-security.com/edge-soft.php].&amp;nbsp; This program is written in python and is very quick and efficient.&amp;nbsp; For input you will need a username and a password list for the program to use.&amp;nbsp; I ran this against all our severs with SSH providing the list of our users:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ffe599;"&gt;python brutessh.py -h 192.168.1.10 -u [username] -d [wordlist.txt]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After a few runs it returned only one user that was using a dictionary password.&amp;nbsp; If it does find a password for a user it will return green text along with the password that worked.&amp;nbsp; I was also careful to take note of the log messages that it was producing given that it was attempting to brute force user accounts.&amp;nbsp; For here again I documented my finds and also promptly emailed the user to change his password (or I would "kindly" do it for him).&amp;nbsp; There are other programs out there that will brute force different network services.&amp;nbsp; I found brutessh to be lite and efficent however, as well as Hyrda.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;There are also programs out there (fail2ban) that will monitor your logs and watch for password brute forcing, banning any address that exceed the threshold.&amp;nbsp; Hopefully this will give you a process for auditing the security of SSH servers.&amp;nbsp; In another post we will look at other services and programs like fail2ban.&amp;nbsp; If you are also looking for additional security you can download and run ssh-vulnkey to check for blacklisted keys on the SSH server itself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8339520675017889855?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8339520675017889855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/11/ssh-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8339520675017889855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8339520675017889855'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/11/ssh-security.html' title='SSH Security'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4208589815757308748</id><published>2009-11-16T22:18:00.000-05:00</published><updated>2009-11-16T22:18:52.078-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Better Package Searching</title><content type='html'>Many people in the tech industry today have tried Linux at one point or another.&amp;nbsp; Recently Ubuntu has been on the rise and is gaining popularity for its ease of use.&amp;nbsp; They also make frequent updates, is pretty secure right out of the box, and is fairly straight forward to use.&amp;nbsp; Personally it is the distribution that I use for my servers.&amp;nbsp; One of the things that I find myself doing frequently is installing software or packages.&amp;nbsp; For those of you that are familiar with the command line of Linux may be able to do this with no trouble.&amp;nbsp; If you have never used the command line for this before, Ubuntu uses the APT package manager to find and install software/packages.&amp;nbsp; The commands might look something like this:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;apt-get install -y [package name]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The -y forces a "yes" answer to any confirmation that is normally prompted to the user.&amp;nbsp; Also note that you probably need to run this command as a super user (using sudo).&amp;nbsp; You can also find packages that you are looking for in a similar manner:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;apt-cache search [package name]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;For those of you that are used to working with the command line you may be saying "ok I know this...whats the point here".&amp;nbsp; While it may be easy to find packages that are looking for and install them, not everyone knows how to query already installed packages on the system.&amp;nbsp; With Ubuntu this is done using the alternative package manager dpkg.&amp;nbsp; Using some command line fu we can search to see if something is already installed on the system (instead of wasting time re-installing it).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;dpkg --get-selections&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Now before you run off and plug this into the command line you may want to understand that this will return ALL packages installed on your system.&amp;nbsp; You should probably filter your results further using the "grep" command.&amp;nbsp; For example I was recently working with python and SSH and needed to know if the python-crypto package was installed.&amp;nbsp; The command for that might look like this:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;dpkg --get-selections | grep python-crypto&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;If the package was installed it will return something like:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;&lt;pre&gt;python-crypto&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; install&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Suppose that I just wanted to see all packages that are installed relating to python however.&amp;nbsp; You might run something like&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;dpkg --get-selections | grep python&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This will return all packages that are related to python and installed on your system.&amp;nbsp; As a last little tid bit of help with package management we will look at one other option.&amp;nbsp; Going back to the python-crypto package that I was working with, suppose that I wanted to know what files are in this package.&amp;nbsp; You can run the following to find the location of all files within a package:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;dpkg -L python-crypto&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;There are many other things that you can do with the apt package manager that are not included here, such as upgrade or updating the system, removing packages, or even purging them from the system.&amp;nbsp; For a quick "cheat sheet" google for fosswire Ubuntu cheat sheet.&amp;nbsp; It provides a quick list of the most common commands used on Ubuntu and the apt package manager is a big part of that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4208589815757308748?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4208589815757308748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/11/better-package-searching.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4208589815757308748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4208589815757308748'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/11/better-package-searching.html' title='Better Package Searching'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7710864675831106322</id><published>2009-11-07T23:20:00.002-05:00</published><updated>2009-11-11T16:13:33.669-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Personal Password Security</title><content type='html'>In the last post I talked about password security and how some companies and even users don't bother to take password security very seriously.&amp;nbsp; One that that is simple enough to do is develop a strategy which will allow you to use your own personal alogrithm to generate secure passwords.&amp;nbsp; Not only will this help with password security for your personal use, but if you are an IT admin and are constantly resetting passwords it will help keep your users safe.&amp;nbsp; By developing a personal algorithm for passwords it also allows you to re-create the password for a site (or user) if need be without remembering the user or site's password.&amp;nbsp; This may sounds a little confusing at first but lets take a closer look to get a better understanding.&lt;br /&gt;&lt;br /&gt;A password algorithm would require the following in order to work:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A secret code (this would be a simple easy to remember word)&lt;/li&gt;&lt;li&gt;A secret digit (a random number chosen by you, larger isn't always better)&lt;/li&gt;&lt;li&gt;Either a website name or domain name (for IT admins)&lt;/li&gt;&lt;/ol&gt;An algorithm like this will then only require you to remember the secret word &amp;amp; code because if you ever forget your generated password you can regenerate it!!&amp;nbsp; In order to see this in action I've developed a simple python script which implements this algorithm.&amp;nbsp; Remember this is just one implementation of something that can be done hundreds of different ways.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;import string&lt;br /&gt;import re&lt;br /&gt;&lt;br /&gt;# Get the site &amp;amp; secret code that the user wants to use&lt;br /&gt;print " "&lt;br /&gt;print "Password Gen v1.0"&lt;br /&gt;print " "&lt;br /&gt;url = raw_input("Enter url or domain name: ")&lt;br /&gt;digits = int(raw_input("Enter a secret digit(s): "))&lt;br /&gt;code = raw_input("Enter a secret password: ")&lt;br /&gt;&lt;br /&gt;# Strip out the generics from the site so the password isn't guessable&lt;br /&gt;x = re.compile("^[^:]*://")&lt;br /&gt;url = x.sub("", url)&lt;br /&gt;&lt;br /&gt;y = string.find(url, 'www.')&lt;br /&gt;&lt;br /&gt;if (y == 0):&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;url = url[4:]&lt;br /&gt;&lt;br /&gt;# Store url as individual chars and calculate length&lt;br /&gt;url_stack = []&lt;br /&gt;&lt;br /&gt;for c in url:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;url_stack.append(c)&lt;br /&gt;&lt;br /&gt;if (url.endswith('.com') or url.endswith('.net') or url.endswith('.org')):&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;url_len = len(url_stack) - 5&lt;br /&gt;else:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;url_len = len(url_stack) - 1&lt;br /&gt;&lt;br /&gt;# Store code as individual characters&lt;br /&gt;code_stack = []&lt;br /&gt;&lt;br /&gt;for c in code:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;code_stack.append(c)&lt;br /&gt;&lt;br /&gt;code_len = len(code_stack) - 1&lt;br /&gt;&lt;br /&gt;# Start building the password&lt;br /&gt;p_word&amp;nbsp; = code_stack[0]&lt;br /&gt;p_word += str(ord(url_stack[0]) + digits)&lt;br /&gt;p_word += '!'&lt;br /&gt;p_word += code_stack[code_len - 1]&lt;br /&gt;p_word += str(ord(url_stack[url_len].upper()) + digits)&lt;br /&gt;p_word += code_stack[code_len].upper()&lt;br /&gt;&lt;br /&gt;print "Your password is: " + p_word&lt;br /&gt;print ""&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now that we have the script lets run a quick test and see how it works.&amp;nbsp; I'm going to use the following credentials:&lt;br /&gt;&lt;br /&gt;Secret Code: yellow&lt;br /&gt;Secret Digit: 4&lt;br /&gt;Website: www.citibank.com&lt;br /&gt;&lt;br /&gt;Running these options through the script yields a password of: y103!o79W&lt;br /&gt;Supposing that you don't want to take my word for the secure aspects of this generated password (for those of your paranoid trust no one types), you can visit the following site which checks the strength of passwords:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.passwordmeter.com/"&gt;http://www.passwordmeter.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you can verify on this site this password is rated as "Very Strong" with a score of 100!&amp;nbsp; While not all passwords will score exactly 100, all should retain a rating of "Very Strong".&amp;nbsp; This script when also run will strip out "http://", "www", ".com", ".net", and ".org" from any site entered as these are common on all sites and therefore make the password generation less secure.&amp;nbsp; Hope you enjoy the script and even if you modify it or don't use it all remember that password security is a serious matter and should not be taken lightly inside or outside the work place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7710864675831106322?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7710864675831106322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/11/personal-password-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7710864675831106322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7710864675831106322'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/11/personal-password-security.html' title='Personal Password Security'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7791367513646338414</id><published>2009-11-04T22:15:00.000-05:00</published><updated>2009-11-04T22:15:00.633-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Policies'/><title type='text'>Bad Password Policies</title><content type='html'>Today I wanted to look at a company that had no regard for security.&amp;nbsp; They started as a small business and rapidly grew over the last few years, however they still run their systems off of a old infrastructure that wasn't designed to scale, with no security in mind, and now runs in complete disarray.&amp;nbsp; One thing that I wanted to point out off the bat is their use of default passwords.&amp;nbsp; This company had a policy in place to use a single default password, except that they used this password for everything from client desktops, to servers, to hosted services.&amp;nbsp; This just shows that password policies are important and time should be spent on developing a policy that will efficiently handle passwords, account lockout, and password complexity.&amp;nbsp; Although having a default password policy is good for new users, or temp accounts, these accounts should be monitored and audited to ensure that the passwords are changed and that temp account are set to expire.&lt;br /&gt;&lt;br /&gt;You can also find a good article on SANS site about things that you can do to improve security as a whole in a company, and what not to do to "&lt;a href="http://isc.sans.org/diary.html?storyid=5644"&gt;suck at information security&lt;/a&gt;".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7791367513646338414?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7791367513646338414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/11/bad-password-policies.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7791367513646338414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7791367513646338414'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/11/bad-password-policies.html' title='Bad Password Policies'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-324237099024786532</id><published>2009-10-27T22:49:00.001-04:00</published><updated>2009-10-27T22:49:46.521-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Bash'/><title type='text'>Cron Jobs and Scripting</title><content type='html'>Today I needed a quick solution to monitor the free space on my Ubuntu server. &amp;nbsp;I didn't want to setup monitoring software just to find out a quick statistic about the server's disk space so I figured I could write a script to check it for me. &amp;nbsp;This would also give me a chance to practice setting up tasks via the command line with cron. &amp;nbsp;My requirements for this were just to check the amount of free space on the single hard drive on the server. &amp;nbsp;The output would also contain the time &amp;amp; date so I could get an idea of when the drive was last checked.&lt;br /&gt;&lt;br /&gt;First a script to get the information that I need from the server. &amp;nbsp;We can use the "df" command which will show information about the file system. &amp;nbsp;This along with some parsing commands will give us the results that we need. &amp;nbsp;The script goes something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;date &amp;gt;&amp;gt; driveSpace.log&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;fspace=`df -h | grep sda | awk '{ print $5 }'`&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;echo "There is "$fspace" disk space left." &amp;gt;&amp;gt; ~/driveSpace.log&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This little script creates a log file in my home directory (called driveSpace.log) which will get a "date" stamp and a single line telling me how much disk space is left on the drive. &amp;nbsp;I saved this as diskSpace.sh and also left it located in my home directory. &amp;nbsp;Next we will need to setup the cron command that will allow this script to run once a day to check the disk space. &amp;nbsp;In order to run the cron process as a non-root user you will need to have your account listed in the /etc/cron.allow file. &amp;nbsp;Now I'm working on an Ubuntu server and by default there is no cron.allow file you need to create it. &amp;nbsp;If you don't the cron job will never execute. &amp;nbsp;My test user is called Jake so I will add him to the cron.allow file. &amp;nbsp;Use the sudo command to create the necessary file:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;sudo echo Jake &amp;gt;&amp;gt; /etc/cron.allow&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will create the file and also put Jake in the file so that he now has rights to run his own cron jobs. &amp;nbsp;Next we can go ahead an create a crontab file for Jake. &amp;nbsp;Enter the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;crontab -e&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will create a new crontab file (if one doesn't exist already) and then bring you into that crontab file for the user. &amp;nbsp;You'll see on the top commented out the syntax that we need to use in order to create cron jobs. &amp;nbsp;For our script we are going to use the following syntax:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;01 04 * * * /home/Jake/diskSpace.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This syntax says that I want to run this script at 4:01AM every day of the week and output to the logfile specified in the script. &amp;nbsp;This way I can monitor the log file to check how full my system disk is. &amp;nbsp;You can get more fancy with a script like this as well making checks to see if the disk is at a certain threashold, or to email you when it breaks a certain threashold. &amp;nbsp;This is just a basic example of how powerful scripting can be along side creating tasks to automate the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-324237099024786532?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/324237099024786532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/10/cron-jobs-and-scripting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/324237099024786532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/324237099024786532'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/10/cron-jobs-and-scripting.html' title='Cron Jobs and Scripting'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7855527957310338051</id><published>2009-10-19T23:00:00.001-04:00</published><updated>2009-10-19T23:00:33.007-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VPN'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Site-to-Site VPN Overview</title><content type='html'>Today we are just going to briefly look at what goes into creating a site-to-site VPN. &amp;nbsp;The first part is referred to as IKE Phase 1. &amp;nbsp;This is something that we will document because when creating site-to-site VPNs it is important to remember that each side must be configured the same. &amp;nbsp;There are 4 things that you should document for IKE Phase 1:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: #f9cb9c;"&gt;Encryption&amp;nbsp;Algorithm&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: #f9cb9c;"&gt;Hashing&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: #f9cb9c;"&gt;Authentication&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: #f9cb9c;"&gt;Key Exchange&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Out of this list we are also going to be using the encryption algorithm and authentication in IKE Phase 2. &amp;nbsp;Once we have everything documented you will need to begin setting up the connection. &amp;nbsp;First enable ISAKMP on each router:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1# crypto isakmp enable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next we need to put the isakmp policy in place. &amp;nbsp;We can do this by configuring the settings that we have previously chosen, and documented.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1# crypto isakmp policy 10&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1(isakmp)# encryption aes 128&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1(isakmp)# authentication pre-shared&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1(isakmp)# group 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1(isakmp)# hash sha&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Third we are going to configure the isakmp identity which is how the clients know what the hostname is.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1# crypto isakmp identity&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;address/hostname&gt;&lt;/address/hostname&gt;Finally for Phase 1 we will set the pre-shared keys:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1# crypto isakmp key &lt;key&gt;&amp;nbsp;&lt;/key&gt;&lt;/span&gt;&lt;key&gt;&lt;span style="color: #f9cb9c;"&gt;address &lt;remote_ip&gt;&lt;/remote_ip&gt;&lt;/span&gt;&amp;nbsp;&lt;remote_ip&gt;&amp;nbsp;&lt;/remote_ip&gt;&lt;/key&gt;&lt;br /&gt;&lt;br /&gt;This completes IKE Phase 1 although we will need to configure the exact same thing on both routers at each end so that they can form the initial VPN tunnel. &amp;nbsp;With IKE Phase 1 setup complete we can move over to IKE Phase 2. &amp;nbsp;First for Phase 2 we are going to create the transform sets:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1# crypto ipsec transform-set TEST1 esp-aes 128 esp-sha-hmac&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Optionally we can also apply a lifetime to our IPSec tunnel:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1# crypto ipsec &lt;second&gt; &lt;value&gt;&lt;/value&gt;&lt;/second&gt;&lt;/span&gt;&lt;seconds&gt;&lt;value&gt;&lt;/value&gt;&lt;/seconds&gt;&lt;br /&gt;&lt;br /&gt;For the third step in Phase 2 we create a set of ACLs. &amp;nbsp;These are used to define what traffic is interesting and should trigger the passing over the VPN tunnel. &amp;nbsp;Although we will not go into ACLs here it is important to note that they should be clearly define as to what traffic should be allowed. &amp;nbsp;Finally we will apply the crypto-map.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1# crypto map MAP 100 ipsec-isakmp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1(crypto-map)# match address &lt;/span&gt;&lt;span style="color: #f9cb9c;"&gt;&lt;acl&gt;&lt;/acl&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1(crypto-map)# set peer &lt;/span&gt;&lt;span style="color: #f9cb9c;"&gt;&lt;remote_ip&gt;&lt;/remote_ip&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1(crypto-map)# set pfs &lt;/span&gt;&lt;span style="color: #f9cb9c;"&gt;&lt;group 1="" 2="" 5=""&gt;&lt;/group&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;Router1(crypto-map)# set transform-set &lt;/span&gt;&lt;set&gt;&lt;/set&gt;&lt;br /&gt;&lt;br /&gt;This complete the creation of the Site-to-Site VPN. &amp;nbsp;We can use a few different commands to verify that the output and connection are functioning properly. &amp;nbsp;These commands include:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;show crypto isakmp policy&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;show crypto ipsec sa&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;show crypto map&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;show crypto ipsec transform-set&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This setup gives a general quick overview of what goes into configuring two Cisco routers for Site-to-Site VPN connections. &amp;nbsp;There are other options that can be configured or&amp;nbsp;manipulated&amp;nbsp;for more fine tuned control and configuration. &amp;nbsp;Also this can be setup via the Cisco SDM for those that are more comfortable with a GUI.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7855527957310338051?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7855527957310338051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/10/site-to-site-vpn-overview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7855527957310338051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7855527957310338051'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/10/site-to-site-vpn-overview.html' title='Site-to-Site VPN Overview'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4347954114924669957</id><published>2009-09-03T20:22:00.000-04:00</published><updated>2009-09-03T20:22:19.355-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CCNA:Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Creating and Configuring Privilege Levels</title><content type='html'>When using a Cisco device's IOS you are required to login to it.&amp;nbsp; With a basic login you are put into privilege level 0 which is also called user mode.&amp;nbsp; This mode really has no permissions to do anything useful within the device except maybe some basic troubleshooting.&amp;nbsp; To configure the device you would need to enter privilege level 15 or exec mode.&amp;nbsp; What about if you want to fine tune the IOS to allow different permissions at different levels?&amp;nbsp; Cisco has come up with something called "Views" which is a role based login which allows users of the particular "view" to perform certain functions.&amp;nbsp; This would be helpful if you have something that is just learning to work with the Cisco IOS and you want to restrict certain commands.&amp;nbsp; It is also useful for delegating certain permissions to particular devices.&amp;nbsp; Creating a view isn't difficult at also so lets look at an example.&lt;br /&gt;&lt;br /&gt;First you will need to enable AAA which stands for Authentication, Authorization, and Accounting.&amp;nbsp; Without going too much into AAA right now just know that it needs to be enabled for views to work.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;R1# config t&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;R1(config)# aaa new-model&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;R1(config)# end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That will enable AAA and is really all you need to get it running at the moment.&amp;nbsp; Next we will need to enable the "root view" which is essentially what the Administrator has available to him/her at privilege level 15.&amp;nbsp; You may need to input your exec mode password to enable it.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;R1# enable view&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;Password:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here we will finally get down to creating a new view.&amp;nbsp; In this example we are going to create a view for a Jr. Network Engineer so that he/she can use some of the commands on the router we are working with, without destroying anything important.&amp;nbsp; New views are created using the "parser" command in the IOS.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;R1# config t&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;R1(config)# parser view JRADMIN&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;R1(config-view)# secret 0 S3cRetP@ssworD&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will create the view named "JRADMIN" and give the view the password shown above.&amp;nbsp; The Jr. Admin can use these to login later on to gain access to the router that we are working on.&amp;nbsp; Next we will need to add specific commands or a group of commands at a time which enables the Jr. Admin to actually do things.&amp;nbsp; The syntax that we will use for this is as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;commands parser_mode {include | include-exclusive | exclude} [all] [interface interface_identifier | command]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We are going to need to give the Jr. Admin the ability to ping other devices on the network (to troubleshoot connectivity issues), as well as access to all the "show" commands so that he/she can view information about the device they are logged into.&amp;nbsp; You can fine tune which "show" commands are allowed to be used, but for this example we are going to allow access to all show commands.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;R1(config-view)# commands exec include all show&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;R1(config-view)# commands exec include ping&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;(Ctrl + Z)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's really all there is too it.&amp;nbsp; The view should now be ready to go and the Jr. Admin should have access to all the functions that we require of him/her.&amp;nbsp; We can do some verification of the parser view to make sure that it is going to function the way that we want before giving access to our users.&amp;nbsp; Let's login into the new view and test it out.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #f9cb9c;"&gt;R1# enable view JRADMIN&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;Password:&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;R1# show parser view&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;Current view is 'JRADMIN'&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;R1# ?&lt;/span&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;br style="color: #f9cb9c;" /&gt;&lt;span style="color: #f9cb9c;"&gt;&lt;output truncated=""&gt;&lt;/output&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see this is a very useful feature on the IOS for delegating tasks and for helping people learn (who may not have a lot of Cisco experience).&amp;nbsp; The SDM also provides some pre-configured views for working with IDS and firewalls.&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4347954114924669957?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4347954114924669957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/09/creating-and-configuring-privilege.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4347954114924669957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4347954114924669957'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/09/creating-and-configuring-privilege.html' title='Creating and Configuring Privilege Levels'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4658466451153224731</id><published>2009-09-03T19:41:00.003-04:00</published><updated>2009-09-03T20:22:48.101-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Cisco Password(s) Setup</title><content type='html'>Today we are looking at simple password configuration and protection on Cisco switches (this can also apply to routers as well).&amp;nbsp; Diving right in we are going to configure a password for all the different methods that users have to access the switch.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #ffe599;"&gt;&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1# config t&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config)# enable secret Hidd3nP@ssWord&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config)# line con 0&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config-line)# password Anoth3rSecret&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config-line)# login&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config-line)# exit&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config)# line aux 0&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config-line)# password @uxp@a$$word&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config-line)# login&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config-line)# exit&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config)# line vty 0 4&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config-line)# login&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;S1(config-line)# password MyP@ssword&lt;/div&gt;&lt;div style="color: #f9cb9c;"&gt;(Ctrl + Z)&lt;/div&gt;&lt;br /&gt;Starting from the top here we are doing a couple of things.&amp;nbsp; The first line enters us into configuration mode, followed by setting a password to protect exec mode on the switch.&amp;nbsp; Next we configured a password for the console port of the switch which is the most common physical means of access.&amp;nbsp; Next we setup a password for the auxiliary port of the switch which while rarely used is good to configure in practice of locking down security.&amp;nbsp; Finally we set a password on the vty (virtual logins) which users come in on via telnet.&amp;nbsp; Now that all of our interfaces have passwords setup our switch wil lbe more secure from unauthorized access.&amp;nbsp; The last thing that we should look at however is the command "show running-config".&amp;nbsp; After running this you will see a list similar to the configuration we did above except it will reveal all the passwords!!&amp;nbsp; We don't want this to occur so that people can't see our passwords.&amp;nbsp; By default on Cisco products using the "password" command in the IOS will store the passwords in clear text within the configuration files.&amp;nbsp; This is not secure by any means and would be better if we can MD5 encrypt those passwords.&amp;nbsp; Fortunately Cisco has one last command that we can use:&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #f9cb9c;"&gt;service password-encryption&lt;/div&gt;&lt;br /&gt;This command will now take all the passwords in the configuration file and encrypt them.&amp;nbsp; This will make the switch more secure and prevent people that have physical access the ability to read your passwords.&amp;nbsp; You can also re-run the "show running-config" command if you'd like to verify that the passwords are now all encrypted with MD5 hashing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4658466451153224731?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4658466451153224731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/09/cisco-passwords-setup.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4658466451153224731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4658466451153224731'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/09/cisco-passwords-setup.html' title='Cisco Password(s) Setup'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-2032437078250092582</id><published>2009-08-30T22:47:00.009-04:00</published><updated>2009-08-30T23:05:59.232-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ISCW'/><category scheme='http://www.blogger.com/atom/ns#' term='CCNA:Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Cisco Router Hardening</title><content type='html'>When it comes to the security of Cisco routers, lets face it, their default options don't have security in mind.  This is because there has to be a certain balance between ease of us vs security and nine times out of ten usability will always win.  We will take a look at some defaults that Cisco routers come with which can be configured to provide for a more secure environment.  First lets look at some services and their default states:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;u&gt;Unnecessary Services&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;BOOTP Server                  Enabled&lt;br /&gt;Cisco Discovery Protocol      Enabled&lt;br /&gt;PAD Service                   Enabled&lt;br /&gt;TCP &amp;amp; UDP Minor Services      Enabled (11.3 or lower)&lt;br /&gt;MOP Service                   Enabled&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Common Management Services&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;SNMP                          Enabled&lt;br /&gt;HTTP Config &amp;amp; Monitor         Device Dependent&lt;br /&gt;Domain Name Services (DNS)    Enabled&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Path Integrity&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;ICMP Redirects                Enabled&lt;br /&gt;IP Source Routing             Enabled&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Probes and Scans&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Finger Service                Enabled&lt;br /&gt;ICMP Notification             Enabled&lt;br /&gt;IP Directed Broadcasts        Enabled (12.0 or lower)&lt;br /&gt;Gratuitous ARP                Enabled&lt;br /&gt;Proxy ARP                     Enabled&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Each one of these services should be disabled (if not needed) as they pose security holes in your network if left enabled.  Aside from the list above there are other options which you can configure to secure your router like passwords, secure remote access (SSH), and others.  This can be time consuming to do each one by hand which is why Cisco has the AutoSecure feature.  Integrated in IOS 12.2(18)S and greater, this feature allows you to secure your router with a simple command with verbose output of the changes.  AutoSecure can be run interactively or automatically depending on your preference.  The following is the syntax used for the AutoSecure feature:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;auto secure [management | forwarding] [no-interact | full] [login | ntp | ssh | firewall | tcp-intercept]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If not specified "full" sit the default option that is used configuring all aspects of the router.  You can run the AutoSecure feature multiple times specifying the configuration of only individual parts of the router (as shown in the command options above).  You may also use the no-interact mode which will choose all the options for you in securing the router.  When using the "auto secure full" option (the default) the following steps are performed:&lt;br /&gt;&lt;ul style="color: rgb(255, 255, 204);"&gt;&lt;li&gt;Identify the outside interface(s).&lt;/li&gt;&lt;li&gt;Secure the management plane.&lt;/li&gt;&lt;li&gt;Create a security banner.&lt;/li&gt;&lt;li&gt;Configure passwords, AAA, and SSH.&lt;/li&gt;&lt;li&gt;Secure the interfaces.&lt;/li&gt;&lt;li&gt;Secure the forwarding plane.&lt;/li&gt;&lt;/ul&gt;AutoSecure also creates a backup copy of your current config in flash before running in case something happens during the securing of the router.  This way if you need to revert back you can use the command "configure replace flash:pre_config.cfg" to restore your original config file.&lt;br /&gt;&lt;br /&gt;Aside from the command line AutoSecure feature there is also a GUI version that is provided via Cisco's SDM.  In the SDM under the "configure" option there is a section for Security Audit.  Here there are two wizards that you can use, Security Audit Wizard and One-Step Lockdown.  The security audit process consists of the following:&lt;br /&gt;&lt;ol style="color: rgb(255, 255, 204);"&gt;&lt;li&gt;Determining inside and outside interfaces.&lt;/li&gt;&lt;li&gt;Performing an audit of various security options on the router.&lt;/li&gt;&lt;li&gt;Allowing the user to select which security problems must be corrected.&lt;/li&gt;&lt;li&gt;Creating a list of configurations to correct the indicated security vulnerabilities.&lt;/li&gt;&lt;li&gt;Applying the security configurations.&lt;/li&gt;&lt;/ol&gt;The One-Step Lockdown wizard provides the following:&lt;br /&gt;&lt;ol style="color: rgb(255, 255, 204);"&gt;&lt;li&gt;No user-configurable options.&lt;/li&gt;&lt;li&gt;No reminders of what is secured.&lt;/li&gt;&lt;li&gt;Automatic security audit to determine vulnerabilities.&lt;/li&gt;&lt;/ol&gt;As you can see the differences here the One-Step Lockdown pretty much takes over and does everything for you, which does things simple however allows for no flexibility in configuration of the routers security.  The Security Audit wizard provides you with more settings and configuration options although it does take slightly longer to configure.  In the end you can use either the SDM GUI features or the CLI AutoSecure to secure your router. Regardless of which method you use you will have a more hardened router protecting you from attacks on your network.  For a more in-depth look as a secure configuration you can check out the link below which provides a sample of a secure config file for a router as well as more information on the AutoSecure feature.&lt;br /&gt;&lt;a href="http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123newft/123_1/ftatosec.htm#wp1027258"&gt;&lt;br /&gt;Cisco AutoSecure Example&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-2032437078250092582?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2032437078250092582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/08/cisco-router-hardening.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2032437078250092582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2032437078250092582'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/08/cisco-router-hardening.html' title='Cisco Router Hardening'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4130215934905439114</id><published>2009-08-25T15:20:00.003-04:00</published><updated>2009-08-25T15:27:43.905-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='LPIC'/><title type='text'>Working with File Permissions</title><content type='html'>Working with file permissions in Linux can be a little difficult at first as they are a little different from Windows.  Linux access control is implemented via properties that are maintained seperaly for each individual file.  These collective properties are called the access mode of the file.  Linux uses three different classes of users:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;User&lt;/span&gt; - person that owns the file&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Group&lt;/span&gt; - group that owns the file&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Other&lt;/span&gt; - all other users on the system&lt;br /&gt;&lt;br /&gt;Permissions in Linux can be assigned one of two different ways.  You can use the mnemonic or single digit to represent the permissions level.  A table would be the easiest way to see the different permission types:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Read      r    4    View file contents.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Write     w    2    Write to or change.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Execute   x    1    Run the file.&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There are three other pieces to file permissions that we should discuss as well.  The SUID, SGID, and the sticky bit (this order is important).&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;SUID&lt;/span&gt; - the property for executable files only (has no effect on directories).  When users run commands the process that the command runs under is usually owned by the user that executed the command.  When the SUID bit is set the process of the program retains the ownership of who ever owns the command file to begin with (usually root).  An example of this would be the passwd command which is owned by root, but allows other users access to the command.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;SGID&lt;/span&gt; - this bit has a similar effect as SUID on executable files, however it adds another effect for directories.  When the SGID bit is set on a directory, the directory's group retains ownership to anything create within that directory.  For example if there is an engineering department (/home/eng) with the SGID bit set, and the engineering group owns the directory, then anyone that creates any files  (regardless of group) will have their files owned by the engineering group.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Sticky&lt;/span&gt; - the sticky bit is also used on directories in Linux.  When set it allows only the file owner, directory owner, and root to rename or delete any files within the directory.  This is useful for having multiple people in a group work on files but not have access to delete or rename them.&lt;br /&gt;&lt;br /&gt;Here is where the differences come in between mnemonic or digit usage.  When creating a permissions with one of the three "special" bits listed above you must follow the following rules under mnemonics:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;SUID    - changes x to s in user permissions  | numerical of 4000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;SGID    - changes x to s in group permissions | numerical of 2000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Sticky  - changes x to T in other permissions | numerical of 1000&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can check the file or directory permissions with the command ls -l or stat.&lt;br /&gt;&lt;br /&gt;One other topic that we will need to look at for file permissions is the umask.  This is essentially a way for files and directories to receive a default set of permissions when they are created.  You can execute the umask command with no parameters to find out the currently set umask value (usually 0022).  When files are created they are given the default permissions of 666 or rw-rw-rw- and directories are given the default permissions of 777 or rwxrwxrwx.  The umask takes the default permissions and modifies them according to its mask value (through subtraction).  Lets look at an example for a better understanding:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Files default permissions -&gt; rw-rw-rw- = 110 110 110 (in binary)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;We subtract the umask     -&gt;           - 000 010 010 (in binary)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;                                       -------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;                                         110 100 100 (rw-r--r-- or 644)&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now you have a default permissions of 644 as shown above.  This is the same with directories.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Dir default permissions   -&gt; rwxrwxrwx = 111 111 111 (in binary)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;We subtract the umask     -&gt;           - 000 010 010 (in binary)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;                                       -------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;                                         111 101 101 (rwxr-xr-x or 755)&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;                                   &lt;br /&gt;The umask command with no parameters will output the current umask value, however it also takes a three digit argument to change the umask.  As you can see umask values play an important role in file permissions.&lt;br /&gt;&lt;br /&gt;This is everything needed for file permissions on Linux in a nutshell.  I can truly say that coming from a Windows background people tend to get confused at first how the file permissions work (mostly because there are no check boxes at the command line).  Some GUI programs like Gnome and KDE do make it a little easier for new users to familiarize themselves with Linux file permissions.  Personally I use the numerical notation when working with file permissions because I find it easier however it is entirely up to you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-4130215934905439114?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4130215934905439114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/08/working-with-file-permissions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4130215934905439114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4130215934905439114'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/08/working-with-file-permissions.html' title='Working with File Permissions'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7403500248916461825</id><published>2009-08-25T11:49:00.004-04:00</published><updated>2009-08-25T12:06:02.839-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='LPIC'/><title type='text'>Working with Filesystems</title><content type='html'>Its important to know how to work with filesystems in Linux.  They contain everything necessary to run the system and store all data.  There are many tools you can use to work with filesystems which allow you to add the the hierarchy, provide users with more storage space, monitor your storage space, and more.  Lets take a look at a few tools that will help us out.&lt;br /&gt;&lt;br /&gt;First we will start with the mount command, which is just a way to add a filesystem to a directory (effectively extending the existing hierarchy).  When the system boots it reads the contents of the /etc/fstab file and automatically mounts the necessary file systems.  We can type the mount command with no parameters and it will list all the currently mounted filesystems.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;owner@owner-laptop:~$ mount&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;proc on /proc type proc (rw,noexec,nosuid,nodev)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;varrun on /var/run type tmpfs (rw,nosuid,mode=0755)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;udev on /dev type tmpfs (rw,mode=0755)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These should all be similar to what are in the contents of the /etc/mtab file.  The difference is /etc/fstab is the information of filesystems on the computer and /etc/mtab is the currently mounted filesystems.  Lets take a closer look at the /etc/fstab file.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;owner@owner-laptop:~$ cat /etc/fstab&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;# /etc/fstab: static file system information.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;#&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;# &lt;file&gt; &lt;mount&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;&lt;/pass&gt;&lt;/dump&gt;&lt;/options&gt;&lt;/type&gt;&lt;/mount&gt;&lt;/file&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;proc            /proc           proc    defaults        0       0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;# / was on /dev/sda1 during installation&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;UUID=98a7699d-79f8-43d1-af9c-1339b5d6f06d  /  ext3  relatime,errors=remount-ro 0 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;# swap was on /dev/sda5 during installation&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;UUID=d9e0c043-2633-49d6-bfe5-daac68162acd  none  swap  sw  0 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8  0 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8  0 0&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here we see six fields in use.  The first is the device, which specifies the device file of the partition holding the filesystem.  Second will be the mount point of where the filesystem will be mounted.  Next we see the filesystem type followed by mount options, dump frequency, and finally the pass number for fsck.  The first three fields should be self explanatory, while the last three could use a little explaining.  The mount options field contains a list of comma-separated options used for mounting the filesystem.  The dump frequency is usually set to 0 for all filesystems other then ext2 (the dump utility is not discussed here).  Finally the fsck checks for file consistency and is usually run when the system dies unexpectedly, however it isn't something you want to run on every bootup so a 0 is used to disable it.  The reason for understanding how the /etc/fstab file works is because as an administrator you can add your own entries in here for filesystems that you want to have automatically mounted when the system boots up.  If you are just looking to mount a filesystem temporarily to use you can use the mount command to mount the filesystem and the umount command to remove it.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;# Mount a CD-ROM Drive&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;mount -rt iso9660 /dev/hdc /mnt/cdrom&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;# Unmount the CD-ROM Drive&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;umount /mtn/cdrom&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now that you have a better hold on mounting filesystems lets take a look at monitoring them.  There are two utilities that are are going to use here, the first will be the df command.  The df command is used to check the disk space utilization.  The most common use is with the -h switch so jumping right into an example.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;owner@owner-laptop:~$ df -h&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;Filesystem            Size  Used Avail Use% Mounted on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/dev/sda1             7.5G  2.7G  4.5G  38% /&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;tmpfs                 186M     0  186M   0% /lib/init/rw&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;varrun                186M   88K  186M   1% /var/run&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;varlock               186M     0  186M   0% /var/lock&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;udev                  186M  140K  186M   1% /dev&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;tmpfs                 186M  1.2M  185M   1% /dev/shm&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;lrm                   186M  2.4M  184M   2% /lib/modules/2.6.28-11-generic/volatile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/dev/sr0               31M   31M     0 100% /media/cdrom0&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here we can see the layout of the current directory and the utilization of the filesystem.  We can use it to monitor the filesystem for low disk space, if a partition is filled, or if we can't seem to find where all our free space is going.  The second of the utilities is the du command.  While df looks at things more on a whole du is more used for single directories and the amount of storage space they are consuming.  Du will also list all hidden files when taking into account used space.  An example for du would be:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;# List all files (including hidden) with their file sizes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;owner@owner-laptop:~$ du -h&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;# Show only a summary of all files&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;owner@owner-laptop:~$ du -hs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The last utility we are going to look at is fsck.  This is used to check for errors on the filesystem and optionally correct them.  This is a commonly run utility is the system is shutdown improperly and the disk is marked as "dirty" in which case the fsck utility will attempt to check the filesystem.  There are other utility like tune2fs which can be used to fine tune the filesystem however this is for more advanced users.  Clearly there is a lot to look at when managing filesystems and an important part would also be proper planning before implementing the filesystem to begin with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7403500248916461825?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7403500248916461825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/08/working-with-filesystems.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7403500248916461825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7403500248916461825'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/08/working-with-filesystems.html' title='Working with Filesystems'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-2912900515416119877</id><published>2009-08-25T07:34:00.003-04:00</published><updated>2009-08-25T07:38:26.563-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='LPIC'/><title type='text'>Working with Boot Managers</title><content type='html'>In order to load the operating system the computer relies on a boot loader.  It takes the boot loader and any user supplied arguments and uses them to load the kernel.  The boot loader is usually found in the Master Boot Record (MBR) of the primary disk drive.  The MBR occupies the first 512 bytes (also called a sector) of the primary disk and contains partition tables along with the boot loader.  The boot loader reads the partition table looking for the "active" disk drive and loads the first sector of this partition.  When it comes to boot loaders you have two choices in Linux, LILO or Grub (others exist these are just the most popular).&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;LILO&lt;/span&gt; - consists of a two stages.  There is also something called the lilo command which we will talk about as well.  The first stage is intended to find and load the second stage.  This first stage is too small to do anything other then execute the second stage.  Once the second stage of the boot loader has started there is a user prompt which offers customization and options for booting up the kernel.  The lilo command, which is also called the map installer, is used to install and configure the boot loader.  It does this by reading a config file which tells it where to find the information required to start the boot process.  This can include the kernel images, video information, the default boot disk, network card information to get network activity, and so on.  This is all saved for use by the boot loader later on.&lt;br /&gt;&lt;br /&gt;Options for lilo command use:&lt;br /&gt; &lt;br /&gt;   -C config_file   -&gt; reads the config_file instead of the default config file (/etc/lilo.conf)&lt;br /&gt;   -m map_file    -&gt; write map_file in placeof the default&lt;br /&gt;   -q                      -&gt; query the current configuration&lt;br /&gt;   -v                      -&gt; increase verbose output&lt;br /&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;GRUB&lt;/span&gt; - unlike LILO, GRUB is very flexible supporting many operating systems and file types.&lt;br /&gt;&lt;br /&gt;GRUB sees disk devices as follows:&lt;br /&gt;&lt;br /&gt;(xdn[,m]) where xd is the drive, n is the number of the disk, and m denotes the partition number&lt;br /&gt;&lt;br /&gt;GRUB expects a certain sequence of commands to be entered when booting to a Linux kernel.&lt;br /&gt;  Root device&lt;br /&gt;  Kernel filename [options]&lt;br /&gt;  initrd filename (optional)&lt;br /&gt;  boot&lt;br /&gt;&lt;br /&gt;A sample GRUB config file:&lt;br /&gt;&lt;br /&gt;default=0&lt;br /&gt;timeout=10&lt;br /&gt;splashimage=(hd0,0)/grub/splash.xpm.gz&lt;br /&gt;title  Ubuntu Linux (9.04)&lt;br /&gt;      root (hd0,0)&lt;br /&gt;      kernel /vmlinuz-2.6.26-28 ro root=/dev/hda5&lt;br /&gt;      initrd /initrd-2.6.26-28.img&lt;br /&gt;    &lt;br /&gt;As you can see the boot loaders are fairly easy to work with and allow for tweaking in many ways.  The Debian system that I use has the GRUB boot loader installed.  Some of the features that it supports are password protection, changing the splash screen, multiple image loading, and many others.  There are many other tutorials out there which go in depth into installing the boot loader from a floppy disk (although there days you could probably use a live Cd or thumb drive).  Boot loaders are also one thing that can be tweaked to allow a faster startup time of the machine, so many different settings are possible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-2912900515416119877?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/2912900515416119877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/08/working-with-boot-managers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2912900515416119877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/2912900515416119877'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/08/working-with-boot-managers.html' title='Working with Boot Managers'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-3036490309158967456</id><published>2009-08-24T19:57:00.005-04:00</published><updated>2009-08-24T21:18:53.310-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='LPIC'/><title type='text'>Understanding the Linux Filesystem</title><content type='html'>In Linux filesystem has dual meanings which relate to how to physical structure of the disk is setup or it can refer to the structure and contents of a storage device.  Let's take a look at the physical components first in Linux.  The most common among user machines is IDE, although some systems also use SCSI.  Linux defines the following:&lt;br /&gt;&lt;br /&gt;/dev/hda - primary master IDE&lt;br /&gt;/dev/hba - primary slave IDE&lt;br /&gt;&lt;br /&gt;/dev/sda - first SCSI drive&lt;br /&gt;/dev/sdb - second SCSI drive&lt;br /&gt;&lt;br /&gt;The number 1 after a device signifies that it is the first partition of the first hard drive (ie. /dev/hda1).  Up to four primary partitions are allowed.  All logical devices are label from 5-15.&lt;br /&gt;&lt;br /&gt;Moving away from the physical meaning we take a look at the structural layout of the Linux filesystem.  At the top of the filesystem is the root (/), this is also known as the root directory (not to be confused with the root user directory /root).  There are a number of sub-directories that are used on the system which contain config files, devices, and user data.  Looking at some of the basic directories:&lt;br /&gt;&lt;br /&gt;/bin  - contains required system binaries&lt;br /&gt;/sbin - contains required system binaries&lt;br /&gt;/dev  - contains device files&lt;br /&gt;/mnt  - a mount point for temporary mounts by system administrators&lt;br /&gt;/etc  - contains configuration information&lt;br /&gt;/root - home directory for root user&lt;br /&gt;/lib  - contains shared libraries&lt;br /&gt;/boot - holds static files used by the boot loader&lt;br /&gt;/home - contains user files (this is usually placed on a separate partition)&lt;br /&gt;/tmp  - a temporary directory&lt;br /&gt;/proc - read-only kernel information&lt;br /&gt;/srv  - used to serve content to network&lt;br /&gt;/var  - log files are located here&lt;br /&gt;/usr  - contains a hierarchy of directories which include user commands, source code, and documentation.&lt;br /&gt;&lt;br /&gt;This layout is based on the filesystem hierarchy standard which tries to standardize the layout of the Linux operating system.  Although many follow this layout some vendors and distributions do not so slight variety is quite common.  A good Wiki article has more in depth layout of the filesystem for those interested.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard"&gt;http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There is also a more in depth guide on the layout of some individual parts of the filesystem including:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tldp.org/LDP/sag/html/etc-fs.html"&gt; /etc&lt;/a&gt;&lt;br /&gt;&lt;a href="http://tldp.org/LDP/sag/html/dev-fs.html"&gt;/dev&lt;/a&gt;&lt;br /&gt;&lt;a href="http://tldp.org/LDP/sag/html/usr-fs.html"&gt;/usr&lt;/a&gt;&lt;br /&gt;&lt;a href="http://tldp.org/LDP/sag/html/var-fs.html"&gt;/var&lt;/a&gt;&lt;br /&gt;&lt;a href="http://tldp.org/LDP/sag/html/proc-fs.html"&gt;/proc&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are also many guides for system administrators on how to partition systems, and where to put each sub-directory so as to make the most stable and reliable system (this does however boil down to technical and personal choice).  We will look at a Debian based system as an example.&lt;br /&gt;&lt;br /&gt;The root partition / must always physically contain /etc, /bin, /sbin, /lib and /dev, otherwise you won't be able to boot. Typically 150–250MB is needed for the root partition.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/usr&lt;/span&gt; contains all the user programs and is usually the part of the filesystem which takes up the most space (depending on what you plan to install).  A minimum of 1.5GB should be used here, however a more realistic install would allow for 4-6GB.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/var&lt;/span&gt; is where all the "variable" information will which includes things like package management, updates, e-mails, web sites, etc.  A recommended 300-500MB will do however you should allocate more if you plan to install numerous packages onto your system.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/tmp&lt;/span&gt; is a directory which won't hang onto information long.  This is just a temporary place for applications to write data (like CD burning, or creating archives).  Adjust the space accordingly for your needs.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;/home&lt;/span&gt; will contain all your user data.  We all know that we love to save tons of things to our computers, but keep in mind it might be better to setup quotas for your users to limit how much they can store.  Don't forget it's great to give your users tons of space for saving their stuff, but you also have to back all this data up!  A recommended space of 250MB / user.&lt;br /&gt;&lt;br /&gt;Please remember that these are all just suggestions and that as always size, structure, and planning will vary!&lt;br /&gt;&lt;br /&gt;When you are ready to start partitioning the system there are a few tools which we can use which include fdisk, cfdisk, and partman.  Now again remember that we are using a Debian based distro for which partman is the recommended partitioning tool.  It can create and resize partitions which makes it quite useful.  Fdisk is a more advanced partitioning tool which we will leave to the gurus (or until you become more comfortable with the utility).  Finally cfdisk is a menu drive partitioning tool that is very simple to use and what I would recommend using.  To compliment the partitioning of the filesystem there are two other utilities which you will need to actually "create" the filesystem itself.  They are mkfs and mkswap.  Mkfs is used to create different types of filesystems on the partitions that you create, while mkswap creates a swap filesystem.  A swap is like a scratch pad for Linux.  The equivalent on a Windows machine would be the use of page filing.  The complete process of setting everything up includes partitioning, formatting, and creating the actual filesystem itself.  This process can be automated by installers for most distros and everything is usually put on one drive for newbies.  As you become more proficient using Linux you will learn to customize your layout and moving things around to suit your needs.  On a final note about Linux filesystems, partitioning and creating filesystems can erase or destroy data if you don't know what you are doing.  Please backup anything that is important or try these utilities in a lab based environment first!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-3036490309158967456?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/3036490309158967456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/08/understanding-linux-filesystem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3036490309158967456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3036490309158967456'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/08/understanding-linux-filesystem.html' title='Understanding the Linux Filesystem'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-408589593708016932</id><published>2009-07-29T19:37:00.005-04:00</published><updated>2009-07-29T20:10:09.241-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>TFTP Server Setup</title><content type='html'>So those that work with Cisco devices frequently will soon have a new appreciation of TFTP servers.  If you haven't learn already they are a centralized place where you can store configuration files, IOS images, updates, and other files.  This makes backup ad restoring a breeze.  TFTP servers are also quite useful for the deployment world as well.  Most deployment senarios require a PXE service that relies on a TFTP server to send out the needed files when the clients perform a PXE boot.  We are going to look at setting up a TFTP server on a Ubuntu/Debian machine.  This isn't too hard to accomplish on Fedora/Redhat either I just happen to have an Ubuntu Server.  For Windows most TFTP servers aren't really configured but installed as part of a larger application (Solarwinds makes a good one).&lt;br /&gt;&lt;br /&gt;First we are going to need to find the required files for our server role.  We can hunt them down with the apt package manager:&lt;br /&gt;&lt;br /&gt;sudo apt-cache search tftp&lt;br /&gt;&lt;br /&gt;This will return a listing of all packages that relate to TFTP.  We are going to be using tftpd-hpa as it is the most common.  Issuing the command to install:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;sudo apt-get install -y tftpd-hpa&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We will be given a warning message that the install is using the inetd.conf file and that those using xinetd will need to manually add the configuration.  Here is the configuration file that they provide when installing the package.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;service tftp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;    socket_type        = dgram&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;    protocol           = udp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;    wait               = yes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;    user               = root&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;    server             = /usr/sbin/in.tftpd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;    server_args        = -s /var/lib/tftpboot&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Navigate to the /etc/xinetd.d directory where you can open up any text editor.  Create a file name tftp and insert the configuration file listed above.  Save and exit from there and now we will need to make a change to the default configuration for the tftpd daemon which is set to exit on startup.  This time we will open /etc/default/tftpd-hpa and change the daemon options.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;#Defaults for tftpd-hpa&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;RUN_DAEMON="yes"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;OPTIONS="-l -s /var/lib/tftpboot"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Save the configuration file and exit.  We will also need to make one more change.  When we installed the tftpd server it wrote the service settings to the inetd.conf file which we aren't using (because the xinet.d service is taking its place).  We need to comment out the line that the install wrote.  Open up /etc/inetd.conf and comment out the following line:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;#tftp    dgram    udp        wait    root  /usr/sbin...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Save and exit.  Finally we will need to create the tftpboot directory which will hold all the files and folders that we can use for PXE booting or storing uploaded files that we wish to save.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;mkdir /var/lib/tftpboot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we can start the tftp server.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;sudo service tftpd-hpa start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can now verify that the service is running correctly by using netstat:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;netstat -a | grep tftp&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;udp     0    0 *:tftp    *:*&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now you have a complete tftp server running which you can use anywhere in your environment.  For me it is mostly used to house all the backup configuration files for all things Cisco.  It is important to save often when testing new things and this way I know that I have a bunch of different configuration files that are stored safely.  As an example within my tftpboot directory is have a blank file called pix_config.  I will use this to save my firewall configuration.  From the firewall I can issue the following command to backup my configuration file:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;firewall# config t&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;firewall(config)# tftp-server inside 172.168.1.100 /pix_config&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;firewall(config)# exit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The configuration file is now saved to my tftp server for safe keeping.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-408589593708016932?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/408589593708016932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/07/tftp-server-setup.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/408589593708016932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/408589593708016932'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/07/tftp-server-setup.html' title='TFTP Server Setup'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4960347628437434270</id><published>2009-07-29T14:19:00.006-04:00</published><updated>2009-07-29T18:51:03.137-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cisco'/><title type='text'>Cisco Password Recovery</title><content type='html'>Today we'll look at the password recovery procedure for a Cisco 3550 switch.  Now the commands should be similar if not the same however they do vary by model number, so your input and output may vary slightly.  First we are going to connect to the switch via a console cable.  For this session we are going to use telnet through the putty utility.  Once connected we will power off the switch.  Now on the left of the switch there is a "Mode" button which we will press and hold while plugging the switch back in.  All the ports will illuminate for a short while and then port 1 will turn off.  When this happens you can let go of the Mode button and the switch will tell you that the start up has been interrupted.  Here is where the commands will start to come in.  We start with:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch: flash_init&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch: load_helper&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now from here your output may vary.  If you are not presented with a directory full of files you can issue the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch: dir flash:            &lt;-- Notice you need the : after the word "flash" &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you are already in the directory (like I was) rename the configuration file to something else so it will not load when the switch boots:  switch: rename flash:config.text flash:config.old  After that you should be good to reboot by using:  switch: boot  After the switch reboots we will need to make one other change to rip out any passwords that were previously on the switch.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch: enable &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch# config t &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch(config)# no enable secret &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch(config)# enable secret &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 204);"&gt;cisco&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch(config)# enable password&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 204);"&gt; cisco&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch(config)# ^Z&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 255, 204);"&gt;switch# write memory&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now your switch should be good to go with the new password(s) you just configured.  You can now begin building the configuration for your switch.&lt;span style="font-style: italic;"&gt;&lt;br /&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/5157720536595794113-4960347628437434270?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/4960347628437434270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/07/cisco-password-recovery.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4960347628437434270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/4960347628437434270'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/07/cisco-password-recovery.html' title='Cisco Password Recovery'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7544029191151753039</id><published>2009-07-27T08:24:00.002-04:00</published><updated>2009-07-27T08:28:31.550-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Error Codes</title><content type='html'>So you've just installed the latest and greatest in Microsoft software and you fire it up all excited to try it out only to be given an error code.  Although not everyone has such bad luck, anyone that has dealt with Microsoft's products knows that they love their error codes (there is something like 16,000 of them).  Luckily there happens to be some documentation on the error codes for Microsoft products.  This like has the error codes broken down into sections with a description of the error.  It has actually proven quite useful in certain situation so bookmark it for reference later on.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms681381%28VS.85%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms681381(VS.85).aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7544029191151753039?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7544029191151753039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/07/error-codes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7544029191151753039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7544029191151753039'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/07/error-codes.html' title='Error Codes'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-3723108639341564023</id><published>2009-07-22T21:51:00.003-04:00</published><updated>2009-07-22T22:02:29.371-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacking'/><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>Here we go again...</title><content type='html'>Posted yesterday (although it took some time to confirm), there is a new exploit in the works for multiple Adobe products.  As it is being reported the vulnerability lies in Adobe's Flash code, however this code can also be executed via Adobe Reader.  According to SANS there has been reports of PDFs being used to take advantedge of this bug, and drive-by attacks via Flash's code.  Even with Javascript support disabled in Adobe Reader this attack apparently still works.  On Adobe's security blog they are stating that they are looking into the issue.  Although this 0day doesn't seem to be widely used at the moment, I think that it is only a matter of time.  Flaws in Adobe products tend to lead to instant system compromise which tend to make them very popular for expliotation, not to mention that there is not centralized patch management for Adobe products either!  Checking milw0rm today nothing seems to be up for a Point of Concept (PoC), but again it's only a matter of time.  Patching apparently won't help at the moment as Adobe is still investigating the issue at this time.  Here are some quick writes up of what is known so far:&lt;br /&gt;&lt;a href="http://blogs.adobe.com/psirt/"&gt;&lt;br /&gt;http://blogs.adobe.com/psirt/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.networkworld.com/news/2009/072209-adobe-pdf-flash-trojan.html?hpg1=bn"&gt;http://www.networkworld.com/news/2009/072209-adobe-pdf-flash-trojan.html?hpg1=bn&lt;/a&gt;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=6847"&gt;http://isc.sans.org/diary.html?storyid=6847&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Best advice is to keep your anti-virus up-to-date, this way if you do get compromised you can stop the infection from spreading.  Your other alternative is to cease using Adobe Reader and Flash for the time being, but we all know this is not a reality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-3723108639341564023?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/3723108639341564023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/07/here-we-go-again.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3723108639341564023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/3723108639341564023'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/07/here-we-go-again.html' title='Here we go again...'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-6967813887039251472</id><published>2009-07-21T22:10:00.003-04:00</published><updated>2009-07-21T22:16:09.402-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacking'/><category scheme='http://www.blogger.com/atom/ns#' term='Exploit'/><title type='text'>Update Your Java</title><content type='html'>On the 15th of this month ISC SANS had a posting about updating Java.  Turns out that there has been a vulnerability for this bug for a while.  According to the SANS posting it just took a while for the bad guys to start incorporating the use of it.  Looking though milw0rm however there is indeed a point of concept (PoC).  The code posting for the exploit is a little too long to put here so instead I'll refer you to the &lt;a href="http://www.milw0rm.com/exploits/8665"&gt;link here&lt;/a&gt;.  The code shows that it will load a .jnlp file from a hosted website executing an endless loop eating away at system resources.  Althought there is a prompt for confirmation to run the endless loop program as this is only a PoC for educational purposes.  It is advised that everyone update their Java to the newest version (Version 6 Update 14).  Anything at Version 6 Update 13 or lower is vulnerable to this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-6967813887039251472?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/6967813887039251472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/07/update-your-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6967813887039251472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/6967813887039251472'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/07/update-your-java.html' title='Update Your Java'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-5057242152633062081</id><published>2009-07-21T21:28:00.005-04:00</published><updated>2009-07-21T22:00:29.038-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacking'/><category scheme='http://www.blogger.com/atom/ns#' term='Exploit'/><title type='text'>Adobe Reader Exploit</title><content type='html'>Yesterday on the bugtraq mailing list someone released a point of concept (PoC) for a new flaw in the download manager for Adobe Reader.  The download manager, which is powered by Nos Microsystems, installs a service with improper permissions making it possible for someone to replace the executable files with another binary file of choice.  Upon next reboot of the computer it will run the replaced executable with SYSTEM privileges.  This issue (according to the release) seems to affect all versions in the 9.x family.  It is worth nothing however that this probably won't effect corporations that use the administrator package to deploy Adobe Reader because this doesn't use the Nos download manager.&lt;br /&gt;&lt;br /&gt;Jumping over to milw0rm however we can see that a PoC exploit has been released for this (although it was only a matter of time).  Looking at the PoC we can get a better idea of how this exploit works and impacts the system.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 51); font-weight: bold; font-family: georgia;font-size:100%;" &gt;Adobe Download Manager Exploit PoC&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;C:\&gt;sc qc "getPlus(R) Helper"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;[SC] GetServiceConfig SUCCESS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;SERVICE_NAME: getPlus(R) Helper&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       TYPE               : 110  WIN32_OWN_PROCESS (interactive)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       START_TYPE         : 3   DEMAND_START&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       ERROR_CONTROL      : 1   NORMAL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       BINARY_PATH_NAME   : C:\Programmi\NOS\bin\getPlus_HelperSvc.exe&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       LOAD_ORDER_GROUP   :&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       TAG                : 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       DISPLAY_NAME       : getPlus(R) Helper&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       DEPENDENCIES       : RPCSS&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;       SERVICE_START_NAME : LocalSystem&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;C:\&gt;cacls "C:\Programmi\NOS\bin\getPlus_HelperSvc.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;C:\Programmi\NOS\bin\getPlus_HelperSvc.exe BUILTIN\Users:F &lt;-------------- [!!!]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                                           NT AUTHORITY\SYSTEM:F&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;We can see here that the BUILTIN\Users group has full control to this executable.  There are so many different types of attacks that can be carried out here.  As pointed out on the bugtraq posting the severity and destructiveness are entirely up to the user carrying out the attack.  Recently Adobe has announced that it will start patching on a consistent schedule similar to Microsoft's.  At the time however there is no patch or workaround for this current issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-5057242152633062081?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/5057242152633062081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/07/adobe-reader-exploit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5057242152633062081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/5057242152633062081'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/07/adobe-reader-exploit.html' title='Adobe Reader Exploit'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-7322417105137327146</id><published>2009-07-20T22:08:00.006-04:00</published><updated>2009-07-20T22:29:50.147-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Your Very Own Python Server</title><content type='html'>I've been working on this assignment at work which requires a lot of testing to ensure that things are working correctly.  So every time an adjustment is made I would have to log into the remote computer check it, jump back, make some changes, jump back, &lt;span style="font-size:100%;"&gt;&lt;i style="font-family: georgia;"&gt;ad infinitum.  &lt;/i&gt;&lt;span style="font-family:georgia;"&gt;I decided that I wanted to automate some of this process a little which would essentially require a back door to the remote computer (Windows remote desktop takes way too long).  I decided that I wanted a quick and easy server application that could be run on the remote machine that I could tap into via the command line to execute a few commands and check what I needed to without changing screens or a remote login.  To start out I chose Python as my programming language because it's powerful, high level, and flexible.  First I had to build out the server, providing the most basic functionality possible while yet accomplishing what I needed to get done.  Below is the code that I used to create the server with a few things stripped out (mostly the help_menu functions) to make the code as simple as possible.  While this server may not do much it is a good starting point that can be built on very easily.  If someone wanted to they could also develop this a little further and have a full fledged application for internal use.  Of course server programs like these are also commonly found on compromised computers as well, used for upload and downloading files, remote host control, etc...&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 51); font-weight: bold;"&gt;The Sample Server Code&lt;/span&gt;&lt;br /&gt;&lt;pre style="overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;from socket import *&lt;br /&gt;import socket&lt;br /&gt;import random&lt;br /&gt;import sys&lt;br /&gt;import os&lt;br /&gt;&lt;br /&gt;# Help menu function&lt;br /&gt;help_menu = "\n---- Supported Commands ----\n\n" + \&lt;br /&gt;"[cmd]         - this can be any command found in the system32 folder\n" + \&lt;br /&gt;"[cmd_full]    - any known application (you must use full path)\n" + \&lt;br /&gt;"restart       - remote restart\n" + \&lt;br /&gt;"shutdown      - remote shutdown\n" + \&lt;br /&gt;"win_update    - remote update (can take time)\n" + \&lt;br /&gt;"help          - display this menu" + \&lt;br /&gt;"quit          - disconnects from the server\n" + \&lt;br /&gt;"kill          - kills the remote server (will start again on reboot)\n" + \&lt;br /&gt;"\n"&lt;br /&gt;&lt;br /&gt;# Generate the hostname and the current ip address&lt;br /&gt;hostname = socket.gethostname()&lt;br /&gt;host_ip = socket.gethostbyname(hostname)&lt;br /&gt;&lt;br /&gt;# Assign a number for the port (default of 5080)&lt;br /&gt;port = 5080&lt;br /&gt;&lt;br /&gt;# Create a buffer size (default 1024)&lt;br /&gt;buf = 1024&lt;br /&gt;&lt;br /&gt;# Tuple to hold the host and port number&lt;br /&gt;x = (host_ip,port)&lt;br /&gt;&lt;br /&gt;# Create the socket and bind it to the computer&lt;br /&gt;s = socket.socket(AF_INET, SOCK_STREAM)&lt;br /&gt;s.bind(x)&lt;br /&gt;&lt;br /&gt;# Wait for connection&lt;br /&gt;s.listen(1)&lt;br /&gt;conn, addr = s.accept()&lt;br /&gt;print "Connection from: ", addr&lt;br /&gt;&lt;br /&gt;# Send the first menu to the client&lt;br /&gt;conn.send("Welcome to mini-server\n")&lt;br /&gt;&lt;br /&gt;# Begin server loop&lt;br /&gt;while 1:&lt;br /&gt;&lt;br /&gt; data = conn.recv(buf)&lt;br /&gt;&lt;br /&gt; if data == "quit":&lt;br /&gt;   print "Connection closed from: ", addr&lt;br /&gt;   break&lt;br /&gt; elif data == "help":&lt;br /&gt;   conn.send(help_menu)&lt;br /&gt; else:&lt;br /&gt;   os.system(data)&lt;br /&gt;   conn.send("Command completed")&lt;br /&gt;&lt;br /&gt;s.close()&lt;br /&gt;print "Server terminated"&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Next we needed a client to connect into the server.  This client like the server is also very basic and doesn't provide for much more than what I needed it for.  However just like the server it can be adapted to add more features.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 51);"&gt;The Sample Client Code&lt;/span&gt;&lt;br /&gt;&lt;pre style="overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;import socket&lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;# Create a connection for the client to use to connect to the server&lt;br /&gt;s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;host = sys.argv[1]&lt;br /&gt;port = 5080&lt;br /&gt;buf = 1024&lt;br /&gt;&lt;br /&gt;# Setup the connection between the client and the server&lt;br /&gt;s.connect((host,port))&lt;br /&gt;conn = s.recv(buf)&lt;br /&gt;print conn&lt;br /&gt;&lt;br /&gt;while (1):&lt;br /&gt; # Grab data from the user to send to the server&lt;br /&gt; data = raw_input("&gt;&gt; ")&lt;br /&gt; if data == "quit":&lt;br /&gt;   s.send(data)&lt;br /&gt;   break&lt;br /&gt; else:&lt;br /&gt;   # send the data to the server and get a reply back&lt;br /&gt;   if(s.send(data)):&lt;br /&gt;     print "Sending: ", data&lt;br /&gt;     conn = s.recv(buf)&lt;br /&gt;     print conn&lt;br /&gt;&lt;br /&gt;s.close()&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Hopefully you found this little bit of code useful or something that you can use for your own projects.  If nothing more this serves as a great example of Python and socket programming.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-7322417105137327146?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/7322417105137327146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/07/your-very-own-python-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7322417105137327146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/7322417105137327146'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/07/your-very-own-python-server.html' title='Your Very Own Python Server'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-8931017359284237427</id><published>2009-07-18T10:04:00.012-04:00</published><updated>2009-07-18T12:25:56.651-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Firewalls'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Linux Firewall</title><content type='html'>I decided today that it was time to finally give my home lab some attention. I'm running an Ubuntu linux server as the gateway to my lab network and it needed to be redone.  After a quick OS reinstall I wanted to configure the firewall for specific needs.  Although there are different ways to do this I decided to use the ufw program to manage the firewall as it is simple for new users and quick enough that I can knock out a few rules in a short amount of time.  There is a GUI version for those that don't like the command line called gufw.  It provides the same functionality with an easy to use interface.  We will be using the command line version which is being configured over an SSH connection.  By default the firewall is disabled when you install the operation system.  Before we turn it on however we need to create a quick rule to allow SSH connections into the box, otherwise once we enable the firewall SSH connections will no longer be allowed and then I'll have to go configure it from the console.  So we start out by creating our SSH session into the box and switching over to the root user, as this program requires root in order to do anything.  For the moment we will type the following to get the firewall up and running:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# ufw allow ssh&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# ufw enable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# shutdown -r now&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The last line here reboots the computer which is required once the firewall has been enabled.  When the system comes back up we can SSH back into the server and begin adding more specific rules for my lab.  Let's take a quick look at the syntax that ufw uses which will help when creating rules.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 51); font-weight: bold;"&gt;UFW Syntax&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:georgia;font-size:100%;"  &gt;ufw [--dry-run] enable|disable|reload&lt;br /&gt;&lt;br /&gt;ufw [--dry-run] default allow|deny|reject&lt;br /&gt;&lt;br /&gt;ufw [--dry-run] logging on|off|LEVEL&lt;br /&gt;&lt;br /&gt;ufw [--dry-run] status [verbose|numbered]&lt;br /&gt;&lt;br /&gt;ufw [--dry-run] show [raw]&lt;br /&gt;&lt;br /&gt;ufw [--dry-run] [delete] [insert NUM] allow|deny|reject|limit [log|log-all]&lt;br /&gt;PORT[/protocol]&lt;br /&gt;&lt;br /&gt;ufw [--dry-run] [delete] [insert NUM] allow|deny|reject|limit [log|log-all]&lt;br /&gt;[proto  protocol]  [from  ADDRESS  [port PORT]] [to ADDRESS [port PORT]]&lt;br /&gt;&lt;br /&gt;ufw [--dry-run] app list|info|default|update&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see there are alot of options that we can use here.  First we want to check that the firewall is actually running correctly.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# ufw status&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This should return a status of "active".  Now the most simple way to add rules to the firewall is just to use the very simple syntax that ufw provides.  Suppose we want to add a rule that will allow users to telnet (port 23) into the gateway.  The simple syntax that ufw uses is:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:georgia;font-size:100%;"  &gt;ufw allow|deny|reject port&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So for our rule we are going to do:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:georgia;font-size:100%;"  &gt;# ufw allow 23&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It should tell you that your rule has been added and you can verify that by checking:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:georgia;font-size:100%;"  &gt;# ufw status&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now something to notice here is that you will see that port 25 is being allowed from anywhere using any protocol.  While this may be fine for a lab environment this is a bad habit to get into because it could lead to real attacks getting through in a real world situation.  Lets remove the rule we just added:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# ufw delete allow 23&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;And then recreate the rule adding a little security to it:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:georgia;font-size:100%;"  &gt;# ufw allow telnet&lt;br /&gt;&lt;br /&gt;- or -&lt;br /&gt;&lt;br /&gt;# ufw allow 23/tcp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now if you check the status of the firewall again you will notice that instead of just saying 23 it will say 23/tcp meaning that the telnet connection is enabled but only for the TCP protocol.  This unwanted protocols on certain ports.  The only downfall here is that you need to know which protocols are used with which ports (which isn't a bad thing to remember either).  Ok so lets remove this rule again and recreate it one last time with a little more security added in.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);font-family:georgia;font-size:100%;"  &gt;# ufw delete allow telnet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;N&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;"  &gt;ow this time when we create our firewall rule we want to be specific about what traffic is going to be allowed.  We want to create a rule that will allow traffic from only the internal LAN (192.168.1.0/24) to the linux gateway (192.168.1.3) using the TCP protocol only and on port 23.  Well that was a mouth full and we can make it happen with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# ufw allow proto tcp from 192.168.1.0/24 to 192.168.1.3 port 23&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now this rule will prevent spoofing attacks from outside ip addresses being able to get into my gateway.  There ar emany other things that you can do with ufw such as setting different types of logging, creating more advanced rules, and also using the --dry-run switch to show you what the effect of the rules are before they are put into place.  This is also a program that can be scripted with BASH for some quick reconfiguration for testing different senarios.  One thing of note with this program is that log messages are sent to the kernal log (in case you are looking for the log file).  Anyone with some Cisco expereience might these similar to creating ACLs on a Cisco device.  It is definetly a useful program for quick firewalling and protection.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5157720536595794113-8931017359284237427?l=secnut.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://secnut.blogspot.com/feeds/8931017359284237427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://secnut.blogspot.com/2009/07/linux-firewall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8931017359284237427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5157720536595794113/posts/default/8931017359284237427'/><link rel='alternate' type='text/html' href='http://secnut.blogspot.com/2009/07/linux-firewall.html' title='Linux Firewall'/><author><name>Damian Tommasino</name><uri>http://www.blogger.com/profile/05957307657520803755</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-5157720536595794113.post-4582631173185157088</id><published>2009-07-16T12:36:00.003-04:00</published><updated>2009-07-16T12:49:21.811-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network Security'/><title type='text'>Common Ports</title><content type='html'>It's a good practice to memorize or at least have handy a list of common ports that are used.  This can help you when trying to troubleshoot numerous issues on the network or if you are just learning different tools (like wireshark).  Below is a list of the most common ports that you are bound to see day to day.  There are more lists out there including the "official" list which you can find &lt;a href="http://www.iana.org/assignments/port-numbers"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 51); font-weight: bold;"&gt;Common Ports&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WT187SbRvF0/Sl9Z2H0zPhI/AAAAAAAAAAc/azQS86izMMg/s1600-h/common_ports.jpg"&gt;
