<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="http://openviewsecurity.com/blogboard/styles/rss.css" type="text/css"?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>
 <channel>
  <title>Open.View.Security</title>
  <link>http://openviewsecurity.com/blogboard/index.php?blogId=1</link>
  <description></description>
  <pubDate>Thu, 09 Sep 2010 23:53:58 -0700</pubDate>
  <generator>http://www.lifetype.net</generator>
    <item>
   <title>Google Hacking Database</title>
   <description>
    &lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tbody&gt;&lt;tr valign=&quot;bottom&quot;&gt;&lt;td width=&quot;100%&quot;&gt;&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;6&quot; cellspacing=&quot;1&quot; class=&quot;tborder&quot; width=&quot;100%&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;alt1&quot; width=&quot;100%&quot;&gt;&lt;center&gt;&lt;strong&gt;Google Hacking Database (GHDB)!&lt;/strong&gt;&lt;br /&gt;http://johnny.ihackstuff.com/ghdb.php&lt;br /&gt;
&lt;br /&gt;&lt;/center&gt;

&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=19&quot;&gt;Advisories and Vulnerabilities&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (215 entries)&lt;/span&gt;&lt;br /&gt;These
searches locate vulnerable servers. These searches are often generated
from various security advisory posts, and in many cases are product or
version-specific.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=10&quot;&gt;Error Messages&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (68 entries)&lt;/span&gt;&lt;br /&gt;Really retarded error messages that say WAY too much!&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=11&quot;&gt;Files containing juicy info&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (230 entries)&lt;/span&gt;&lt;br /&gt;No usernames or passwords, but interesting stuff none the less.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=13&quot;&gt;Files containing passwords&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (135 entries)&lt;/span&gt;&lt;br /&gt;PASSWORDS, for the LOVE OF GOD!!! Google found PASSWORDS!&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=12&quot;&gt;Files containing usernames&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (15 entries)&lt;/span&gt;&lt;br /&gt;These files contain usernames, but no passwords... Still, google finding usernames on a web site..&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=14&quot;&gt;Footholds&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (21 entries)&lt;/span&gt;&lt;br /&gt;Examples of queries that can help a hacker gain a foothold into a web server&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=17&quot;&gt;Pages containing login portals&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (232 entries)&lt;/span&gt;&lt;br /&gt;These are login pages for various services. Consider them the front door of a website&amp;#39;s more sensitive functions.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=16&quot;&gt;Pages containing network or vulnerability data&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (59 entries)&lt;/span&gt;&lt;br /&gt;These pages contain such things as firewall logs, honeypot logs, network information, IDS logs... all sorts of fun stuff!&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=6&quot;&gt;Sensitive Directories&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (61 entries)&lt;/span&gt;&lt;br /&gt;Google&amp;#39;s
collection of web sites sharing sensitive directories. The files
contained in here will vary from sesitive to uber-secret!&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=15&quot;&gt;Sensitive Online Shopping Info&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (9 entries)&lt;/span&gt;&lt;br /&gt;Examples
of queries that can reveal online shopping info like customer data,
suppliers, orders, creditcard numbers, credit card info, etc&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=18&quot;&gt;Various Online Devices&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (201 entries)&lt;/span&gt;&lt;br /&gt;This category contains things like printers, video cameras, and all sorts of cool things found on the web with Google.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=8&quot;&gt;Vulnerable Files&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (57 entries)&lt;/span&gt;&lt;br /&gt;HUNDREDS of vulnerable files that Google can find on websites...&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=9&quot;&gt;Vulnerable Servers&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (48 entries)&lt;/span&gt;&lt;br /&gt;These
searches reveal servers with specific vulnerabilities. These are found
in a different way than the searches found in the &amp;quot;Vulnerable Files&amp;quot;
section.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://johnny.ihackstuff.com/ghdb.php?function=summary&amp;amp;cat=7&quot;&gt;Web Server Detection&lt;/a&gt; &lt;span class=&quot;smallfont&quot;&gt; (72 entries)&lt;/span&gt;&lt;br /&gt;These links demonstrate Google&amp;#39;s awesome ability to profile web servers.. &lt;br /&gt;&lt;br /&gt;                                                        &lt;/td&gt;
                                                &lt;/tr&gt;
                                                &lt;/tbody&gt;&lt;/table&gt;
                                        &lt;/td&gt;

                                        &lt;td class=&quot;main_tcat_bl&quot;&gt;
                                                &lt;img src=&quot;http://johnny.ihackstuff.com/forums/images/styles/soness/style/main_tcat_br_img.gif&quot; border=&quot;0&quot; /&gt;
                                        &lt;/td&gt;
                                &lt;/tr&gt;
                                &lt;tr&gt;
                                        &lt;td class=&quot;main_tcat_foot&quot; colspan=&quot;3&quot;&gt;
                                                &lt;div class=&quot;main_tcat_foot_left&quot;&gt;&lt;div class=&quot;main_tcat_foot_right&quot;&gt;
                                                        &amp;nbsp;
                                                &lt;/div&gt;&lt;/div&gt;
                                        &lt;/td&gt;
                                &lt;/tr&gt;
                                &lt;/tbody&gt;&lt;/table&gt;


&lt;br /&gt;
                        &lt;div&gt;&lt;span style=&quot;float: right&quot;&gt;&lt;img class=&quot;page_corner_br&quot; src=&quot;http://johnny.ihackstuff.com/forums/images/styles/soness/style/page_corner_br.gif&quot; border=&quot;0&quot; /&gt;&lt;/span&gt;&lt;img class=&quot;page_corner_bl&quot; src=&quot;http://johnny.ihackstuff.com/forums/images/styles/soness/style/page_corner_bl.gif&quot; border=&quot;0&quot; /&gt;&lt;/div&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=38&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=38&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=38&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>Security</category>
         <pubDate>Fri, 13 Jun 2008 11:18:53 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>Unfreeze Deep Freeze</title>
   <description>
    &lt;strong&gt;Deep Freeze&lt;/strong&gt; use a unique method of disk protection to preserve
the exact original standard system configuration on over five million
Windows and Macintosh computers worldwide!&lt;br /&gt;&lt;br /&gt;According to the&lt;strong&gt; Faronics&lt;/strong&gt;(Developers
of Deep Freeze): &amp;quot;Deep Freeze instantly protects and preserves baseline
computer configurations. No matter what changes a user makes to a
workstation, simply restart to eradicate all changes and reset the
computer to its original state - right down to the last byte.&amp;quot; &lt;br /&gt;&lt;br /&gt;However, the following is a step by step instruction on how to bypass the Deep Freeze security.&lt;br /&gt;&lt;br /&gt;Note: Tested on&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;margin-top: 0pt; margin-bottom: 0pt&quot;&gt;&lt;li&gt;OS - Windows 2000 and XP edition&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Deep Freeze - 4.20.020.0598, 4.20.120.0598, 4.20.121.0613, 5.20.220.1125 and 5.30.120.1181&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style=&quot;text-decoration: underline&quot;&gt;&lt;strong&gt;Tools Required &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;gt;&amp;gt; Ollydbg (&lt;a href=&quot;http://www.ollydbg.de/&quot; target=&quot;_blank&quot;&gt;http://www.ollydbg.de/&lt;/a&gt;)&lt;br /&gt;to patch the program and run it.&lt;br /&gt;&amp;gt;&amp;gt; OllyScript (Attached or go to&amp;nbsp; -&amp;gt; &lt;a href=&quot;http://www.theadmins.info/files/OllyScript.zip&quot; target=&quot;_blank&quot;&gt;http://www.theadmins.info/files/OllyScript.zip&lt;/a&gt;)&lt;br /&gt;to run scripts on Ollydgb&lt;br /&gt;&amp;gt;&amp;gt; ASPack 2.12 OEP finder script by hacnho/VCT2k4 (Attached or go to&amp;nbsp; -&amp;gt; &lt;a href=&quot;http://www.theadmins.info/files/ASPackOEPfinderScript.txt&quot; target=&quot;_blank&quot;&gt;http://www.theadmins.info/files/ASPackOEPfinderScript.txt&lt;/a&gt; )&lt;br /&gt;to find the OEP&lt;br /&gt;&amp;gt;&amp;gt; Process Explorer for 2K/XP (&lt;a href=&quot;http://www.sysinternals.com/&quot; target=&quot;_blank&quot;&gt;http://www.sysinternals.com/&lt;/a&gt;)&lt;br /&gt;to see the login program command line&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;text-decoration: underline&quot;&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What
we are going to do is to load a new instance of Deep Freeze login
program and we&amp;#39;ll change it in such a way that it will accept any
password as a valid one. &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;text-decoration: underline&quot;&gt;&lt;strong&gt;Let the Play Begin&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The
first thing to do is to find some data that we are going to use later
to load our login program instance. For this, load the Process
Explorer. Once it is loaded, we can see a list of all the processes our
system is running, among them is the login program called &lt;em&gt;&lt;strong&gt;FrzState.exe&lt;/strong&gt;&lt;/em&gt; or &lt;em&gt;&lt;strong&gt;FrzState2k.exe&lt;/strong&gt;&lt;/em&gt;.
You may expand the tree if required to find this program. Right click
over the program&amp;#39;s name and select &amp;quot;Properties&amp;quot;. A new window will be
opened with the process properties.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/01a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Under
the Image tab, note the property named &amp;quot;Command Line&amp;quot;. Note down the
value of &amp;quot;Command Line&amp;quot; including the three numbers at the end of the
property for future use in this tutorial.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/02a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Run Ollydbg.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;Note:
Make sure that OllyScript is properly installed. Make sure that the
menu &amp;quot;Plugins&amp;quot; and submenu &amp;quot;OllyScript&amp;quot; is available. If this menu
doesn&amp;#39;t appear in the program, that means the plugin is not installed
properly. To install it, go to the menu &amp;quot;Options&amp;quot; and select
&amp;quot;Appearance&amp;quot;. In the &amp;quot;Plugin path&amp;quot; box write the address where you
copied OllyScript files, press OK and restart the program.&lt;/div&gt; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;On
the &amp;#39;File&amp;#39; menu select &amp;#39;Open&amp;#39; and look for the login program file
(remember that Process Explorer told you where it was). In the
&amp;#39;Arguments&amp;#39; box write the three numbers you&amp;#39;ve written down. Click
&amp;#39;Open&amp;#39;. If a warning message box shows up press &amp;#39;OK&amp;#39;. If a message box
is encountered with the content &amp;quot;Do you want to continue the code
analysis?&amp;quot; - press &amp;#39;No&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/03a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;We
have successfully loaded the program. However the problem we face here
is that it is protected with Aspack 2.12 due to which we cannot see the
real code. To solve this, we are going to use OllyScript and the ASPack
2.12 OEP finder script. Go to the &amp;quot;Plugins&amp;#39; menu, and then to the
&amp;quot;OllyScript&amp;quot; submenu and select &amp;quot;Run Script&amp;quot;.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/04a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Look for the script and open it. The script will find the OEP (original entry point). If any window shows up dismiss it.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;Note:
We are now on the OEP. If you are an experienced user you can dump the
program using OllyDump to analyze the code with a disassembler. &lt;/div&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/05a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Right click over the code and a context menu will appear, select &amp;#39;Go to&amp;#39; and then &amp;#39;Expression&amp;#39; (or use the shortcut Ctrl+G).&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/06a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;In the text box enter the following value according to the Deep Freeze version you have installed and press OK. &lt;br /&gt;&lt;br /&gt;VERSION/VALUE&lt;br /&gt;4.20.020.0598 / 40368D &lt;br /&gt;4.20.120.0598 / 40368D&lt;br /&gt;4.20.121.0613 /&amp;nbsp;&amp;nbsp;&amp;nbsp;4034F5 &lt;br /&gt;5.20.220.1125 / 4037E9 &lt;br /&gt;5.30.120.1181 / 4037E9 &lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/07a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;The program will jump to the line of code.&lt;br /&gt;&lt;br /&gt;This
is the line from where the password verification procedure is called.
Let&amp;#39;s set a breakpoint here. To do that right click over the line and
in the context menu select &amp;#39;Breakpoint&amp;#39; and then &amp;#39;Toggle&amp;#39; (or press
F2). &lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/08a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;We
are almost done! Now let&amp;#39;s run this new Deep Freeze login program
instance. To do that press F9. If everything went right now you should
see two Deep Freeze icons on the system tray next to the clock. If Deep
Freeze was configured to hide it , instead of two icons you&amp;#39;ll see an
empty icon. &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;Note:
If the icon doesn&amp;#39;t show up is possible that you haven&amp;#39;t written the
argument three numbers correctly or that you haven&amp;#39;t opened the right
file. &lt;/div&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/09a.jpg&quot; border=&quot;0&quot; /&gt; &lt;img src=&quot;http://usera.imagecave.com/morpheus063/10a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Now
activate the login program by double clicking over the icon while you
keep the shift key pressed. If there are two icons, is important that
you click over the new icon and not over the old one. The login window
will appear asking for the password. Write anything in the password box
and press ENTER. The breakpoing we set earlier in Ollydbg will activate
and the login program will freeze. &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;Note: If the breakpoint doesn&amp;#39;t activate is possible that you&amp;#39;ve chosen the wrong icon. Try with the other one.&lt;/div&gt; &lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/11a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;On
Ollydbg press F8 to step over the function call. On the registers
window (to the right of the code) you&amp;#39;ll see that EAX register has the
value 00000000. That means the password is incorrect, let&amp;#39;s change
that. Double click over the value of EAX to open the modification
window. In the &amp;#39;Hexadecimal&amp;#39; text box write 1 and press OK.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/12a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/13a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Now press F9 to continue. If everything went right the Deep Freeze configuration dialog will show up.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://usera.imagecave.com/morpheus063/14a.jpg&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=37&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=37&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=37&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>General</category>
         <pubDate>Fri, 13 Jun 2008 10:38:50 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>National Security Association</title>
   <description>
    &lt;h2 class=&quot;title&quot;&gt;&lt;a href=&quot;http://ph33r.org/updates/2008/3/28/confronting-the-surveillance-society.html&quot;&gt;Confronting the Surveillance&amp;nbsp;Society&lt;/a&gt; &lt;/h2&gt;&lt;div class=&quot;body&quot;&gt;&lt;p align=&quot;left&quot; style=&quot;text-align: left&quot;&gt;&lt;span class=&quot;sizeGreater20&quot;&gt;&amp;nbsp;Outstanding talk by James Bamford author of &amp;ldquo;The Puzzle Palace&amp;rdquo; and &amp;ldquo;Body of Secrets&amp;rdquo; &amp;amp; Chris Calabrese Program Counsel of the ACLU Technology and Liberty Project.&lt;/span&gt; &lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&lt;object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0&quot; height=&quot;355&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;_cx&quot; value=&quot;11245&quot;&gt;&lt;/param&gt;&lt;param name=&quot;_cy&quot; value=&quot;9393&quot;&gt;&lt;/param&gt;&lt;param name=&quot;FlashVars&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Movie&quot; value=&quot;http://www.youtube.com/v/V0jZOaJ6gpk&amp;amp;hl=en&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Src&quot; value=&quot;http://www.youtube.com/v/V0jZOaJ6gpk&amp;amp;hl=en&quot;&gt;&lt;/param&gt;&lt;param name=&quot;WMode&quot; value=&quot;Window&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Play&quot; value=&quot;0&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Loop&quot; value=&quot;-1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Quality&quot; value=&quot;High&quot;&gt;&lt;/param&gt;&lt;param name=&quot;SAlign&quot; value=&quot;LT&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Menu&quot; value=&quot;0&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Base&quot;&gt;&lt;/param&gt;&lt;param name=&quot;AllowScriptAccess&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Scale&quot; value=&quot;NoScale&quot;&gt;&lt;/param&gt;&lt;param name=&quot;DeviceFont&quot; value=&quot;0&quot;&gt;&lt;/param&gt;&lt;param name=&quot;EmbedMovie&quot; value=&quot;0&quot;&gt;&lt;/param&gt;&lt;param name=&quot;BGColor&quot;&gt;&lt;/param&gt;&lt;param name=&quot;SWRemote&quot;&gt;&lt;/param&gt;&lt;param name=&quot;MovieData&quot;&gt;&lt;/param&gt;&lt;param name=&quot;SeamlessTabbing&quot; value=&quot;1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;Profile&quot; value=&quot;0&quot;&gt;&lt;/param&gt;&lt;param name=&quot;ProfileAddress&quot;&gt;&lt;/param&gt;&lt;param name=&quot;ProfilePort&quot; value=&quot;0&quot;&gt;&lt;/param&gt;&lt;param name=&quot;AllowNetworking&quot; value=&quot;all&quot;&gt;&lt;/param&gt;&lt;param name=&quot;AllowFullScreen&quot; value=&quot;false&quot;&gt;&lt;/param&gt;&lt;/object&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;See more @ &lt;a href=&quot;http://ph33r.org/&quot;&gt;http://ph33r.org/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=36&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=36&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=36&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>General</category>
         <pubDate>Sat, 12 Apr 2008 06:24:26 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>MySQL Common Part II</title>
   <description>
    &lt;p&gt;&lt;span style=&quot;font-size: medium&quot;&gt;&lt;strong&gt;Selecting a database:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; USE database;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Listing databases:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SHOW DATABASES;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Listing tables in a db:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SHOW TABLES;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Describing the format of a table:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; DESCRIBE table;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Creating a database:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; CREATE DATABASE db_name;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Creating a table:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; CREATE TABLE table_name (field1_name TYPE(SIZE), field2_name TYPE(SIZE));&lt;br /&gt;Ex: mysql&amp;gt; CREATE TABLE pet (name VARCHAR(20), sex CHAR(1), birth DATE);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Load tab-delimited data into a table:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; LOAD DATA LOCAL INFILE &amp;#39;infile.txt&amp;#39; INTO TABLE table_name;&lt;br /&gt;(Use n for NULL or n)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium&quot;&gt;Example: &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium&quot;&gt;mysql&amp;gt; LOAD DATA LOCAL INFILE &amp;#39;C:/menagerie-db/pet.txt&amp;#39; INTO TABLE pet;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium&quot;&gt;| Slim&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Benny&amp;nbsp; | snake&amp;nbsp;&amp;nbsp;&amp;nbsp; | m&amp;nbsp;&amp;nbsp;&amp;nbsp; | 1996-04-29 | NULL&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; | NULL&amp;nbsp;&amp;nbsp; | NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | NULL | NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;| Puffball | Daine&amp;nbsp; | hampster | f&amp;nbsp;&amp;nbsp;&amp;nbsp; | 1999-03-30 | NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Inserting one row at a time:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; INSERT INTO table_name VALUES (&amp;#39;MyName&amp;#39;, &amp;#39;MyOwner&amp;#39;, &amp;#39;2002-08-31&amp;#39;);&lt;br /&gt;(Use NULL for NULL)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Retrieving information (general):&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT from_columns FROM table WHERE conditions;&lt;br /&gt;All values: SELECT * FROM table;&lt;br /&gt;Some values: SELECT * FROM table WHERE rec_name = &amp;quot;value&amp;quot;;&lt;br /&gt;Multiple critera: SELECT * FROM TABLE WHERE rec1 = &amp;quot;value1&amp;quot; AND rec2 = &amp;quot;value2&amp;quot;;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Reloading a new data set into existing table:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SET AUTOCOMMIT=1; # used for quick recreation of table&lt;br /&gt;mysql&amp;gt; DELETE FROM pet;&lt;br /&gt;mysql&amp;gt; LOAD DATA LOCAL INFILE &amp;quot;infile.txt&amp;quot; INTO TABLE table;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Fixing all records with a certain value:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; UPDATE table SET column_name = &amp;quot;new_value&amp;quot; WHERE record_name = &amp;quot;value&amp;quot;;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Selecting specific columns:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT column_name FROM table;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Retrieving unique output records:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT DISTINCT column_name FROM table;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sorting:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT col1, col2 FROM table ORDER BY col2;&lt;br /&gt;Backwards: SELECT col1, col2 FROM table ORDER BY col2 DESC;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Date calculations:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT CURRENT_DATE, (YEAR(CURRENT_DATE)-YEAR(date_col)) AS time_diff [FROM table];&lt;br /&gt;MONTH(some_date) extracts the month value and DAYOFMONTH() extracts day.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Pattern Matching:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT * FROM table WHERE rec LIKE &amp;quot;blah%&amp;quot;;&lt;br /&gt;(% is wildcard - arbitrary # of chars)&lt;br /&gt;Find 5-char values: SELECT * FROM table WHERE rec like &amp;quot;_____&amp;quot;;&lt;br /&gt;(_ is any single character)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Extended Regular Expression Matching:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT * FROM table WHERE rec RLIKE &amp;quot;^b$&amp;quot;;&lt;br /&gt;(. for char, [...] for char class, * for 0 or more instances&lt;br /&gt;^ for beginning, {n} for repeat n times, and $ for end)&lt;br /&gt;(RLIKE or REGEXP)&lt;br /&gt;To force case-sensitivity, use &amp;quot;REGEXP BINARY&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Counting Rows:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT COUNT(*) FROM table;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Grouping with Counting:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT owner, COUNT(*) FROM table GROUP BY owner;&lt;br /&gt;(GROUP BY groups together all records for each &amp;#39;owner&amp;#39;)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Selecting from multiple tables:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;(Example)&lt;br /&gt;mysql&amp;gt; SELECT pet.name, comment FROM pet, event WHERE pet.name = event.name;&lt;br /&gt;(You can join a table to itself to compare by using &amp;#39;AS&amp;#39;)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Currently selected database:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT DATABASE();&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Maximum value:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; SELECT MAX(col_name) AS label FROM table;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Auto-incrementing rows:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; CREATE TABLE table (number INT NOT NULL AUTO_INCREMENT, name CHAR(10) NOT NULL);&lt;br /&gt;mysql&amp;gt; INSERT INTO table (name) VALUES (&amp;quot;tom&amp;quot;),(&amp;quot;dick&amp;quot;),(&amp;quot;harry&amp;quot;);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Adding a column to an already-created table:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; ALTER TABLE tbl ADD COLUMN [column_create syntax] AFTER col_name;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Removing a column:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;mysql&amp;gt; ALTER TABLE tbl DROP COLUMN col;&lt;br /&gt;(Full &lt;/span&gt;&lt;a href=&quot;http://www.mysql.com/doc/en/ALTER_TABLE.html&quot;&gt;&lt;span style=&quot;font-size: medium&quot;&gt;ALTER TABLE&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: medium&quot;&gt; syntax available at mysql.com.)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Batch mode (feeding in a script):&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;# mysql -u user -p &amp;lt; batch_file&lt;br /&gt;(Use -t for nice table layout and -vvv for command echoing.)&lt;br /&gt;Alternatively: mysql&amp;gt; source batch_file;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Backing up a database with mysqldump:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;# mysqldump --opt -u username -p database &amp;gt; database_backup.sql&lt;br /&gt;(Use &amp;#39;mysqldump --opt --all-databases &amp;gt; all_backup.sql&amp;#39; to backup everything.)&lt;br /&gt;(More info at &lt;/span&gt;&lt;a href=&quot;http://www.mysql.com/doc/en/mysqldump.html&quot;&gt;&lt;span style=&quot;font-size: medium&quot;&gt;MySQL&amp;#39;s docs&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: medium&quot;&gt;.)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium&quot;&gt;Download MySQL HERE - &lt;a href=&quot;http://dev.mysql.com/downloads/mysql/5.0.html&quot;&gt;http://dev.mysql.com/downloads/mysql/5.0.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=35&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=35&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=35&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>Databases</category>
         <pubDate>Mon, 10 Mar 2008 21:31:27 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>How To reset your TCP/IP protocol in windows</title>
   <description>
    &lt;h1 class=&quot;title&quot;&gt;How to reset Internet Protocol (TCP/IP) in Windows XP&lt;/h1&gt;&lt;div class=&quot;appliesToLink&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/kb/299357#appliesto&quot;&gt;View products that this article applies to.&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;articleProperty&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Article ID&lt;/td&gt;&lt;td&gt;:&lt;/td&gt;&lt;td&gt;299357&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Last Review&lt;/td&gt;&lt;td&gt;:&lt;/td&gt;&lt;td&gt;February 8, 2008&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Revision&lt;/td&gt;&lt;td&gt;:&lt;/td&gt;&lt;td&gt;7.0&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;notice&quot;&gt;This article was previously published under Q299357&lt;/div&gt;&lt;div class=&quot;notice&quot;&gt;&lt;div class=&quot;notice&quot;&gt;For a Windows Server 2003 version of this article, see &lt;a class=&quot;KBlink&quot; href=&quot;http://support.microsoft.com/kb/317518/&quot;&gt;317518&lt;/a&gt;&lt;span class=&quot;pLink&quot;&gt; (http://support.microsoft.com/kb/317518/)&lt;/span&gt;. &lt;/div&gt;&lt;/div&gt;&lt;noscript&gt;&lt;/noscript&gt;&lt;div class=&quot;section&quot;&gt;&lt;h2 class=&quot;subTitle&quot; id=&quot;tocHeadRef&quot;&gt;INTRODUCTION&lt;/h2&gt;&lt;div class=&quot;sbody&quot;&gt;In Windows XP, the TCP/IP stack is considered a core component of the operating system, and you cannot remove TCP/IP. Therefore, when you view the list of components for a network interface, you may notice that the Uninstall button is disabled when Internet Protocol (TCP/IP) is selected. In extreme cases, the best solution for this issue may be to reinstall the IP stack. But with the NetShell utility, you can reset the TCP/IP stack to restore it to its state that existed when the operating system was installed. This article describes how to use the NetShell utility for this purpose. &lt;p class=&quot;topOfPage&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/kb/299357#top&quot;&gt;&lt;img src=&quot;http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/uparrow.gif&quot; border=&quot;0&quot; width=&quot;28&quot; height=&quot;30&quot; /&gt;Back to the top&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h2 class=&quot;subTitle&quot; id=&quot;tocHeadRef&quot;&gt;MORE INFORMATION&lt;/h2&gt;&lt;div class=&quot;sbody&quot;&gt;&lt;h3 id=&quot;tocHeadRef&quot;&gt;Guided Help to reset TCP/IP&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img src=&quot;http://support.microsoft.com/library/images/support/kbgraphics/public/cn/acw_icon.gif&quot; border=&quot;0&quot; alt=&quot;Guided Help&quot; width=&quot;94&quot; height=&quot;30&quot; /&gt;&lt;/td&gt;&lt;td class=&quot;awbkg&quot;&gt;&lt;div class=&quot;indent&quot;&gt;Guided Help is available to reset TCP/IP. Guided Help can automatically perform the steps for you.&lt;br /&gt;&lt;br /&gt;The actions that this Guided Help performs cannot be undone after Guided Help is finished.&lt;/div&gt;For more information about Guided Help, click the following article number to view the article in the Microsoft Knowledge Base: &lt;div class=&quot;indent&quot;&gt;&lt;a class=&quot;KBlink&quot; href=&quot;http://support.microsoft.com/kb/915092/&quot;&gt;915092&lt;/a&gt;&lt;span class=&quot;pLink&quot;&gt; (http://support.microsoft.com/kb/915092/)&lt;/span&gt; Description of Guided Help for Microsoft Knowledge Base articles &lt;/div&gt;&lt;h4 id=&quot;tocHeadRef&quot;&gt;Requirements to install and to use this Guided Help&lt;/h4&gt;&lt;table class=&quot;list ul&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;bullet&quot;&gt;&amp;bull;&lt;/td&gt;&lt;td class=&quot;text&quot;&gt;You must be logged on to Windows by using a computer administrator account to install and to use this Guided Help.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;bullet&quot;&gt;&amp;bull;&lt;/td&gt;&lt;td class=&quot;text&quot;&gt;You must be running Windows XP Home Edition, Windows XP Professional, Windows XP Media Center Edition, or Windows XP Tablet PC Edition to install and to use this Guided Help.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;You must first download Guided Help. To start, click the following link. &lt;div class=&quot;AWlink&quot;&gt;&lt;a id=&quot;acwkblink&quot; href=&quot;http://support.microsoft.com/?scid=aw;en-us;299357&amp;amp;eula=1&quot;&gt;Download Guided Help&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class=&quot;pLink&quot;&gt;(http://support.microsoft.com/kb/299357/)&lt;/span&gt; To download Guided Help for another computer that does not have a working Internet connection, click &lt;strong class=&quot;uiterm&quot;&gt;Another Computer&lt;/strong&gt; when you are prompted by Guided Help. Save the Guided_Help.exe file to a removable medium, such as a USB flash drive. Insert the removable medium in the other computer, and then run the Guided_Help.exe program file.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3 id=&quot;tocHeadRef&quot;&gt;Manual method to reset TCP/IP&lt;/h3&gt;&lt;strong&gt;Note&lt;/strong&gt; This section is intended for advanced computer users. If you are not comfortable with advanced troubleshooting, ask someone for help or contact support. For information about how to contact support, see the Microsoft Help and Support contact information Web site: &lt;div class=&quot;indent&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/contactus&quot;&gt;http://support.microsoft.com/contactus&lt;/a&gt;&lt;span class=&quot;pLink&quot;&gt; (http://support.microsoft.com/contactus)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The NetShell utility (&lt;strong&gt;netsh&lt;/strong&gt;) is a command-line scripting interface for configuring and monitoring Windows XP networking. This tool provides an interactive network shell interface to the user.&lt;br /&gt;&lt;br /&gt;In Windows XP, a &lt;strong&gt;reset&lt;/strong&gt; command is available in the IP context of the NetShell utility. When you run the &lt;strong&gt;reset&lt;/strong&gt; command, it rewrites pertinent registry keys that are used by the IP (TCP/IP) stack to reach the same result as the removal and the reinstallation of the protocol. &lt;code&gt;&lt;pre class=&quot;code&quot;&gt;SYSTEMCurrentControlSetServicesTcpipParameters 
SYSTEMCurrentControlSetServicesDHCPParameters 
				&lt;/pre&gt;&lt;/code&gt;&lt;h4 id=&quot;tocHeadRef&quot;&gt;Command usage&lt;/h4&gt;&lt;div class=&quot;indent&quot;&gt;&lt;span class=&quot;userInput&quot;&gt;netsh int ip reset [&lt;var&gt;log_file_name&lt;/var&gt;]&lt;/span&gt;&lt;/div&gt;To manually run the command successfully, you must specify a file name for the log where actions that are taken by &lt;strong&gt;netsh&lt;/strong&gt; will be recorded. For example, at a command prompt, type either of the samples that are listed in the &amp;quot;Command samples&amp;quot; section. The TCP/IP stack will then be reset on a system, and the actions that were taken will be recorded in the log file, Resetlog.txt. The first sample creates the log file in the current directory, while the second sample creates a path where the log will reside. In either case, where the specified log file already exists, the new log will be appended to the end of the existing file. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Warning&lt;/strong&gt; Programs that access or monitor the Internet such as antivirus, firewall or proxy clients may be adversely affected when you run the &lt;strong&gt;netsh winsock reset&lt;/strong&gt; command. If you have a program that no longer functions correctly after you use this resolution, reinstall the program to restore functionality. &lt;h4 id=&quot;tocHeadRef&quot;&gt;Command samples&lt;/h4&gt;&lt;div class=&quot;indent&quot;&gt;&lt;strong&gt;netsh int ip reset resetlog.txt&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;netsh int ip reset c:resetlog.txt&lt;/strong&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=34&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=34&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=34&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>Windows</category>
         <pubDate>Sat, 08 Mar 2008 07:40:55 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>MYSQL Common Commands</title>
   <description>
    &lt;h4&gt;To login (from unix shell) use -h only if needed.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;[mysql dir]/bin/mysql -h hostname -u root -p&lt;/p&gt;&lt;h4&gt;Create a database on the sql server.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;create database [databasename];&lt;/p&gt;&lt;h4&gt;List all databases on the sql server.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;show databases;&lt;/p&gt;&lt;h4&gt;Switch to a database.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;use [db name];&lt;/p&gt;&lt;h4&gt;To see all the tables in the db.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;show tables;&lt;/p&gt;&lt;h4&gt;To see database&amp;#39;s field formats.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;describe [table name];&lt;/p&gt;&lt;h4&gt;To delete a db.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;drop database [database name];&lt;/p&gt;&lt;h4&gt;To delete a table.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;drop table [table name];&lt;/p&gt;&lt;h4&gt;Show all data in a table.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT * FROM [table name];&lt;/p&gt;&lt;h4&gt;Returns the columns and column information pertaining to the designated table.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;show columns from [table name];&lt;/p&gt;&lt;h4&gt;Show certain selected rows with the value &amp;quot;whatever&amp;quot;.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT * FROM [table name] WHERE [field name] = &amp;quot;whatever&amp;quot;;&lt;/p&gt;&lt;h4&gt;Show all records containing the name &amp;quot;Bob&amp;quot; AND the phone number &amp;#39;3444444&amp;#39;.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT * FROM [table name] WHERE name = &amp;quot;Bob&amp;quot; AND phone_number = &amp;#39;3444444&amp;#39;;&lt;/p&gt;&lt;h4&gt;Show all records not containing the name &amp;quot;Bob&amp;quot; AND the phone number &amp;#39;3444444&amp;#39; order by the phone_number field.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT * FROM [table name] WHERE name != &amp;quot;Bob&amp;quot; AND phone_number = &amp;#39;3444444&amp;#39; order by phone_number;&lt;/p&gt;&lt;h4&gt;Show all records starting with the letters &amp;#39;bob&amp;#39; AND the phone number &amp;#39;3444444&amp;#39;.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT * FROM [table name] WHERE name like &amp;quot;Bob%&amp;quot; AND phone_number = &amp;#39;3444444&amp;#39;;&lt;/p&gt;&lt;h4&gt;Use a regular expression to find records. Use &amp;quot;REGEXP BINARY&amp;quot; to force case-sensitivity. This finds any record beginning with a. &lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT * FROM [table name] WHERE rec RLIKE &amp;quot;^a$&amp;quot;;&lt;/p&gt;&lt;h4&gt;Show unique records.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT DISTINCT [column name] FROM [table name];&lt;/p&gt;&lt;h4&gt;Show selected records sorted in an ascending (asc) or descending (desc).&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT [col1],[col2] FROM [table name] ORDER BY [col2] DESC;&lt;/p&gt;&lt;h4&gt;Return number of rows.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT COUNT(*) FROM [table name];&lt;/p&gt;&lt;h4&gt;Sum column.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SELECT SUM(*) FROM [table name];&lt;/p&gt;&lt;h4&gt;Join tables on common columns.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;select lookup.illustrationid, lookup.personid,person.birthday from lookup&lt;br /&gt;left join person on lookup.personid=person.personid=statement to join birthday in person table with primary illustration id;&lt;/p&gt;&lt;h4&gt;Switch to the mysql db. Create a new user.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;INSERT INTO [table name] (Host,User,Password) VALUES(&amp;#39;%&amp;#39;,&amp;#39;user&amp;#39;,PASSWORD(&amp;#39;password&amp;#39;));&lt;/p&gt;&lt;h4&gt;Change a users password.(from unix shell).&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;[mysql dir]/bin/mysqladmin -u root -h hostname.blah.org -p password &amp;#39;new-password&amp;#39;&lt;/p&gt;&lt;h4&gt;Change a users password.(from MySQL prompt).&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;SET PASSWORD FOR &amp;#39;user&amp;#39;@&amp;#39;hostname&amp;#39; = PASSWORD(&amp;#39;passwordhere&amp;#39;);&lt;/p&gt;&lt;h4&gt;Allow the user &amp;quot;bob&amp;quot; to connect to the server from localhost using the password &amp;quot;passwd&amp;quot;&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;grant usage on *.* to bob@localhost identified by &amp;#39;passwd&amp;#39;;&lt;/p&gt;&lt;h4&gt;Switch to mysql db.Give user privilages for a db.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;INSERT INTO [table name] (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES (&amp;#39;%&amp;#39;,&amp;#39;databasename&amp;#39;,&amp;#39;username&amp;#39;,&amp;#39;Y&amp;#39;,&amp;#39;Y&amp;#39;,&amp;#39;Y&amp;#39;,&amp;#39;Y&amp;#39;,&amp;#39;Y&amp;#39;,&amp;#39;N&amp;#39;);&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;grant all privileges on databasename.* to username@localhost;&lt;/p&gt;&lt;h4&gt;To update info already in a table.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;UPDATE [table name] SET Select_priv = &amp;#39;Y&amp;#39;,Insert_priv = &amp;#39;Y&amp;#39;,Update_priv = &amp;#39;Y&amp;#39; where [field name] = &amp;#39;user&amp;#39;;&lt;/p&gt;&lt;h4&gt;Delete a row(s) from a table.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;DELETE from [table name] where [field name] = &amp;#39;whatever&amp;#39;;&lt;/p&gt;&lt;h4&gt;Update database permissions/privilages.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;FLUSH PRIVILEGES;&lt;/p&gt;&lt;h4&gt;Delete a column.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;alter table [table name] drop column [column name];&lt;/p&gt;&lt;h4&gt;Add a new column to db.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;alter table [table name] add column [new column name] varchar (20);&lt;/p&gt;&lt;h4&gt;Change column name.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;alter table [table name] change [old column name] [new column name] varchar (50);&lt;/p&gt;&lt;h4&gt;Make a unique column so you get no dupes.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;alter table [table name] add unique ([column name]);&lt;/p&gt;&lt;h4&gt;Make a column bigger.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;alter table [table name] modify [column name] VARCHAR(3);&lt;/p&gt;&lt;h4&gt;Delete unique from table.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;alter table [table name] drop index [colmn name];&lt;/p&gt;&lt;h4&gt;Load a CSV file into a table.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;LOAD DATA INFILE &amp;#39;/tmp/filename.csv&amp;#39; replace INTO TABLE [table name] FIELDS TERMINATED BY &amp;#39;,&amp;#39; LINES TERMINATED BY &amp;#39;n&amp;#39; (field1,field2,field3);&lt;/p&gt;&lt;h4&gt;Dump all databases for backup. Backup file is sql commands to recreate all db&amp;#39;s.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;[mysql dir]/bin/mysqldump -u root -ppassword --opt &amp;gt;/tmp/alldatabases.sql&lt;/p&gt;&lt;h4&gt;Dump one database for backup.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;[mysql dir]/bin/mysqldump -u username -ppassword --databases databasename &amp;gt;/tmp/databasename.sql&lt;/p&gt;&lt;h4&gt;Dump a table from a database.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;[mysql dir]/bin/mysqldump -c -u username -ppassword databasename tablename &amp;gt; /tmp/databasename.tablename.sql&lt;/p&gt;&lt;h4&gt;Restore database (or database table) from backup.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;[mysql dir]/bin/mysql -u username -ppassword databasename &amp;lt; /tmp/databasename.sql &lt;/p&gt;&lt;h4&gt;Create Table Example 1.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;CREATE TABLE [table name] (firstname VARCHAR(20), middleinitial VARCHAR(3), lastname VARCHAR(35),suffix VARCHAR(3),officeid VARCHAR(10),userid VARCHAR(15),username VARCHAR(8),email VARCHAR(35),phone VARCHAR(25), groups &lt;br /&gt;VARCHAR(15),datestamp DATE,timestamp time,pgpemail VARCHAR(255)); &lt;/p&gt;&lt;h4&gt;Create Table Example 2.&lt;/h4&gt;&lt;p class=&quot;command&quot;&gt;create table [table name] (personid int(50) not null auto_increment primary key,firstname varchar(35),middlename varchar(50),lastnamevarchar(50) default &amp;#39;bato&amp;#39;);&lt;/p&gt;&lt;div style=&quot;text-align: center&quot;&gt;&lt;p&gt;&lt;strong&gt;MYSQL Statements and clauses&lt;/strong&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;ALTER DATABASE&lt;br /&gt;&lt;br /&gt;ALTER TABLE&lt;br /&gt;&lt;br /&gt;ALTER VIEW&lt;br /&gt;&lt;br /&gt;ANALYZE TABLE&lt;br /&gt;&lt;br /&gt;BACKUP TABLE&lt;br /&gt;&lt;br /&gt;CACHE INDEX&lt;br /&gt;&lt;br /&gt;CHANGE MASTER TO&lt;br /&gt;&lt;br /&gt;CHECK TABLE&lt;br /&gt;&lt;br /&gt;CHECKSUM TABLE&lt;br /&gt;&lt;br /&gt;COMMIT&lt;br /&gt;&lt;br /&gt;CREATE DATABASE&lt;br /&gt;&lt;br /&gt;CREATE INDEX&lt;br /&gt;&lt;br /&gt;CREATE TABLE&lt;br /&gt;&lt;br /&gt;CREATE VIEW&lt;br /&gt;&lt;br /&gt;DELETE&lt;br /&gt;&lt;br /&gt;DESCRIBE&lt;br /&gt;&lt;br /&gt;DO&lt;br /&gt;&lt;br /&gt;DROP DATABASE&lt;br /&gt;&lt;br /&gt;DROP INDEX&lt;br /&gt;&lt;br /&gt;DROP TABLE&lt;br /&gt;&lt;br /&gt;DROP USER&lt;br /&gt;&lt;br /&gt;DROP VIEW&lt;br /&gt;&lt;br /&gt;EXPLAIN&lt;br /&gt;&lt;br /&gt;FLUSH&lt;br /&gt;&lt;br /&gt;GRANT&lt;br /&gt;&lt;br /&gt;HANDLER&lt;br /&gt;&lt;br /&gt;INSERT&lt;br /&gt;&lt;br /&gt;JOIN&lt;br /&gt;&lt;br /&gt;KILL&lt;br /&gt;&lt;br /&gt;LOAD DATA FROM MASTER&lt;br /&gt;&lt;br /&gt;LOAD DATA INFILE&lt;br /&gt;&lt;br /&gt;LOAD INDEX INTO CACHE&lt;br /&gt;&lt;br /&gt;LOAD TABLE...FROM MASTER&lt;br /&gt;&lt;br /&gt;LOCK TABLES&lt;br /&gt;&lt;br /&gt;OPTIMIZE TABLE&lt;br /&gt;&lt;br /&gt;PURGE MASTER LOGS&lt;br /&gt;&lt;br /&gt;RENAME TABLE&lt;br /&gt;&lt;br /&gt;REPAIR TABLE&lt;br /&gt;&lt;br /&gt;REPLACE&lt;br /&gt;&lt;br /&gt;RESET&lt;br /&gt;&lt;br /&gt;RESET MASTER&lt;br /&gt;&lt;br /&gt;RESET SLAVE&lt;br /&gt;&lt;br /&gt;RESTORE TABLE&lt;br /&gt;&lt;br /&gt;REVOKE&lt;br /&gt;&lt;br /&gt;ROLLBACK&lt;br /&gt;&lt;br /&gt;ROLLBACK TO SAVEPOINT&lt;br /&gt;&lt;br /&gt;SAVEPOINT&lt;br /&gt;&lt;br /&gt;SELECT&lt;br /&gt;&lt;br /&gt;SET&lt;br /&gt;&lt;br /&gt;SET PASSWORD&lt;br /&gt;&lt;br /&gt;SET SQL_LOG_BIN&lt;br /&gt;&lt;br /&gt;SET TRANSACTION&lt;br /&gt;&lt;br /&gt;SHOW BINLOG EVENTS&lt;br /&gt;&lt;br /&gt;SHOW CHARACTER SET&lt;br /&gt;&lt;br /&gt;SHOW COLLATION&lt;br /&gt;&lt;br /&gt;SHOW COLUMNS&lt;br /&gt;&lt;br /&gt;SHOW CREATE DATABASE&lt;br /&gt;&lt;br /&gt;SHOW CREATE TABLE&lt;br /&gt;&lt;br /&gt;SHOW CREATE VIEW&lt;br /&gt;&lt;br /&gt;SHOW DATABASES&lt;br /&gt;&lt;br /&gt;SHOW ENGINES&lt;br /&gt;&lt;br /&gt;SHOW ERRORS&lt;br /&gt;&lt;br /&gt;SHOW GRANTS&lt;br /&gt;&lt;br /&gt;SHOW INDEX&lt;br /&gt;&lt;br /&gt;SHOW INNODB STATUS&lt;br /&gt;&lt;br /&gt;SHOW LOGS&lt;br /&gt;&lt;br /&gt;SHOW MASTER LOGS&lt;br /&gt;&lt;br /&gt;SHOW MASTER STATUS&lt;br /&gt;&lt;br /&gt;SHOW PRIVILEGES&lt;br /&gt;&lt;br /&gt;SHOW PROCESSLIST&lt;br /&gt;&lt;br /&gt;SHOW SLAVE HOSTS&lt;br /&gt;&lt;br /&gt;SHOW SLAVE STATUS&lt;br /&gt;&lt;br /&gt;SHOW STATUS&lt;br /&gt;&lt;br /&gt;SHOW TABLE STATUS&lt;br /&gt;&lt;br /&gt;SHOW TABLES&lt;br /&gt;&lt;br /&gt;SHOW VARIABLES&lt;br /&gt;&lt;br /&gt;SHOW WARNINGS&lt;br /&gt;&lt;br /&gt;START SLAVE&lt;br /&gt;&lt;br /&gt;START TRANSACTION&lt;br /&gt;&lt;br /&gt;STOP SLAVE&lt;br /&gt;&lt;br /&gt;TRUNCATE TABLE&lt;br /&gt;&lt;br /&gt;UNION&lt;br /&gt;&lt;br /&gt;UNLOCK TABLES&lt;br /&gt;&lt;br /&gt;USE&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;String Functions&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;AES_DECRYPT&lt;br /&gt;&lt;br /&gt;AES_ENCRYPT&lt;br /&gt;&lt;br /&gt;ASCII&lt;br /&gt;&lt;br /&gt;BIN&lt;br /&gt;&lt;br /&gt;BINARY&lt;br /&gt;&lt;br /&gt;BIT_LENGTH&lt;br /&gt;&lt;br /&gt;CHAR&lt;br /&gt;&lt;br /&gt;CHAR_LENGTH&lt;br /&gt;&lt;br /&gt;CHARACTER_LENGTH&lt;br /&gt;&lt;br /&gt;COMPRESS&lt;br /&gt;&lt;br /&gt;CONCAT&lt;br /&gt;&lt;br /&gt;CONCAT_WS&lt;br /&gt;&lt;br /&gt;CONV&lt;br /&gt;&lt;br /&gt;DECODE&lt;br /&gt;&lt;br /&gt;DES_DECRYPT&lt;br /&gt;&lt;br /&gt;DES_ENCRYPT&lt;br /&gt;&lt;br /&gt;ELT&lt;br /&gt;&lt;br /&gt;ENCODE&lt;br /&gt;&lt;br /&gt;ENCRYPT&lt;br /&gt;&lt;br /&gt;EXPORT_SET&lt;br /&gt;&lt;br /&gt;FIELD&lt;br /&gt;&lt;br /&gt;FIND_IN_SET&lt;br /&gt;&lt;br /&gt;HEX&lt;br /&gt;&lt;br /&gt;INET_ATON&lt;br /&gt;&lt;br /&gt;INET_NTOA&lt;br /&gt;&lt;br /&gt;INSERT&lt;br /&gt;&lt;br /&gt;INSTR&lt;br /&gt;&lt;br /&gt;LCASE&lt;br /&gt;&lt;br /&gt;LEFT&lt;br /&gt;&lt;br /&gt;LENGTH&lt;br /&gt;&lt;br /&gt;LOAD_FILE&lt;br /&gt;&lt;br /&gt;LOCATE&lt;br /&gt;&lt;br /&gt;LOWER&lt;br /&gt;&lt;br /&gt;LPAD&lt;br /&gt;&lt;br /&gt;LTRIM&lt;br /&gt;&lt;br /&gt;MAKE_SET&lt;br /&gt;&lt;br /&gt;MATCH    AGAINST&lt;br /&gt;&lt;br /&gt;MD5&lt;br /&gt;&lt;br /&gt;MID&lt;br /&gt;&lt;br /&gt;OCT&lt;br /&gt;&lt;br /&gt;OCTET_LENGTH&lt;br /&gt;&lt;br /&gt;OLD_PASSWORD&lt;br /&gt;&lt;br /&gt;ORD&lt;br /&gt;&lt;br /&gt;PASSWORD&lt;br /&gt;&lt;br /&gt;POSITION&lt;br /&gt;&lt;br /&gt;QUOTE&lt;br /&gt;&lt;br /&gt;REPEAT&lt;br /&gt;&lt;br /&gt;REPLACE&lt;br /&gt;&lt;br /&gt;REVERSE&lt;br /&gt;&lt;br /&gt;RIGHT&lt;br /&gt;&lt;br /&gt;RPAD&lt;br /&gt;&lt;br /&gt;RTRIM&lt;br /&gt;&lt;br /&gt;SHA&lt;br /&gt;&lt;br /&gt;SHA1&lt;br /&gt;&lt;br /&gt;SOUNDEX&lt;br /&gt;&lt;br /&gt;SPACE&lt;br /&gt;&lt;br /&gt;STRCMP&lt;br /&gt;&lt;br /&gt;SUBSTRING&lt;br /&gt;&lt;br /&gt;SUBSTRING_INDEX&lt;br /&gt;&lt;br /&gt;TRIM&lt;br /&gt;&lt;br /&gt;UCASE&lt;br /&gt;&lt;br /&gt;UNCOMPRESS&lt;br /&gt;&lt;br /&gt;UNCOMPRESSED_LENGTH&lt;br /&gt;&lt;br /&gt;UNHEX&lt;br /&gt;&lt;br /&gt;UPPER&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;Date and Time Functions&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;ADDDATE&lt;br /&gt;&lt;br /&gt;ADDTIME&lt;br /&gt;&lt;br /&gt;CONVERT_TZ&lt;br /&gt;&lt;br /&gt;CURDATE&lt;br /&gt;&lt;br /&gt;CURRENT_DATE&lt;br /&gt;&lt;br /&gt;CURRENT_TIME&lt;br /&gt;&lt;br /&gt;CURRENT_TIMESTAMP&lt;br /&gt;&lt;br /&gt;CURTIME&lt;br /&gt;&lt;br /&gt;DATE&lt;br /&gt;&lt;br /&gt;DATE_ADD&lt;br /&gt;&lt;br /&gt;DATE_FORMAT&lt;br /&gt;&lt;br /&gt;DATE_SUB&lt;br /&gt;&lt;br /&gt;DATEDIFF&lt;br /&gt;&lt;br /&gt;DAY&lt;br /&gt;&lt;br /&gt;DAYNAME&lt;br /&gt;&lt;br /&gt;DAYOFMONTH&lt;br /&gt;&lt;br /&gt;DAYOFWEEK&lt;br /&gt;&lt;br /&gt;DAYOFYEAR&lt;br /&gt;&lt;br /&gt;EXTRACT&lt;br /&gt;&lt;br /&gt;FROM_DAYS&lt;br /&gt;&lt;br /&gt;FROM_UNIXTIME&lt;br /&gt;&lt;br /&gt;GET_FORMAT&lt;br /&gt;&lt;br /&gt;HOUR&lt;br /&gt;&lt;br /&gt;LAST_DAY&lt;br /&gt;&lt;br /&gt;LOCALTIME&lt;br /&gt;&lt;br /&gt;LOCALTIMESTAMP&lt;br /&gt;&lt;br /&gt;MAKEDATE&lt;br /&gt;&lt;br /&gt;MAKETIME&lt;br /&gt;&lt;br /&gt;MICROSECOND&lt;br /&gt;&lt;br /&gt;MINUTE&lt;br /&gt;&lt;br /&gt;MONTH&lt;br /&gt;&lt;br /&gt;MONTHNAME&lt;br /&gt;&lt;br /&gt;NOW&lt;br /&gt;&lt;br /&gt;PERIOD_ADD&lt;br /&gt;&lt;br /&gt;PERIOD_DIFF&lt;br /&gt;&lt;br /&gt;QUARTER&lt;br /&gt;&lt;br /&gt;SEC_TO_TIME&lt;br /&gt;&lt;br /&gt;SECOND&lt;br /&gt;&lt;br /&gt;STR_TO_DATE&lt;br /&gt;&lt;br /&gt;SUBDATE&lt;br /&gt;&lt;br /&gt;SUBTIME&lt;br /&gt;&lt;br /&gt;SYSDATE&lt;br /&gt;&lt;br /&gt;TIME&lt;br /&gt;&lt;br /&gt;TIMEDIFF&lt;br /&gt;&lt;br /&gt;TIMESTAMP&lt;br /&gt;&lt;br /&gt;TIMESTAMPDIFF&lt;br /&gt;&lt;br /&gt;TIMESTAMPADD&lt;br /&gt;&lt;br /&gt;TIME_FORMAT&lt;br /&gt;&lt;br /&gt;TIME_TO_SEC&lt;br /&gt;&lt;br /&gt;TO_DAYS&lt;br /&gt;&lt;br /&gt;UNIX_TIMESTAMP&lt;br /&gt;&lt;br /&gt;UTC_DATE&lt;br /&gt;&lt;br /&gt;UTC_TIME&lt;br /&gt;&lt;br /&gt;UTC_TIMESTAMP&lt;br /&gt;&lt;br /&gt;WEEK&lt;br /&gt;&lt;br /&gt;WEEKDAY&lt;br /&gt;&lt;br /&gt;WEEKOFYEAR&lt;br /&gt;&lt;br /&gt;YEAR&lt;br /&gt;&lt;br /&gt;YEARWEEK&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;Mathematical and Aggregate Functions&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;ABS&lt;br /&gt;&lt;br /&gt;ACOS&lt;br /&gt;&lt;br /&gt;ASIN&lt;br /&gt;&lt;br /&gt;ATAN&lt;br /&gt;&lt;br /&gt;ATAN2&lt;br /&gt;&lt;br /&gt;AVG&lt;br /&gt;&lt;br /&gt;BIT_AND&lt;br /&gt;&lt;br /&gt;BIT_OR&lt;br /&gt;&lt;br /&gt;BIT_XOR&lt;br /&gt;&lt;br /&gt;CEIL&lt;br /&gt;&lt;br /&gt;CEILING&lt;br /&gt;&lt;br /&gt;COS&lt;br /&gt;&lt;br /&gt;COT&lt;br /&gt;&lt;br /&gt;COUNT&lt;br /&gt;&lt;br /&gt;CRC32&lt;br /&gt;&lt;br /&gt;DEGREES&lt;br /&gt;&lt;br /&gt;EXP&lt;br /&gt;&lt;br /&gt;FLOOR&lt;br /&gt;&lt;br /&gt;FORMAT&lt;br /&gt;&lt;br /&gt;GREATEST&lt;br /&gt;&lt;br /&gt;GROUP_CONCAT&lt;br /&gt;&lt;br /&gt;LEAST&lt;br /&gt;&lt;br /&gt;LN&lt;br /&gt;&lt;br /&gt;LOG&lt;br /&gt;&lt;br /&gt;LOG2&lt;br /&gt;&lt;br /&gt;LOG10&lt;br /&gt;&lt;br /&gt;MAX&lt;br /&gt;&lt;br /&gt;MIN&lt;br /&gt;&lt;br /&gt;MOD&lt;br /&gt;&lt;br /&gt;PI&lt;br /&gt;&lt;br /&gt;POW&lt;br /&gt;&lt;br /&gt;POWER&lt;br /&gt;&lt;br /&gt;RADIANS&lt;br /&gt;&lt;br /&gt;RAND&lt;br /&gt;&lt;br /&gt;ROUND&lt;br /&gt;&lt;br /&gt;SIGN&lt;br /&gt;&lt;br /&gt;SIN&lt;br /&gt;&lt;br /&gt;SQRT&lt;br /&gt;&lt;br /&gt;STD&lt;br /&gt;&lt;br /&gt;STDDEV&lt;br /&gt;&lt;br /&gt;SUM&lt;br /&gt;&lt;br /&gt;TAN&lt;br /&gt;&lt;br /&gt;TRUNCATE&lt;br /&gt;&lt;br /&gt;VARIANCE&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;Flow Control Functions&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;CASE&lt;br /&gt;&lt;br /&gt;IF&lt;br /&gt;&lt;br /&gt;IFNULL&lt;br /&gt;&lt;br /&gt;NULLIF&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;Command-Line Utilities&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;comp_err&lt;br /&gt;&lt;br /&gt;isamchk&lt;br /&gt;&lt;br /&gt;make_binary_distribution&lt;br /&gt;&lt;br /&gt;msql2mysql&lt;br /&gt;&lt;br /&gt;my_print_defaults&lt;br /&gt;&lt;br /&gt;myisamchk&lt;br /&gt;&lt;br /&gt;myisamlog&lt;br /&gt;&lt;br /&gt;myisampack&lt;br /&gt;&lt;br /&gt;mysqlaccess&lt;br /&gt;&lt;br /&gt;mysqladmin&lt;br /&gt;&lt;br /&gt;mysqlbinlog&lt;br /&gt;&lt;br /&gt;mysqlbug&lt;br /&gt;&lt;br /&gt;mysqlcheck&lt;br /&gt;&lt;br /&gt;mysqldump&lt;br /&gt;&lt;br /&gt;mysqldumpslow&lt;br /&gt;&lt;br /&gt;mysqlhotcopy&lt;br /&gt;&lt;br /&gt;mysqlimport&lt;br /&gt;&lt;br /&gt;mysqlshow&lt;br /&gt;&lt;br /&gt;perror&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;Perl API - using functions and methods built into the Perl DBI with MySQL&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;available_drivers&lt;br /&gt;&lt;br /&gt;begin_work&lt;br /&gt;&lt;br /&gt;bind_col&lt;br /&gt;&lt;br /&gt;bind_columns&lt;br /&gt;&lt;br /&gt;bind_param&lt;br /&gt;&lt;br /&gt;bind_param_array&lt;br /&gt;&lt;br /&gt;bind_param_inout&lt;br /&gt;&lt;br /&gt;can&lt;br /&gt;&lt;br /&gt;clone&lt;br /&gt;&lt;br /&gt;column_info&lt;br /&gt;&lt;br /&gt;commit&lt;br /&gt;&lt;br /&gt;connect&lt;br /&gt;&lt;br /&gt;connect_cached&lt;br /&gt;&lt;br /&gt;data_sources&lt;br /&gt;&lt;br /&gt;disconnect&lt;br /&gt;&lt;br /&gt;do&lt;br /&gt;&lt;br /&gt;dump_results&lt;br /&gt;&lt;br /&gt;err&lt;br /&gt;&lt;br /&gt;errstr&lt;br /&gt;&lt;br /&gt;execute&lt;br /&gt;&lt;br /&gt;execute_array&lt;br /&gt;&lt;br /&gt;execute_for_fetch&lt;br /&gt;&lt;br /&gt;fetch&lt;br /&gt;&lt;br /&gt;fetchall_arrayref&lt;br /&gt;&lt;br /&gt;fetchall_hashref&lt;br /&gt;&lt;br /&gt;fetchrow_array&lt;br /&gt;&lt;br /&gt;fetchrow_arrayref&lt;br /&gt;&lt;br /&gt;fetchrow_hashref&lt;br /&gt;&lt;br /&gt;finish&lt;br /&gt;&lt;br /&gt;foreign_key_info&lt;br /&gt;&lt;br /&gt;func&lt;br /&gt;&lt;br /&gt;get_info&lt;br /&gt;&lt;br /&gt;installed_versions&lt;br /&gt;&lt;br /&gt;last_insert_id&lt;br /&gt;&lt;br /&gt;looks_like_number&lt;br /&gt;&lt;br /&gt;neat&lt;br /&gt;&lt;br /&gt;neat_list&lt;br /&gt;&lt;br /&gt;parse_dsn&lt;br /&gt;&lt;br /&gt;parse_trace_flag&lt;br /&gt;&lt;br /&gt;parse_trace_flags&lt;br /&gt;&lt;br /&gt;ping&lt;br /&gt;&lt;br /&gt;prepare&lt;br /&gt;&lt;br /&gt;prepare_cached&lt;br /&gt;&lt;br /&gt;primary_key&lt;br /&gt;&lt;br /&gt;primary_key_info&lt;br /&gt;&lt;br /&gt;quote&lt;br /&gt;&lt;br /&gt;quote_identifier&lt;br /&gt;&lt;br /&gt;rollback&lt;br /&gt;&lt;br /&gt;rows&lt;br /&gt;&lt;br /&gt;selectall_arrayref&lt;br /&gt;&lt;br /&gt;selectall_hashref&lt;br /&gt;&lt;br /&gt;selectcol_arrayref&lt;br /&gt;&lt;br /&gt;selectrow_array&lt;br /&gt;&lt;br /&gt;selectrow_arrayref&lt;br /&gt;&lt;br /&gt;selectrow_hashref&lt;br /&gt;&lt;br /&gt;set_err&lt;br /&gt;&lt;br /&gt;state&lt;br /&gt;&lt;br /&gt;table_info&lt;br /&gt;&lt;br /&gt;table_info_all&lt;br /&gt;&lt;br /&gt;tables&lt;br /&gt;&lt;br /&gt;trace&lt;br /&gt;&lt;br /&gt;trace_msg&lt;br /&gt;&lt;br /&gt;type_info&lt;br /&gt;&lt;br /&gt;type_info_all&lt;br /&gt;&lt;br /&gt;Attributes for Handles&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;PHP API - using functions built into PHP with MySQL&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;mysql_affected_rows&lt;br /&gt;&lt;br /&gt;mysql_change_user&lt;br /&gt;&lt;br /&gt;mysql_client_encoding&lt;br /&gt;&lt;br /&gt;mysql_close&lt;br /&gt;&lt;br /&gt;mysql_connect&lt;br /&gt;&lt;br /&gt;mysql_create_db&lt;br /&gt;&lt;br /&gt;mysql_data_seek&lt;br /&gt;&lt;br /&gt;mysql_db_name&lt;br /&gt;&lt;br /&gt;mysql_db_query&lt;br /&gt;&lt;br /&gt;mysql_drop_db&lt;br /&gt;&lt;br /&gt;mysql_errno&lt;br /&gt;&lt;br /&gt;mysql_error&lt;br /&gt;&lt;br /&gt;mysql_escape_string&lt;br /&gt;&lt;br /&gt;mysql_fetch_array&lt;br /&gt;&lt;br /&gt;mysql_fetch_assoc&lt;br /&gt;&lt;br /&gt;mysql_fetch_field&lt;br /&gt;&lt;br /&gt;mysql_fetch_lengths&lt;br /&gt;&lt;br /&gt;mysql_fetch_object&lt;br /&gt;&lt;br /&gt;mysql_fetch_row&lt;br /&gt;&lt;br /&gt;mysql_field_flags&lt;br /&gt;&lt;br /&gt;mysql_field_len&lt;br /&gt;&lt;br /&gt;mysql_field_name&lt;br /&gt;&lt;br /&gt;mysql_field_seek&lt;br /&gt;&lt;br /&gt;mysql_field_table&lt;br /&gt;&lt;br /&gt;mysql_field_type&lt;br /&gt;&lt;br /&gt;mysql_free_result&lt;br /&gt;&lt;br /&gt;mysql_get_client_info&lt;br /&gt;&lt;br /&gt;mysql_get_host_info&lt;br /&gt;&lt;br /&gt;mysql_get_proto_info&lt;br /&gt;&lt;br /&gt;mysql_get_server_info&lt;br /&gt;&lt;br /&gt;mysql_info&lt;br /&gt;&lt;br /&gt;mysql_insert_id&lt;br /&gt;&lt;br /&gt;mysql_list_dbs&lt;br /&gt;&lt;br /&gt;mysql_list_fields&lt;br /&gt;&lt;br /&gt;mysql_list_processes&lt;br /&gt;&lt;br /&gt;mysql_list_tables&lt;br /&gt;&lt;br /&gt;mysql_num_fields&lt;br /&gt;&lt;br /&gt;mysql_num_rows&lt;br /&gt;&lt;br /&gt;mysql_pconnect&lt;br /&gt;&lt;br /&gt;mysql_ping&lt;br /&gt;&lt;br /&gt;mysql_query&lt;br /&gt;&lt;br /&gt;mysql_real_escape_string&lt;br /&gt;&lt;br /&gt;mysql_result&lt;br /&gt;&lt;br /&gt;mysql_select_db&lt;br /&gt;&lt;br /&gt;mysql_stat&lt;br /&gt;&lt;br /&gt;mysql_tablename&lt;br /&gt;&lt;br /&gt;mysql_thread_id&lt;br /&gt;&lt;br /&gt;mysql_unbuffered_query&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=33&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=33&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=33&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>Databases</category>
         <pubDate>Mon, 18 Feb 2008 10:03:28 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>Stop SSH User Hacking / Cracking Attacks with DenyHosts Software</title>
   <description>
    &lt;h1&gt;&lt;a href=&quot;http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/&quot; title=&quot;Permanent Link to Debian Linux Stop SSH User Hacking / Cracking Attacks with DenyHosts Software&quot; rel=&quot;bookmark&quot;&gt;Debian Linux Stop SSH User Hacking / Cracking Attacks with DenyHosts Software&lt;/a&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;Q. &lt;/span&gt;I&amp;rsquo;ve noticed lots of
failed login attempt for my Debian Linux VPS root server account. How
do I stop automated bot based SSH attacks on my server? &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #009900&quot;&gt;A. &lt;/span&gt;You can use DenyHosts - a &lt;a class=&quot;tfTextLink&quot;&gt;Python&lt;/a&gt;
based script that analyzes the sshd server log messages to determine
what hosts are attempting to hack into your system. It is an utility to
help sys admins thwart ssh crackers. It also determines what user
accounts are being &lt;a class=&quot;tfTextLink&quot;&gt;targeted&lt;/a&gt;.
It keeps track of the frequency of atempts from each host. It will
automatically blocks ssh attacks by adding entries to /etc/hosts.deny.
DenyHosts will also inform Linux administrators about offending hosts,
attacked users and suspicious logins. Step # 1: Make Sure &lt;a class=&quot;tfTextLink&quot;&gt;Python&lt;/a&gt; is installed&lt;/p&gt;


&lt;p&gt;First, make sure python is installed under Debian / Ubuntu Linux:&lt;br /&gt;
&lt;code&gt;# dpkg --list | grep python2&lt;/code&gt;&lt;br /&gt;
Find out version (DenyHosts requires 2.3 or above version)&lt;br /&gt;
&lt;code&gt;$ python -V&lt;/code&gt;&lt;br /&gt;
Output:&lt;br /&gt;
&lt;code&gt;Python 2.5.1&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;Step # 2: Download DenyHosts&lt;/h2&gt;

&lt;p&gt;Visit official project home page to &lt;a href=&quot;http://denyhosts.sourceforge.net/&quot;&gt;grab latest source code or packages&lt;/a&gt;.  Use apt-get command under Debian / Ubuntu Linux, enter&lt;br /&gt;
&lt;code&gt;$ sudo apt-get install denyhost&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;DenyHosts configuration - /etc/denyhosts.conf&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The default configuration file is &lt;strong&gt;/etc/denyhosts.conf&lt;/strong&gt;. &lt;/li&gt;&lt;li&gt;You also need to create / update a whitelist in &lt;strong&gt;/etc/hosts.allow&lt;/strong&gt;.
For example, if you have static IP assigned by ISP, enter in this file.
You can add all the important hosts that you never want blocked.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Step # 1: Setup  a whitelist&lt;/h3&gt;

&lt;p&gt;Open /etc/hosts.allow:&lt;br /&gt;
&lt;code&gt;# vi /etc/hosts.allow&lt;/code&gt;&lt;br /&gt;
Allow sshd from 202.54.1.2 i.e. you never want to block yourself&lt;br /&gt;
&lt;code&gt;sshd: 202.54.1.2&lt;/code&gt;&lt;br /&gt;
Save and close the file. Verify and examines your tcp wrapper configuration file and reports all potential and real problems:&lt;br /&gt;
&lt;code&gt;# tcpdchk -v&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;Step # 1: Configure  DenyHosts&lt;/h3&gt;

&lt;p&gt;Open default configuration file - /etc/denyhosts.conf, enter:&lt;br /&gt;
&lt;code&gt;# vi /etc/denyhosts.conf&lt;/code&gt;&lt;br /&gt;
Setup your email ID so you would receive emails regarding newly
restricted hosts and suspicious logins, set this address to match your
email address.&lt;br /&gt;
&lt;code&gt;ADMIN_EMAIL = vivek@nixcraft.com&lt;/code&gt;&lt;br /&gt;
Save and close the file. Here is my own sample configuration file for
Debian Linux 4.0 server (config file is documented very well, just open
and read it):&lt;/p&gt;

&lt;pre&gt;############ THESE SETTINGS ARE REQUIRED ############&lt;br /&gt;SECURE_LOG = /var/log/auth.log&lt;br /&gt;HOSTS_DENY = /etc/hosts.deny&lt;br /&gt;PURGE_DENY =&lt;br /&gt;BLOCK_SERVICE  = sshd&lt;br /&gt;DENY_THRESHOLD_INVALID = 5&lt;br /&gt;DENY_THRESHOLD_VALID = 10&lt;br /&gt;DENY_THRESHOLD_ROOT = 1&lt;br /&gt;DENY_THRESHOLD_RESTRICTED = 1&lt;br /&gt;WORK_DIR = /var/lib/denyhosts&lt;br /&gt;SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES&lt;br /&gt;HOSTNAME_LOOKUP=YES&lt;br /&gt;LOCK_FILE = /var/run/denyhosts.pid&lt;br /&gt;############ THESE SETTINGS ARE OPTIONAL ############&lt;br /&gt;ADMIN_EMAIL = vivek@nixcraft.com&lt;br /&gt;SMTP_HOST = localhost&lt;br /&gt;SMTP_PORT = 25&lt;br /&gt;SMTP_FROM = DenyHosts &lt;br /&gt;SMTP_SUBJECT = DenyHosts Report&lt;br /&gt;AGE_RESET_VALID=5d&lt;br /&gt;AGE_RESET_ROOT=25d&lt;br /&gt;AGE_RESET_RESTRICTED=25d&lt;br /&gt;AGE_RESET_INVALID=10d&lt;br /&gt;######### THESE SETTINGS ARE SPECIFIC TO DAEMON MODE  ##########&lt;br /&gt;DAEMON_LOG = /var/log/denyhosts&lt;br /&gt;DAEMON_SLEEP = 30s&lt;br /&gt;DAEMON_PURGE = 1h&lt;/pre&gt;

&lt;p&gt;Restart the daemon:&lt;br /&gt;
&lt;code&gt;# /etc/init.d/denyhosts restart&lt;/code&gt;&lt;/p&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=32&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=32&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=32&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>Linux</category>
         <pubDate>Sun, 17 Feb 2008 17:50:01 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>Linux Text Editor: Vi</title>
   <description>
    &lt;span&gt;
The vi editor comes with every version of Linux or Unix. It&amp;#39;s a
terribly unfriendly beast of an editor, but you should know about it
because someday you&amp;#39;re likely to find yourself on a system where you
have no other choice but to use it. A friend of mine calls vi the
Heart of E&lt;strong&gt;vi&lt;/strong&gt;l, but that might be just a bit harsh--you decide&lt;table bgcolor=&quot;#ffffff&quot; border=&quot;0&quot; cellpadding=&quot;10&quot;&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td width=&quot;350&quot;&gt;&amp;nbsp;&lt;/td&gt;

&lt;td width=&quot;350&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Using vi is similar to using other editors in that you can see your
file on the screen (this is not the case with a line editor, for
example), move from point to point in the file, and make changes. But
that&amp;#39;s where the similarities end. Cryptic commands, a
frustrating user interface, and the absence of prompts can all drive
you up a wall. Still, if you focus on a few basics, you&amp;#39;ll get the job
done.

&lt;p&gt;&lt;span style=&quot;font-family: New York&quot;&gt;&lt;strong&gt;&lt;em&gt;Command and Input Mode&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The hardest thing to understand about vi is the concept of modes. When using vi,&lt;strong&gt; &lt;/strong&gt;you&amp;#39;re always in either Command or Input mode.
Unfortunately there&amp;#39;s no clue as to which mode is currently active. In Command mode, you can move the cursor, search for
characters, and delete existing text. But to enter or edit new text, you have to switch to Input mode. &lt;/p&gt;

&lt;p&gt;When you start vi, you&amp;#39;re in Command mode. To enter Input mode, type the letter &lt;strong&gt;a&lt;/strong&gt; (lowercase only) to signal that you want to add
text after the cursor position. Press &lt;strong&gt;esc&lt;/strong&gt; to switch back to Command mode at any time.&lt;/p&gt;

&lt;p&gt;Here&amp;#39;s how to create a file from scratch using vi. To start, create a new file named &lt;strong&gt;cow.joke&lt;/strong&gt; by typing&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;&lt;strong&gt;vi cow.joke&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt; You&amp;#39;ll see a screen that looks like this:&lt;/p&gt;

&lt;table border=&quot;1&quot; width=&quot;75%&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;|&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;&amp;quot;cow.joke&amp;quot; [New file]&lt;/span&gt;&lt;/p&gt;

&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;span style=&quot;font-family: New York&quot;&gt;&lt;strong&gt;&lt;em&gt;Adding New Text to Your File &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Your cursor (the vertical bar at the top of the figure below is in
the upper-left corner of the screen, and the message at the bottom
tells you
that a new file called &lt;strong&gt;cow.joke&lt;/strong&gt; was just created. The tilde characters in the first column are just placeholders for empty lines.&lt;/p&gt;

&lt;p&gt;Now press the letter &lt;strong&gt;a&lt;/strong&gt; to enter Input mode and type the lines shown in here. Press &lt;strong&gt;enter&lt;/strong&gt; at the end of each line to go on to
the next.&lt;/p&gt;

&lt;table border=&quot;1&quot; width=&quot;75%&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;Jane: Knock, knock...&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;Bill: Who&amp;#39;s there?&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;Jane: The Interrupting Cow.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;Bill: The Interrupting Cow wh...&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;Jane: MOOOOOO!&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;| &lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;~&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;&amp;quot;cow.joke&amp;quot; [New file]&lt;/span&gt;&lt;/p&gt;

&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;span style=&quot;font-family: New York&quot;&gt;&lt;strong&gt;&lt;em&gt;Saving Your Work&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;So far, so good--let&amp;#39;s save this little masterpiece. You&amp;#39;re still in Input mode, so press &lt;strong&gt;esc&lt;/strong&gt; to enter Command mode; then type &lt;strong&gt;ZZ
&lt;/strong&gt;(to put your file to sleep). You won&amp;#39;t see any Z&amp;#39;s on the
screen, but after you&amp;#39;ve entered the second Z, your file will
disappear, your
Linux command prompt will return, and you&amp;#39;ll see this message,
indicating that your file was successfully saved: &lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;&amp;quot;cow.joke&amp;quot; 6 lines, 113 characters.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Congratulations--you&amp;#39;ve just survived your first encounter with vi. You know that the &lt;strong&gt;a&lt;/strong&gt;&lt;em&gt; &lt;/em&gt;command switches to Input mode, &lt;strong&gt;esc&lt;/strong&gt;
gets you back to Command mode, and &lt;strong&gt;ZZ&lt;/strong&gt; saves the file, but you&amp;#39;ll have to expand this limited repertoire to get any real work done.
&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: New York&quot;&gt;&lt;strong&gt;&lt;em&gt;Common vi Commands &lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Have a look at this list of common vi commands (there are many more, but these will at least allow you to get some basic work
done). Then we&amp;#39;ll do one more exercise before moving on.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: As with all of Linux, vi commands are case sensitive.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Positioning the Cursor&lt;/strong&gt;&lt;/p&gt;

&lt;table width=&quot;100%&quot;&gt;
&lt;tbody&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: Symbol&quot;&gt;&amp;reg;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move cursor one space right.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: Symbol&quot;&gt;&amp;not;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move cursor one space left.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: Symbol&quot;&gt;&amp;shy;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move cursor up one line.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: Symbol&quot;&gt;&amp;macr;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move cursor down one line.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;ctrl-F&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move forward one screen.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;ctrl-B&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move backward one screen.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;$&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move cursor to end of line.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;^&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move cursor to beginning of line.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;:1&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move to first line of file&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;:$&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Move to last line of file&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;/&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Search for a character string.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;?&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Reverse search for a character string.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;x&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Delete the character at the cursor position.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;dd&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Delete the current line.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;p&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Paste data that was cut with x or dd commands.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;u&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Undo.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;Entering Input Mode&lt;/strong&gt;&lt;/p&gt;

&lt;table width=&quot;100%&quot;&gt;
&lt;tbody&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;a&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Add text after the cursor.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;i&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Insert text before the cursor.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;R&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Replace text starting at the cursor.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;o&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Insert a new line after the current one.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;Entering Command Mode&lt;/strong&gt;&lt;/p&gt;

&lt;table width=&quot;100%&quot;&gt;
&lt;tbody&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;&lt;strong&gt;esc&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Switch from Input mode to Command mode.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;


&lt;p&gt;&lt;strong&gt;Exiting or Saving Your File&lt;/strong&gt;&lt;/p&gt;

&lt;table width=&quot;100%&quot;&gt;
&lt;tbody&gt;&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;:w&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Write file to disk, without exiting editor.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;ZZ&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Save the file and exit.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;:q!&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style=&quot;font-family: New York&quot;&gt;Quit without saving.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;span style=&quot;font-family: New York&quot;&gt;&lt;strong&gt;&lt;em&gt;Trying Out Some vi Commands&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Here&amp;#39;s another example to try out some of the vi commands. Enter the
following command to fire up vi again, and you should see the
file as we left it in the last example:&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: Courier&quot;&gt;&lt;strong&gt;vi cow.joke&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Changing Text&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let&amp;#39;s change Bill&amp;#39;s name to Biff on the second line. To do so, use
the arrow keys to position your cursor on the third character of line
2 (the letter &amp;quot;l&amp;quot;&lt;strong&gt; &lt;/strong&gt;in Bill); then press &lt;strong&gt;x&lt;/strong&gt; twice (to delete the two l&amp;#39;s). Now press &lt;strong&gt;i&lt;/strong&gt; (to enter Input mode) and then type &lt;strong&gt;ff&lt;/strong&gt; to complete the
change from Bill to Biff.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Tip: Be careful about pressing the arrow keys while you&amp;#39;re in Input mode. In some
versions of vi you can position the cursor only in Command mode. Yuck.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You could also have used the &lt;strong&gt;R&lt;/strong&gt; command to do this job of replacing text, so use it to change the other Bill now. Press &lt;strong&gt;esc&lt;/strong&gt; to enter
Command mode; then type &lt;strong&gt;/Bill&lt;/strong&gt; to search for the word&lt;em&gt; Bill.&lt;/em&gt; The cursor should move to line 4, right to where Bill is located.&lt;/p&gt;

&lt;p&gt; Now position your cursor on the third character (the letter &amp;quot;l&amp;quot;), press &lt;strong&gt;R&lt;/strong&gt; to replace the characters, and type &lt;strong&gt;ff&lt;/strong&gt;. Both Bills should
now be Biffs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding and Deleting Lines&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here&amp;#39;s how to add or delete a line. Press &lt;strong&gt;esc&lt;/strong&gt; to enter Command mode; then press the &lt;strong&gt;o&lt;/strong&gt;
key to add a new line. You&amp;#39;re in Input
mode again, so you can type whatever you like on this new line. But
that would ruin the joke, so delete this new line by pressing
&lt;strong&gt;esc&lt;/strong&gt; and then entering the &lt;strong&gt;dd&lt;/strong&gt; command. The line you just added should go away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quitting without Saving Your Changes &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hmmm. . . . &amp;quot;Biff&amp;quot; just doesn&amp;#39;t have that wholesome ring to it, so
let&amp;#39;s forget about all the changes we&amp;#39;ve made in this editing session
and exit vi without saving the file. Make sure you&amp;#39;re in Command mode,
enter the &lt;strong&gt;:q!&lt;/strong&gt; command, and then press &lt;strong&gt;enter&lt;/strong&gt;. Your
Linux prompt should return, and the &lt;strong&gt;cow.joke&lt;/strong&gt; file will be just as it was before.&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-family: New York&quot;&gt;&lt;strong&gt;&lt;em&gt;Parting Words about vi&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Using vi can be frustrating, but it really isn&amp;#39;t rocket science once
you get used to the concept of the two modes and get the hang of
when it&amp;#39;s okay to move your cursor or enter text. If you&amp;#39;re ever unsure
about which mode you&amp;#39;re in, simply press &lt;strong&gt;esc&lt;/strong&gt; once or
twice, and you can be sure you&amp;#39;re in Command mode.&lt;/p&gt;

&lt;p&gt;There are some powerful (but arcane) commands that diehard vi users
use to get things done quickly in this relic-of-the-sixties text
editor. The &lt;strong&gt;man vi&lt;/strong&gt; command will tell you a lot more about vi if you decide you want to become proficient.&lt;/p&gt;

&lt;p&gt;The Usenet newsgroup comp.editors is a good place to discuss vi&lt;strong&gt; &lt;/strong&gt;or ask questions. You can find the vi FAQ (Frequently Asked
Questions) file on the Web at http://www.faqs.org/faqs/editor-faq/vi/.&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For more information on the &lt;strong&gt;vi&lt;/strong&gt; command, see the
&lt;a href=&quot;http://lowfatlinux.com/linux-vi-manual.html&quot;&gt;vi manual&lt;/a&gt;.

&lt;/p&gt;&lt;/span&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=31&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=31&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=31&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>Linux</category>
         <pubDate>Sun, 17 Feb 2008 17:31:57 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>SSH: Best Practices</title>
   <description>
    &lt;h2&gt;&lt;span style=&quot;color: #993300&quot;&gt;SSH: Best Practices&lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;Introduction&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Are you using SSH in the best way possible? Have you configured it to be as limited and secure as possible? The goal of this document is to kick in the new year with some best practices for SSH: why you should use them, how to set them up, and how to verify that they are in place.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;All of the examples below assume that you are using EnGarde Secure Linux but any modern Linux distribution will do just fine since, as far as I know, everybody ships OpenSSH.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;font-size: small&quot;&gt;SSHv2 vs. SSHv1&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;There are numerous benefits to using the latest version of the SSH protocol, version 2, over it&amp;#39;s older counterpart, version 1 and I&amp;#39;m not going into a lot of details on those benefits here - if you&amp;#39;re interested, see the URL in the reference below or Google around. That being said if you don&amp;#39;t have an explicit reason to use the older version 1, you should always be using version 2.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;To use SSHv2 by default but permit SSHv1, locate the &amp;quot;Protocol&amp;quot; line in your sshd_config file and change it to:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;Protocol 2,1&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;When doing 2,1 please note that the protocol selection is left up to the client. Most clients will default to v2 and &amp;quot;fall back&amp;quot; to v1, while legacy clients may continue to use v1. To force everybody to use SSHv2, change it to:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;Protocol 2&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;When you make this change don&amp;#39;t forget to generate the appropriate HostKey&amp;#39;s as well! SSHv2 requires the following keys:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;# HostKeys for protocol version 2&lt;br /&gt;HostKey /etc/ssh/ssh_host_rsa_key&lt;br /&gt;HostKey /etc/ssh/ssh_host_dsa_key&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;While SSHv1 requires: &lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;# HostKey for protocol version 1&lt;br /&gt;HostKey /etc/ssh/ssh_host_key&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Once your changes are made, restart the SSH daemon: &lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;# /etc/init.d/sshd restart&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;[ SUCCESSFUL ] Secure Shell Daemon&lt;br /&gt;[ SUCCESSFUL ] Secure Shell Daemon &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;From another machine, try SSH&amp;#39;ing in. You can use the -v option to see which protocol is being used, and the &amp;#39;-oProtocol=&amp;#39; option to force one or the other - for example, &amp;quot;ssh -v -oProtocol=2 &amp;quot; would force protocol version 2.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;font-size: small&quot;&gt;Binding to a Specific Address or Non-Standard Port&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;If you&amp;#39;re running SSH on an internal, firewalled, workstation then you can probably skip this section, but if you&amp;#39;re running SSH on a firewall or on a machine with two network interfaces, this section is for you.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Out of the box OpenSSH will bind to every available network address; while convenient and suitable for most installations, this is far from optimal. If your machine has two or more interfaces then the odds are that one is &amp;quot;trusted&amp;quot; and the other is &amp;quot;untrusted.&amp;quot; If this is the case, and you don&amp;#39;t need nor want SSH access coming in on the untrusted interface, then you should configure OpenSSH to listen on a specific interface.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;To have OpenSSH only bind to your internal interface, 192.168.0.1 in the example below, locate the following line in your sshd_config file:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;ListenAddress 0.0.0.0&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;and change the 0.0.0.0 to 192.168.0.1:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;ListenAddress 192.168.0.1&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;To verify that this change took, restart OpenSSH and look at netstat:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;# /etc/init.d/sshd restart&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;[ SUCCESSFUL ] Secure Shell Daemon &lt;br /&gt;[ SUCCESSFUL ] Secure Shell Daemon &lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;# netstat -anp | grep sshd&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;tcp 0 0 192.168.0.1:22 0.0.0.0:* LISTEN 7868/sshd&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;As you can see, the sshd daemon is now only listening on 192.168.0.1.&lt;/strong&gt; SSH requests coming in &lt;strong&gt;any other interface&lt;/strong&gt; will be ignored.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Similarly, you may want to change the port that the SSH daemon binds to. Sometimes there is a functional need for this (ie, your employer blocks outbound 22/tcp) but there is also security-through-obscurity value in this as well. While not providing any real security benefit against a determined attacker, moving the SSH daemon off of port 22 protects you against automated attacks which assume that the daemon is running on port 22.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;To have OpenSSH bind to a port other than port 22, 31337 in the example below, locate the following line in your sshd_config file:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;Port 22&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;and change the 22 to 31337:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;Port 31337&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;To verify that this change took, restart OpenSSH and, again, look at netstat:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;# netstat -anp | grep sshd &lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;tcp 0 0 192.168.0.1:31337 0.0.0.0:* LISTEN 330/sshd&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Finally, to SSH into a host whose SSH daemon is listening on a non-standard port, use the -p option:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;ssh -p 31337 user@192.168.0.1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;font-size: small&quot;&gt;Using TCP Wrappers&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;TCP Wrappers are used to limit access to TCP services on your machine. If you haven&amp;#39;t heard of TCP Wrappers you&amp;#39;ve probably heard of /etc/hosts.allow and /etc/hosts.deny: these are the two configuration files for TCP Wrappers. In the context of SSH, TCP Wrappers allow you to decide what specific addresses or networks have access to the SSH service.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;To use TCP Wrappers with SSH you need to make sure that OpenSSH was built with the -with-tcp-wrappers. This is the case on any modern distribution.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;As I indicated earlier, TCP Wrappers are configured by editing the /etc/hosts.deny and /etc/hosts.allow files. Typically you tell hosts.deny to deny everything, then add entries to hosts.allow to permit specific hosts access to specific services.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;An example:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;#&lt;br /&gt;# hosts.deny    This file describes the names of the hosts which are&lt;br /&gt;#               *not* allowed to use the local INET services, as decided&lt;br /&gt;#               by the &amp;#39;/usr/sbin/tcpd&amp;#39; server.&lt;br /&gt;#&lt;br /&gt;ALL: ALL&lt;br /&gt;#&lt;br /&gt;# hosts.allow   This file describes the names of the hosts which are&lt;br /&gt;#               allowed to use the local INET services, as decided&lt;br /&gt;#               by the &amp;#39;/usr/sbin/tcpd&amp;#39; server.&lt;br /&gt;#&lt;br /&gt;sshd: 207.46.236. 198.133.219.25&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;In the example above, access to SSH is limited to the network 207.46.236.0/24 and the address 198.133.219.25. Requests to any other service from any other address are denied by the &amp;quot;ALL: ALL&amp;quot; in hosts.deny. If you try to SSH into a machine and TCP Wrappers denies your access, you&amp;#39;ll see something like this:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;ssh_exchange_identification: Connection closed by remote host&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;This simple configuration change significantly hardens your installation since, with it in place, packets from hostile clients are dropped very early in the TCP session -- and before they can do any real damage to a potentially vulnerable daemon.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;font-size: small&quot;&gt;Public Key Authentication&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;The last item I will cover is public key authentication. One of the best things you can do to tighten the security of your SSH installation is to disable password authentication and to use public key authentication instead. Password authentication is suboptimal for many reasons, but mostly because people choose bad passwords and attackers routinely try to brute-force passwords. If the systems administrator has chosen a bad password and he&amp;#39;s permitting root logins... game over.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Public key authentication is no silver bullet - similarly, people generate passphrase-less keys or leave ssh-agents running when they shouldn&amp;#39;t - but, in my opinion, it&amp;#39;s a much better bet.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Just about every distribution ships with public key authentication enabled, but begin by making sure it is:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;RSAAuthentication yes&lt;br /&gt;PubkeyAuthentication yes&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Both of these options default to &amp;quot;yes&amp;quot; and the &amp;quot;RSAAuthentication&amp;quot; option is for SSHv1 and the &amp;quot;PubkeyAuthentication&amp;quot; option is for SSHv2. If you plan on using this authentication method exclusively, while you&amp;#39;re there, you may want to disable password authentication:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small&quot;&gt;PasswordAuthentication no&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Before you proceed, make sure you have a terminal open on your target machine. Once you restart the SSH daemon you will no longer be able to log in without a key... which we haven&amp;#39;t generated yet!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Once you&amp;#39;re sure, restart the SSH daemon:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;# /etc/init.d/sshd restart&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;[ SUCCESSFUL ] Secure Shell Daemon &lt;br /&gt;[ SUCCESSFUL ] Secure Shell Daemon&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Now, from your desktop, try to SSH in to your target machine:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;$ ssh rwm@brainy&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;Permission denied (publickey,keyboard-interactive).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;strong&gt;We&amp;#39;re locked out!&lt;/strong&gt; This is a &lt;strong&gt;good &lt;/strong&gt;thing. The next step, on your desktop, is to generate a key:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;$ ssh-keygen -t dsa -C &amp;quot;Ryan&amp;#39;s SSHv2 DSA Key (Jan 2008)&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;Generating public/private dsa key pair. &lt;br /&gt;Enter file in which to save the key (/home/rwm/.ssh/id_dsa): &lt;br /&gt;Enter passphrase (empty for no passphrase): ********** &lt;br /&gt;Enter same passphrase again: ********** &lt;br /&gt;Your identification has been saved in /home/rwm/.ssh/id_dsa. &lt;br /&gt;Your public key has been saved in /home/rwm/.ssh/id_dsa.pub. &lt;br /&gt;The key fingerprint is: &lt;br /&gt;98:4d:50:ba:ee:8b:79:be:b3:36:75:8a:c2:4a:44:4b Ryan&amp;#39;s SSHv2 DSA Key (Jan 2008)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4&gt;A few notes on this:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: small&quot;&gt;You can generate a DSA (-t dsa), RSA (-t rsa), or SSHv1 (-t rsa1) key. In the example above I&amp;#39;m using dsa.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: small&quot;&gt;I like to put the date I generated the key in the comment (-C) field, that way I can change it out every so often.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: small&quot;&gt;You&amp;#39;re entering a passphrase, not a password. Use a long string with spaces and punctuation. The longer and more complicated the better!&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;The command you just ran generated two files - id_dsa, your private key and id_dsa.pub, your public key. It is critical that you keep your private key private, but you can distribute your public key to any machines you would like to access.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Now that you have generated your keys we need to get the public key into the ~/.ssh/authorized_keys file on the target machine. The best way to do this is to copy-and-paste it - begin by concatenating the public key file:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;$ cat .ssh/id_dsa.pub&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;ssh-dss AAAAB3NzaC1kc3MAAACBAL7p6bsg5kK4ES9BWLPCNABl20iQQB3R0ymaPMHK... &lt;br /&gt;... ds= Ryan&amp;#39;s SSHv2 DSA Key (Jan 2008)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;This is a very long string. Make sure you copy &lt;u&gt;all of it &lt;/u&gt;and that you do NOT copy the newline character at the end. In other words, copy from the &amp;quot;ssh&amp;quot; to the &amp;quot;2008)&amp;quot;, but not past that.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;The next step is to append this key to the end of the ~/.ssh/authorized_keys file on your target machine. Remember that terminal I told you to keep open a few steps ago? Type the following command into it, pasting the key you&amp;#39;ve just copied into the area noted KEY:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;echo &amp;quot;KEY&amp;quot; &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;For example:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;echo &amp;quot;ssh-dss AAAA5kS9BWLPCN...s= Ryan&amp;#39;s SSHv2 DSA Key (Jan 2008)&amp;quot; &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small&quot;&gt;Now, try to SSH in again. If you did this procedure correctly then instead of being denied access, you&amp;#39;ll be prompted for your passphrase:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;command&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;$ ssh rwm@brainy&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;system&quot;&gt;&lt;span style=&quot;font-size: small&quot;&gt;Enter passphrase for key &amp;#39;/home/rwm/.ssh/id_dsa&amp;#39;: &lt;br /&gt;Last login: Thu Jan 10 14:37:14 2008 from papa.engardelinux.org &lt;br /&gt;[rwm@brainy ~]$&lt;/span&gt; &lt;/p&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=30&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=30&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=30&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>Linux</category>
         <pubDate>Sun, 17 Feb 2008 17:04:03 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
    <item>
   <title>Mozilla: View Browser Configuration</title>
   <description>
    &lt;strong&gt;&lt;big&gt;View Browser Configuration:&lt;/big&gt;&lt;/strong&gt;
          

        
      

      
&lt;p&gt;&lt;a name=&quot;CONFIGURATION&quot;&gt;&lt;/a&gt; 
List available options. Type the URL: &lt;strong&gt;about:config&lt;/strong&gt;
      &lt;/p&gt;

      
&lt;p&gt;
      &lt;a name=&quot;CONFIGURATION&quot;&gt;&lt;/a&gt;This will allow you to modify the
advanced configuration options found in the various Mozilla
configuration files. Right click on the value to alter and a dialog box
will appear to allow changes.
&lt;/p&gt;

      
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

      
&lt;dl&gt;&lt;dd&gt;
          &lt;a name=&quot;CONFIGURATION&quot;&gt;&lt;/a&gt;&lt;img src=&quot;http://www.yolinux.com/TUTORIALS/images/MozillaAboutConfig.gif&quot; border=&quot;0&quot; alt=&quot;Mozilla about:config&quot; /&gt;
          &lt;/dd&gt;&lt;/dl&gt;


      
&lt;p&gt;
      &lt;a name=&quot;CONFIGURATION&quot;&gt;&lt;/a&gt;The preferences are stored in the file &lt;tt&gt;/home/&lt;em&gt;user-id&lt;/em&gt;/.mozilla/firefox/..../prefs.js&lt;/tt&gt;.
      &lt;/p&gt;

      
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

      
&lt;hr size=&quot;5&quot; /&gt;
      &lt;a name=&quot;ENV&quot;&gt;&lt;/a&gt;
      
      
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;


        &lt;tbody&gt;
          &lt;tr bgcolor=&quot;#ffcc33&quot;&gt;
            &lt;td&gt;&lt;strong&gt;&lt;big&gt;Mozilla / Firefox Environment Variables:&lt;/big&gt;&lt;/strong&gt;&lt;/td&gt;
          &lt;/tr&gt;

        &lt;/tbody&gt;
      
&lt;/table&gt;


      
&lt;p&gt;&lt;a name=&quot;ENV&quot;&gt;&lt;/a&gt; 
      &lt;/p&gt;

      
&lt;dl&gt;&lt;dd&gt;
          &lt;table border=&quot;1&quot;&gt;

            &lt;tbody&gt;
              &lt;tr&gt;
                &lt;th&gt;Environment Variable&lt;/th&gt;
                &lt;th&gt;Description&lt;/th&gt;
              &lt;/tr&gt;

              &lt;tr&gt;
                &lt;td&gt;MOZILLA_FIVE_HOME&lt;/td&gt;
                &lt;td&gt;Home directory path for browser&lt;/td&gt;
              &lt;/tr&gt;

              &lt;tr&gt;
                &lt;td valign=&quot;top&quot;&gt;MOZILLA_PLUGIN_PATH&lt;/td&gt;
                &lt;td valign=&quot;top&quot;&gt;Directory path for browser plug-ins.&lt;br /&gt;
(Often &lt;tt&gt;$MOZILLA_FIVE_HOME/plugins&lt;/tt&gt;)&lt;/td&gt;
              &lt;/tr&gt;

            &lt;/tbody&gt;
          &lt;/table&gt;

        &lt;/dd&gt;&lt;/dl&gt;


      
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

      
&lt;hr size=&quot;5&quot; /&gt;
      &lt;a name=&quot;PROXY&quot;&gt;&lt;/a&gt;
      
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;


        &lt;tbody&gt;
          &lt;tr bgcolor=&quot;#ffcc33&quot;&gt;
            &lt;td&gt;&lt;strong&gt;&lt;big&gt;Proxy Configuration:&lt;/big&gt;&lt;/strong&gt;&lt;/td&gt;
          &lt;/tr&gt;

        &lt;/tbody&gt;
      
&lt;/table&gt;


      
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

      
&lt;dl&gt;&lt;dd&gt;
Proxy configuration: Many corporate networks rely on SOCKS proxy servers
for access to the internet. Typically a Proxy Auto Configuration (PAC)
script is issued to be registered
with the browser. These scripts are usually targeted to Microsoft
Explorer of Netscape Navigator (4.x) specifically. Try the proxy script:
&amp;quot;Edit&amp;quot; + &amp;quot;Preferences&amp;quot; and select &amp;quot;Advanced (+)&amp;quot; and &amp;quot;Proxies&amp;quot; +
&amp;quot;Automatic proxy configuration URL&amp;quot;, enter the script location
and select the &amp;quot;Reload&amp;quot; button.
If it works, great your ready to surf.
If your corporation uses a proxy directly, enter it under &amp;quot;Manual
proxy configuration&amp;quot;.
If using a script and it does not work, use the command 
&amp;quot;&lt;tt&gt;wget http://&lt;em&gt;proxy-url.domain.com/proxy-script.pac&lt;/em&gt;&lt;/tt&gt;&amp;quot; to 
download the proxy script. Examine the file &lt;tt&gt;&lt;em&gt;proxy-script.pac&lt;/em&gt;&lt;/tt&gt;.
Burried in the logic of the script is usually the explicit listing of a
proxy server which can be entered under the Mozilla manual configuration.
If you are at a corporation using a firewall and have direct access, 
I&amp;#39;m jealous and you have no need for proxy configuration.
        &lt;/dd&gt;&lt;/dl&gt;


      
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

      
&lt;hr /&gt;
      &lt;a name=&quot;EXTENSIONS&quot;&gt;&lt;/a&gt;
      
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;


        &lt;tbody&gt;
          &lt;tr bgcolor=&quot;#ffcc33&quot;&gt;
            &lt;td&gt;&lt;strong&gt;&lt;big&gt;Firefox Extensions:&lt;/big&gt;&lt;/strong&gt;&lt;/td&gt;
          &lt;/tr&gt;

        &lt;/tbody&gt;
      
&lt;/table&gt;


      
&lt;p&gt; 
Firefox extensions are supplemental programs which are installed within 
Firefox from the Mozilla web site. Extensions are available for 
Blogging, Web Developer Tools,	Dictionaries, 	Download Tools,
Editing and Forms, Image Browsing,	Kiosk Browsing 	Languages,
Message Reading,	Navigation,
News Reading,	Privacy and Security,	Search Tools,
Website Integration, XUL Applications, ...
      &lt;/p&gt;

      
&lt;p&gt;
To add an extension:
      &lt;/p&gt;

      
&lt;ol&gt;
&lt;li&gt;Allow the extensions website to install software:
    Select &amp;quot;Edit&amp;quot; + &amp;quot;Preferences&amp;quot; (or &amp;quot;Tools&amp;quot; + &amp;quot;Options&amp;quot; on newer systems)
    
          &lt;p&gt;&amp;nbsp;&lt;/p&gt;
          &lt;table&gt;

    &lt;tbody&gt;
              &lt;tr&gt;
                &lt;td valign=&quot;top&quot;&gt;Check &amp;quot;Allow web site to install software&amp;quot; then
            &lt;br /&gt;
 press the corresponding &amp;quot;Allowed Sites&amp;quot; button.&lt;/td&gt;

        &lt;td valign=&quot;top&quot;&gt;Enter the &amp;quot;allowed&amp;quot; site.&lt;/td&gt;
              &lt;/tr&gt;

    &lt;tr&gt;
                &lt;td valign=&quot;top&quot;&gt;
    &lt;img src=&quot;http://www.yolinux.com/TUTORIALS/images/Firefox-WebFeatures.gif&quot; border=&quot;0&quot; /&gt;
    &lt;/td&gt;
                &lt;td valign=&quot;top&quot;&gt;
    &lt;img src=&quot;http://www.yolinux.com/TUTORIALS/images/Firefox-AllowSoftwareInstall.gif&quot; border=&quot;0&quot; /&gt;
    &lt;/td&gt;
              &lt;/tr&gt;

    
            &lt;/tbody&gt;
          &lt;/table&gt;

        &lt;/li&gt;&lt;li&gt;Select and install an extension: Select &amp;quot;Tools&amp;quot; + &amp;quot;Extensions&amp;quot; + &amp;quot;Get more extensions&amp;quot;.
    &lt;br /&gt;
This brings up a web page from which you may choose the extension which suits your needs.
        &lt;/li&gt;
&lt;/ol&gt;
   </description>
   <link>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=29&amp;blogId=1</link>
   <comments>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=29&amp;blogId=1</comments>
   <guid>http://openviewsecurity.com/blogboard/index.php?op=ViewArticle&amp;articleId=29&amp;blogId=1</guid>
      <dc:creator>jbrown</dc:creator>
      
    <category>General</category>
         <pubDate>Sun, 17 Feb 2008 16:38:46 -0700</pubDate>
   <source url="http://openviewsecurity.com/blogboard/rss.php?blogId=1&amp;profile=rss20">Open.View.Security</source>
     </item>
   </channel>
</rss>