Showing posts with label Servers Hacking. Show all posts
Showing posts with label Servers Hacking. Show all posts

How To Run a Nessus Server



First of Al U need A Knoppix Distro. More U just have to follow The Steps:-




  • Boot up Knoppix STD. The install files can be found on the enclosed CD or can be downloaded from www.knoppix-std.org.

  • Open a terminal window and make sure that you are running as root. If not, type su.

  • You will need to add a user to the Nessus server. This can be accomplished by typing Nessus-adduser from the prompt.

  • After a user is added, you will want to start the Nessus server daemon by typing in the following: /etc/init.d/nessusd start.

  • Once the daemon is started, you can type nessus at the command line to start the Nessus client. You will now be prompted to log in to Nessus. Enter the username and password you created in step 3.

  • Click OK on the warning page that warns about dangerous plugins. This message basically states that some plugins can cause some servers to crash or hang. If you were to run this tool on a production network, this is something you would want to discuss with management before making a decision on how to proceed.

  • Browse through the parameters available on each tab. These include: Plugins, Prefs, Scan Options, Target Selection, and User.

  • Under the Network tab, enter the target device you would like to scan. Make sure that this is a system you have permission to perform a scan on. Start the assessment by clicking on Start the Scan.

  • On the Get Updates Setup Files page, select Yes, download the updated Setup files (Recommended), and then click Next. You'll need to register to get updates. Updates are seven days behind for non-paying customers.

  • After the scan is finished, review the results. This information could be added to your test report had this been an actual test.

  • The next step of a real assessment would be to patch, harden, and update the systems that were found to be vulnerable.



  • Hope U Found it Useful.

    Enjoy Hacking Enjoy Hackton






  • 10:36 PM by Shubham Mittal · 0

    How To Password Protect Your Linux Box (OS) With GRUB


    GRUB, the Only bootloader for Linux OS, as NTLDR works in windows..
    here , the basic idea for Securing the Linux box wiht GRUB is, we implies sum security on GRUB itself..The MOst basic Phase in Loading Of An Operating System.
     
    However , Gettin bypassed with GRUb is also not that much difficult, its as easy as Burning a MATCH STICk, bt guys, i wud tell u that somehow later.
    So wt the basic idea is, If you don't want someone booting your machine without permission, you can add a password to your GRUB entries. You can add a password only to specific entries if you wish; this will require a user to enter a password before loading only those boot entries you protect. This can be useful when done on your Recovery Mode entries, which bring up a passwordless root login by default.

    To get started, let's first encrypt the password we want to use. Open up a terminal and enter the grub command. This brings up a grub shell. In this shell, enter the md5crypt command. When prompted, type in the password you want on your grub entries. (Don't worry, this won't write anything to your files!) After pressing Enter, you will be given an encrypted password string. Copy the string to your clipboard. Enter quit to exit the grub shell and return to bash.

    Code:
    GNU GRUB  version 0.95  (640K lower / 3072K upper memory)
    
     [ Minimal BASH-like line editing is supported.  For the first word, TAB
       lists possible command completions.  Anywhere else TAB lists the possible
       completions of a device/filename. ]
    
    grub> md5crypt
    
    Password: *************
    Encrypted: $1$w7Epf0$vX6rxpozznLAVxZGkcFcs.
    
    grub>
    Now that we have an encrypted password, it's time to add it to grub. Using sudo, open up /boot/grub/menu.lst using your favorite text editor.
     
    Note : if ur version of linux Box does not Encrypts password as such, Then you may have to Copy The encrypted passwrd frm the Shadow Fiel..(If U r having this case, do ask me, n i wud tell u the whole game IN step wise step manner)
    After the "initrd" line for each entry you want to password protect, start a new line beginning with password --md5 and paste in your newly-encrypted password. Using the above example password on the i386 recovery entry, this:
    Code:
    title Ubuntu, kernel 2.6.8.1-2-386 (recovery mode)
            root (hd1,2)
            kernel /boot/vmlinuz-2.6.8.1-2-386 root=/dev/hdb3 ro single
            initrd /boot/initrd.img-2.6.8.1-2-386

    Becomes this:
    Code:
    title Ubuntu, kernel 2.6.8.1-2-386 (recovery mode)
            root (hd1,2)
            kernel /boot/vmlinuz-2.6.8.1-2-386 root=/dev/hdb3 ro single
            initrd /boot/initrd.img-2.6.8.1-2-386
            password --md5 $1$w7Epf0$vX6rxpozznLAVxZGkcFcs.
    You must add such a line after every entry you want to password protect. As I mentioned earlier, I password protected my recovery mode entries out of sheer paranoia.

    Save the file, and reboot. (The first time you try this, I suggest only doing it to one entry so you can test it to make sure it works, and you can still use another entry to boot your machine in case something went wrong.)

    For a bit of added peace of mind, you can prevent everyone except root from reading /boot/grub/menu.lst by doing:

    Code:
    sudo chmod 600 /boot/grub/menu.lst
    ______________________________________________________________________________

    Thats it u r finished with it.

    Hopes u enjoy this., have fun. Enjoy Hacking.. Enjoy Hackton

    8:14 PM by Shubham Mittal · 0

    Fix Web Servers to Support Firefox Content





    Firefox supports more varied content than just that of web pages. In addition to the big world of XUL-based applications, there are a number of configuration and security content types that can be delivered to the browser. This Hack explains how to set up Apache so that all these types are delivered with the right Content-Type. It also explains what to do about broken versions of Internet Explorer.

    Configuring Firefox Content Types in Apache

    The following MIME types are the ones most commonly used by Firefox. Update your Apache httpd.conf file to include these directives, and then restart httpd or signal it to reread the config files.

    Support for HTML content types:

    AddType application/xhtml+xml         .xhtml
    AddType application/http-index-format .hti
    AddType text/html .html
    AddType text/css .css
    AddType text/xsl .xslt
    AddType application/x-javascript .js

    Support for other presentable XML content:

    AddType application/xml               .xml /* or .. */
    AddType text/xml .xml
    AddType image/svg+xml .svg

    Mozilla does not use the MIME type required for pure MathML; such content should be delivered inside a compound document identified as XHTML or XML.

    Support for remote XUL and RDF:

    AddType application/vnd.mozilla.xul+xml .xul
    AddType application/rdf+xml .rdf

    Support for delivery of extensions, patches and configuration items:

    AddType application/x-xpinstall         .xpi
    AddType application/x-javascript-config .cfg .jsc

    Support for server delivery of certificates, either for certificate-database install or for immediate use as data:

    AddType application/x-x509-ca-cert     .x509ca
    AddType application/x-x509-server-cert .x509sv
    AddType application/x-x509-crl .x509_crl # OSCP
    AddType application/x-x509-user-cert .x509ua
    AddType application/x-x509-email-cert .x509em
    AddType application/x-pkcs7-crl .pk7_crl
    AddType application/pkix-crl .pk_crl
    AddType application/x-pkcs7-mime .pk7m_crl
    AddType application/pkcs7-signature .pk7_sig
    AddType application/pkix-crl .pk_crl
    AddType application/ocsp-response .ocsp

    Filename extensions are merely suggestive in this case; most content of these types will likely be generated by a server program rather than delivered directly from flat files.

    Supporting Both Standards and Internet Explorer

    All modern browsers, except for all Internet Explorer (IE) versions, can handle XHTML content delivered with the correct application/xhtml+xml MIME type. Generally speaking, IE can't handle this case. Something has to be done to accommodate that. In the past, all XHTML content was delivered as text/html for IE's benefit. Now that many standards-oriented browsers are gaining in market share, it's time to reduce IE to a special case and deliver the correct content types by default.

    The XHTML standard does allow XHTML 1.0 to be delivered as text/html. This is a stopgap measure that works for all browsers. The XHTML standard does not allow this trick for XHTML 1.1 content or higher. That means that there is no standards-based fix available for most IE versions for XHTML 1.1 or higher. The only available solution is to hack the Windows Registry so that content with application/xhtml+xml is treated as text/html. See http://juicystudio.com/xhtml-registry-hack.asp for details. To make the server lie when required, try the following code snippets.

    3.7.2.1 PHP content rewriter

    These tests pick up all the weird variants of IE, including Pocket PC versions, and replace the true content type with a lie for IE:


    For more complete browser-sniffing code, visit http://www.apptools.com/phptools/browser/source.php.

    Perl CGI content rewriter

    Similarly, here's the rewriter in Perl:

    use CGI;
    my ($query,$broken) = (0, false);
    $query = new CGI;
    $query->use_named_parameters(1);

    $broken = $query->http("HTTP_USER_AGENT") =~ /pocket/i;
    $broken = ... # as for PHP

    print "Content-type: application/xhtml+xml\n\n" if not $broken;
    print "Content-type: text/html\n\n" if $broken;
    # ... and so on.

    Native Apache rewriter

    For static files, use Apache's mod_rewrite module, which must be configured and enabled before it is usable. The obscure code required for the IE lie is:

    RewriteEngine on
    RewriteBase /
    RewriteCond %{HTTP_USER_AGENT} pocket [nocase,ornext]
    RewriteCond %{HTTP_USER_AGENT} mspie [nocase,ornext]
    RewriteCond %{HTTP_USER_AGENT} pocket [nocase,ornext]
    RewriteCond %{HTTP_USER_AGENT} msie [nocase]
    RewriteCond %{HTTP_USER_AGENT} !msie.*opera [nocase]
    RewriteCond %{HTTP_USER_AGENT} !opera.*msie [nocase]
    RewriteCond %{REQUEST_URI} \.xhtml$
    RewriteCond %{THE_REQUEST} HTTP/1\.[^0]
    RewriteRule .* - [type=text/html]

    4:01 AM by Shubham Mittal · 0