Friday 31 May 2013

Complete Linux Server Tutorial

Download pdf , click here

Author : Chetan Soni

WAMP & LAMP installation and configuration

Download the pdf

Author : Chetan Soni

Tuesday 28 May 2013

Facebook Chat Prank [ MUST SEE 'n' TRY ]

Firstly, Copy the below codes into notepad

dim strDot
strDot="."
set ws = CreateObject("wscript.shell")
wscript.sleep 5000
for i = 1 to 100
ws.sendkeys "Initializing : &H246" & 700 + i & "{ENTER}"
wscript.sleep 100
next
wscript.sleep 1500
ws.sendkeys "_Profile ID Found...._{ENTER}"
wscript.sleep 1500
ws.sendkeys "_Targeting Profile..._{ENTER}"

wscript.sleep 1800
ws.sendkeys "_Exploiting Profile_{ENTER}"
wscript.sleep 800
for i = 1 to 20
ws.sendkeys "*Sending Exploits...* : " & i & "{ENTER}"
wscript.sleep 800
next
wscript.sleep 1500
ws.sendkeys "*_Starting Password Attack_*{ENTER}"
wscript.sleep 800
ws.sendkeys "_Attack Type : Brute Force_{ENTER}"
wscript.sleep 1500
for i = 1 to 30
ws.sendkeys "Hacking account Now" & strDot & "{ENTER}"
strDot = strDot & "."
wscript.sleep 800
next
wscript.sleep 1500
ws.sendkeys "*Attack Completed...! by www.way2hacker.blogspot.in *{ENTER}"


Now save it as any name but with .vbs extension. E.g:- fbhack.vbs  and save it on the  desktop.
Now to the main trick, Open your facebook account and select the person you want to play pranks with from chat,

MAKE SURE THE PERSON IS ONLINE.

And the last part now, Please becareful in this part.
== >> Double click on the vbs script ypu crated previously and immediately move your cursor on the facebook chat box of the person and see what happens.


Source : Kehinde Ayoola Blog

Thursday 23 May 2013

Gaming time :::Cat vs Dog:::

Download and enjoy Cat vs Dog

Stegan0graphy - Hide Files & Messages inside Images in CMD

Using the command prompt in Windows
This one's quite easy. Create an archive file (i.e a Zip or Rar file) which contains the files you want to hide.
Our aim is to hide this archive file inside an image. Let's assume secretfiles.zip is the archive file and mypicture.jpg is the picture file which will be used to hide the archive.

Now open the command prompt and use the following command:
copy /b mypicture.jpg + secretfiles.zip new.jpg

The above command will create a new image file named new.jpg, which contains secretfiles.zip.
Opening new.jpg will only display the image from the original mypicture.jpg file, so the zip file stays hidden. However, to access the archive, you'll have the open the new.jpg file with programs like Winzip,Winrar,7-zip etc.

This trick can also be used with other image formats like png, gif, tif etc. Additionally, the zip or rar archives can be encrypted(password protected), thereby making it difficult to retrieve even if one knows an image contains these files.

Wednesday 22 May 2013

NAGIOS - "N€TW0rk M0niT0riNG T00L"

Nagios is an open source computer system monitor, network monitoring and infrastructure monitoring software application. Nagios offers monitoring and alerting for servers, switches, applications, and services. It alerts users when things go wrong and alerts them again when the problem has been resolved.

Source : ww.wikipedia.com

You can download Nagios tutorial from the Click here to download

Authors : Pankaj Rane , P. Venkatesh

Tuesday 21 May 2013

Disable Directory Listing in "APACHE" & "IIS" web server

Ex:  www.way2hacker.blogspot.in

like traversing directories trying www.way2hacker.blogspot.in/robots.txt 
there might be some probablity that an attacker tries to look for hidden directories and there is possibility of finding possible web configuration files.

TO DISABLE THIS :

In APACHE :

go to file called httpd.conf 
and search for :

Options Indexes FollowSymLinks

Now add "-" (hyfen) before Indexes , as shown below

Options -Indexes FollowSymLinks

In IIS : 

Open IIS Manager and navigate to manage then in "Feature View" Double Click "Directory browsing".
In "Actons" pane click Disable - if Directory browsing is enabled. 


If you like this Post , Subscribe to my blog below ... 



Monday 20 May 2013

Time To Play Android Game On PC

Follow this step by step instructions
1. Firstly, download Bluestacks.
2. After you have successfully downloaded the programming, install it. 
3. After the installing it, you can then start the games you might want to play.


Instructions to Install Android Games and Applications on Bluestacks
:

1. on your installed Bluestacks, click on "search" symbol on the upper right corner.
2. Another Windows will open up.
3. Enter the name of the game or Application you might want to play and click on the search option. 
4. A series of effects comes up; select the one you might want to play by clicking "install".
5. Install the android Game or Application and launch the game or Application on your Personal Computer.


NoteBluestacks is still dependent upon Android 2.3, so a few parts of the interface will be a touch out dated and a couple of more up to date applications may not meet your expectations.

Wednesday 15 May 2013

Have fun GoOgLe


Go to Google.com then click images and type "Atari Breakout" (without quotes)

>Thank me later :)

Saturday 4 May 2013

Recover Deleted FIles by using Forensic tools : FOREMOST & DCFLDD


Foremost
Foremost is a Linux based program data for recovering deleted files . The program uses a configuration file to specify headers and footers to search for. Intended to be run on disk images, foremost can search through most any kind of data without worrying about the format.

DCFLDD

Dcfldd is a tool designed to acquire images. Dcfldd was designed to be an open sources computer forensic tool that would improve some of the shortcomings of the dd application. When the hashwindows=0 option is specified, the dcfldd will calculate the md5sum while the data is being copied, this options eliminate the extra step of having to use md5sum afterward to calculate the md5sum of the bitstream copy. This can save a lot of time as hashing the drive with md5sum can take a while. Another feature of the dcfldd command is the status bar, this is an important feature as it indicates how long the process it’s going to take.

To know more about these tools with screenshots , 
 click here to download the docs.

Disco lights on your KEYBOARD


Copy the below code in Notepad and save it as disco.vbs on Desktop
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
wshshell.sendkeys "{NUMLOCK}"
wshshell.sendkeys "{SCROLLLOCK}"
loop

Now , click the disco.vbs and you will found that your Caps lock , Scroll lock , Nums lock are flashing like Disco lights.

To stop it , go to task manager and in Process column search for wscript.exe , right click and end the process.

Play pranks with your friends
Enjoy Disco lights on your keyboard  :)

Computer Online Forensic Evidence Extractor (COFEE) Tool


        Computer Online Forensic Evidence Extractor (COFEE) is a tool kit, developed by Microsoft, to help computer forensic investigators extract evidence from a Windows computer. Installed on a USB flash drive or other external disk drive, it acts as an automated forensic tool during a live analysis.
      
             How to use ?
      The device is activated by being plugged into a USB port. It contains 150 tools and a graphical user interface to help investigators collect data.The software is reported to be made up of three sections. First COFEE is configured in advance with an investigator selecting the data they wish to export, this is then saved to a USB device for plugging into the target computer. A further interface generates reports from the collected data.

      COFEE includes tools for password decryption, Internet history recovery and other data extraction. It also recovers data stored in volatile memory which could be lost if the computer were shut down.

z    Check the below screenshots :
      

      
      The Folder is created in the pendrive , which contains the evidence report of the victim PC 

Digital Forensics Tools : VINETTO & PASCO


1      VINETTO

Vinetto is a forensics tool to examine Thumbs.db files.It is a command line python script that works on Linux, Mac OS X and Cygwin(win32).
Vinetto uses the thumbs.db database file. If a windows user select the thumbnail view, a small database file called thumbs.db caches picture information to speed up the viewing of the picture files within a folder, this file changes in windows vista as it is called thumbcache.db instead of thumbs.db.
The Windows systems (98, ME, 2000, XP and 2003 Server) can store thumbnails and metadata of the picture files contained in the directories of its FAT32 or NTFS filesystems. The thumbnails and associated metadata are stored in Thumbs.db files.
Once a picture file has been deleted from the filesystem, the related thumbnail and associated metada remain stored in the Thumbs.db file. So, the data contained in those thumbs.db files are an helpful source of information for the forensics investigator.
Vinetto will help *nix-based forensics investigators to :
  -> easily preview thumbnails of deleted pictures on Windows systems,
  -> obtain informations (dates, path, ...) about those deleted images.
Usage: vinetto [OPTIONS] [-s] [-U] [-o DIR] file
options:
  --version   show program's version number and exit
  -h, --help  show this help message and exit
  -o DIR      write thumbnails to DIR
  -H          write html report to DIR
  -U          use utf8 encodings
  -s          create symlink of the image realname to the numbered name in
              DIR/.thumbs
Examples
Here are a few examples of how to use the vinetto command :
How to display metadata contained within a Thumbs.db file
    $ vinetto /path/to/Thumbs.db

How to extract the related thumbnails to a directory
    $ vinetto -o /tmp/vinetto_output /path/to/Thumbs.db
How to extract the related thumbnails to a directory and produce an html report to preview these thumbnails through your favorite browser.
    $ vinetto -Ho /tmp/vinetto_output /path/to/Thumbs.db

2      PASCO

Many computer crime investigations require the reconstruction of a subject's internet activity. Since this analysis technique is executed regularly, we researched the structure of the data found in Internet Explorer activity files (index.dat files). Pasco, the latin word meaning "browse", was developed to examine the contents of Internet Explorer's cache files.
Pasco is a forensic tool for reading the index.dat file that are created by Internet Explorer. Other browser like Firefox and Safari don’t use the index.dat file. The index.dat file leaves traces of a user’s browsing history.
Command:
find /mnt/had –name index.dat # to find the index.dat file #
pasco “/mnt/hda/Documents and Settings/baduser/Local Settings/History/History.IE5/index.dat”>/mnt/win/share/forensic/browserhistory.txt # redirecting the index.dat file to a text file #

OpenSSL and SSL Certificate Configuration in Apache Tomcat Server



INTRODUCTION

SSL is an acronym for Secure Sockets Layer, an encryption technology. SSL creates an encrypted connection between your web server and your visitor web browser allowing for private information to be transmitted without the problems of eavesdropping, data tampering, or message forgery. To enable SSL on a website, we will need to get an SSL Certificate that identifies you and install it on the server. When an SSL certificate is installed on a website, we can assure that the information you enter (contact or credit card information), is secured and only seen by the organization that owns the website.

SSL “HOW IT WORKS ?”

What Happens When a Browser Encounters SSL:
   1. A browser attempts to connect to a website secured with SSL.
   2. The browser requests that the web server identify itself.
   3. The server sends the browser a copy of its SSL Certificate.
   4. The browser checks whether it trusts the SSL Certificate. If so, it sends a message to the server.
   5. The server sends back a digitally signed acknowledgement to start an SSL encrypted session.
   6. Encrypted data is shared between the browser and the server.

Encryption Protects Data During Transmission:

Web servers and web browsers rely on the Secure Sockets Layer (SSL) protocol to help users protect their data during transfer by create a uniquely encrypted channel for private communications over the public Internet. Each SSL Certificate consists of a key pair as well as verified identification information. When a web browser (or client) points to a secured website, the server shares the public key with the client to establish an encryption method and a unique session key. The client confirms that it recognizes and trusts the issuer of the SSL Certificate. This process is known as the "SSL handshake" and it begins a secure session that protects message privacy and message integrity.
When a browser connects to a server, the server sends the identification information to the browser.
To view a websites’ credentials:
    * Click the closed padlock in a browser window
    * Click the trust mark (such as a Norton Secured Seal)
    * Look in the green address bar triggered by an Extended Validation (EV) SSL


Step 1 : Installation of Apache Tomcat Web Server on Windows
Before installing Tomcat, make sure you have a Java Runtime Environment (JRE) on your machine. A JRE can be downloaded from http://www.javasoft.com/
Once you have a JRE installed, you can install Tomcat. To get Tomcat, visit the following link: http://tomcat.apache.org/  Once there, click on the Tomcat 5.5 link under the Download heading. Under Core, select the Windows Service Installer.
After downloading, launch the installer. If using Windows Vista, right-click and select "Run as Administrator". The installation process is self-explanatory. After the installer finishes, Tomcat is installed and the Tomcat service is started and listening on the port you specified during the install process, the default of which is 8080.
Tomcat can be stopped and started via the control panel - administrative tools - services - Apache Tomcat service.
To test the tomcat installation, enter the following in your web browser:

http://localhost:8080/

If the apache tomcat page shows up, the installation was successful.
Keep your web pages in the C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps directory.
Step 2 : Create 3-Level Hierarchical Trust Model using Openssl
·         Download Openssl from the link: http://www.openssl.org/related/binaries.html and install it by double click on the setup file and then next , next and finish.
·         Now set the path for OpenSSL
We have to go into Computer properties and then to the advanced tab. Go to Advanced tab into the environment variables, then in user variable name and write the path of the openssl/bin in the variable value and terminate with the semicolon (;)
 Make the folder in the C Drive named ssl with hierarchy /usr/local/ssl and copy the openssl.cnf file from openssl folder in the C Drive in GNUwin32 to the ssl directory.

Now we have to create a ROOT CA
//Create a folder/directory for ROOT CA in any location by below command, any name can be given but here we are giving name RootCA and we are creating in Desktop.

-          mkdirRootCA

// Check whether directory got created or not with the below command

-          dir

// Go inside the directory with the below given command


-          cd RootCA

// Make directories inside the ROOTCA directory with the help of below given command to keep the certificates (Which we will be creating later)

-          mkdir certs,crl,newcerts, private

// Check whether directories got created or not with the below command

-          dir

-          copy nul index.txt
or
Right click in the RootCA folder somewhere and create the new file named as index.txt

// Make an text file named serial and write serial no. inside it with the following command

-          echo 01 > serial

// Copy openssl.cnf file from openssl folder to RootCA folder and also to the usr/local/ssl folder

// Generate a private key
-          opensslgenrsa -des3 -out private/RootCA.key 1024

// Create a self-signed certificate using private key

opensslreq -new -x509 -nodes -sha1 -days 1825 -key private/RootCA.key -out RootCA.pem




// Do the following changes in openssl.cnf file which is inside RootCA folder
In openssl.cnf file change following:

-          basic constraints: FALSE  

to

-          basic constraints: TRUE
-          // We will find three occurrences of these values

[ CA_default ]

-          dir = ./

-          certificate= $dir/RootCA.pem                 # The CA certificate

-          private_key            = $dir/private/RootCA.key     # The private key




Now we have to create a CA

// Be inside the ROOT CA Directory and create directory /folder for CA, any name can
be given but here we are giving the name CA

-          mkdir CA
// Go inside the CA directory with the following command
-          cd CA
// Copy the openssl.cnf file from openssl folder to CA folder

// Make the directories inside the CA directory to keep the certificates for CA
-          mkdir certs crlnewcerts private
// Check whether directories got created or not with the below command
-          dir
// Make an empty text file named as index.txt

-          copy nul index.txt
or
Right click in the CA folder somewhere and create the new file named as index.txt
// Make an text file named serial and write serial no inside it with the following
Command:
-          echo 01 > serial


Generate the CA key:

-          opensslgenrsa -des3 -out private/CAKey.pem 1024

// Generate a signing request (valid for 1year)

-          opensslreq -new -sha1 -key private/CAKey.pem -out CA.csr

// Copy the sign request CA.csr from CA directory to the ROOT CA directory .

// Come out of CA directory with the help of following command

-          cd ..

// Now you will be in the ROOT CA directory so sign the request using the following
command

-          opensslca -extensions v3_ca -days 365 -out CA.crt -in CA.csr -configopenssl.cnf

// Copy  CA.crt from Root CA to CA folder

// Go inside the CA folder with the following

-           cd CA

// Do the changes in the openssl.cnf file which is inside the CA folder as suggested
below

       -      [CA_default ]dir = ./

-          certificate = $dir/CA.crt # The CA certificate



-          private_key = $dir/private/CAkey.pem# The privatekey


Create end-user certificate

// Make sure you are in the CA folder and not in the Root CA

// Create the private key

-          opensslgenrsa -des3 -out server.key1024 //generate a certificate sign request

 opensslreq -new -key server.key -out server.csr

// Sign the request with the CA

-          opensslca -configopenssl.cnf -policy policy_anything -out server.crt –infiles server.csr

 
//Export the Private Key in the .P12 format certificate

openssl pkcs12 -export -in server.crt -inkeyserver.key -out server.p12

// Import server.p12 file in personal tab in the IE browser.

// Import CA.crt file in Intermediate Certification Authorities tab in the IE browser.

// Import RootCA.pem file in Trusted Root Certification Authority tab in the IE browser.

Using the Jetty Software

This software is used to convert .p12 file (which is used to store the private key along with X.509 certificate) into jks(java key store)

Copy the .p12 file in any folder, here we are keeping in the desktop folder named “Convert”
Copy the Jetty-6.1.25.jar in the same Convert folder which is on the Desktop
Before opening the command line we have to set the environment variables of java in the environment variables option, As:
-           Variable name =  JAVA_HOME
 Variable value =  C:\Program Files\Java\jdk1.5.0_13    // no need of
semi-colon at the end
-           Variable name = PATH
 Variable value = C:\Program Files\Java\jdk1.5.0_13\bin;   // mandatory 
to terminatedthe path with semi-colon
Now, Open the command line(cmd) and then go inside the folder where .p12 and Jetty are being copied
Then we have to type the following command in windows:
-          java –classpath .;jetty-6.1.25.jarorg.mortbay.jetty.security.PKCS12Import server.p12 output.jks


Step 3 : Configuring server.xml in Apache Tomcat 5.5

Go to the following path:
C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf

Now open the server.xml and copy the below code at:
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
port="8443" maxHttpHeaderSize="8192"          // Here https port no. is 8443                
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="C:\server.jks"          // Place the server.jks file in C:\ Drive
keystorePass="1234567"                // Here we use password of the server.jks is 1234567
truststoreFile="C:\truststore.jks"    // Place the truststore.jks file in C:\ Drive
truststorePass="1234567" />           // Here we use password of truststore.jks is 1234567

Now to make specific page run on the https

We have to go to the Apache Tomcat 5.5 folder which is installed in C Drive in program files.
In the web apps and in web.xml file of the WEB-INF folder in the bottom we have to insert the code written below:
<security-constraint>
<web-resource-collection>
<web-resource-name>test</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

If you omit the <transport-guarantee>CONFIDENTIAL</transport-guarantee> tag (or the whole <security-constraint>) your application will be available through both HTTP and HTTPS. If your web.xml contains <transport-guarantee>CONFIDENTIAL</transport-guarantee> Tomcat automatically redirects the requests to the SSL port if you try to use HTTP.

Now in the place of “/*” in above code, if we keep any web page then the specific web page will run on https.
If we don’t write anything in that column, then by default all the web pages will be running on https or on the specific port which will be mentioned there by us.
C:\Program Files\Apache Software Foundation\Tomcat5.5\webapps\ROOT\WEB-INF
From the above folder copy “web.xml” and “lib” to C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\test
Here “test” folder is created by us or admin in webapps folder in which all the web pages and web.xml, lib files are kept.


Meanings

1.      .pem – Privacy Enhanced Mail Security Certificate. In cryptography, a public key certificate is a certificate which uses a digital signature to bind together a public key with an identity.

2.      .csr – Certificate Signing Request File. Contains an encrypted block of text that identifies the applicant of the certificate, includes encrypted data of all the fields user has entered.

3.      .p12 – It is used to store the private key along with X.509 certificate. It is one of the family of standards called Public key Cryptographic Standards.

4.      .crt – Certificate file. This file is in pem format. It can be used with different programs and devices that use certificates. This can be publically distributed.

5.       .cnf–Configuration file type. It is associated with IBM.

6.       .crl – certificate revocation list .This file can be publically distributed.

7.      .pkcs 12 PKCS 12 defines an archive file format commonly used to directly store a private key along with its X.509 certificate.

8.      nul – It is a magic command that always creates an empty file and throws anything you want that you type in it.

9.      genrsa – This command generates an RSA private key.

10.   Des3 (Triple Data Encryption Standard ) – The original DES key size was 56 bits which was generally sufficient, but was vulnerable to brute force attacks, hence triple DES provides a relatively strong algorithm by increasing the key size to protect against such attacks. Triple DES uses 168 bits of key but only provides effective security of 112 bits. Ex – Microsoft Outlook, Electronic Payment, Microsoft OneNote uses password to protect user content and system data.

11.  rootCA.key – It is the name of the key file which we have created.

12.  1024 – It refers to 1024 bit long RSA private key.

13.  reqX.509 Certificate Signing Request (CSR) Management. By default a certificate is expected on input. With this option a certificate request is expected instead. It requires the bits to be used, key size, the attributes of the file and the name of the file.

14.   sha1 – Message digest.

15.   -days 1825 – The certificate is valid for 1825 days.

16.   rootCA.pem – A file which binds the public key and the RootCA private identity key.

17.   ca – Certificate Authority Management.

18.   -days 365 – The certificate is valid for 365 days.

19.   rand – For generating the pseudo-random bytes.

20.   -extensions v3 – The section to add to a certificate from. If this option is not specified then the extension should either be contained in the   unnamed section or the default section contain a variable called extensions  which contains the sections to use.

21.   -policypolicy_anything – The fields about the country name, state, province, organization name and the owners name is entered and is required to match to that of the CA certificate.