You can give user based web pages in your apache based  server.

Follow the simple steps shown below after installing apache:

$ cd /etc/apache2/mods-enabled

$ sudo ln -s ../mods-available/userdir.conf userdir.conf

$ sudo ln -s ../mods-available/userdir.load userdir.load

$ sudo /etc/init.d/apache2 restart

and

make directory at your home folder named public_html as normal user($ mkdir public_html)

now browse with address

http://127.0.0.1/~username

Nmap (“Network Mapper”) is a free and open source (license) utility for network exploration or security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime.

In addition to my list you can also check out this Comprehensive Guide to Nmap here and of course the man pages

Here are some really cool scanning techniques using Nmap:

1) Get info about remote host ports and OS detection

nmap -sS -P0 -sV -O <target>

Where < target > may be a single IP, a hostname or a subnet

-sS TCP SYN scanning (also known as half-open, or stealth scanning)

-P0 option allows you to switch off ICMP pings.

-sV option enables version detection

-O flag attempt to identify the remote operating system

Other option:

-A option enables both OS fingerprinting and version detection

-v use -v twice for more verbosity.

nmap -sS -P0 -A -v < target >

2) Get list of servers with a specific port open

nmap -sT -p 80 -oG – 192.168.1.* | grep open

Change the -p argument for the port number. See “man nmap” for different ways to specify address ranges.

3) Find all active IP addresses in a network

nmap -sP 192.168.0.*

There are several other options. This one is plain and simple.

Another option is:

nmap -sP 192.168.0.0/24

for specific  subnets

4)  Ping a range of IP addresses

nmap -sP 192.168.1.100-254

nmap accepts a wide variety of addressing notation, multiple targets/ranges, etc.

5) Find unused IPs on a given subnet

nmap -T4 -sP 192.168.2.0/24 && egrep “00:00:00:00:00:00″ /proc/net/arp

6) Scan for the Conficker virus on your LAN ect.

nmap -PN -T4 -p139,445 -n -v –script=smb-check-vulns –script-args safe=1 192.168.0.1-254

replace 192.168.0.1-256 with the IP’s you want to check.

7) Scan Network for Rogue APs.

nmap -A -p1-85,113,443,8080-8100 -T4 –min-hostgroup 50 –max-rtt-timeout 2000 –initial-rtt-timeout 300 –max-retries 3 –host-timeout 20m –max-scan-delay 1000 -oA wapscan 10.0.0.0/8

I’ve used this scan to successfully find many rogue APs on a very, very large network.

8) Use a decoy while scanning ports to avoid getting caught by the sys admin

sudo nmap -sS 192.168.0.10 -D 192.168.0.2

Scan for open ports on the target device/computer (192.168.0.10) while setting up a decoy address (192.168.0.2). This will show the decoy ip address instead of your ip in targets security logs. Decoy address needs to be alive. Check the targets security log at /var/log/secure to make sure it worked.

9) List of reverse DNS records for a subnet

nmap -R -sL 209.85.229.99/27 | awk ‘{if($3==”not”)print”(“$2″) no PTR”;else print$3″ is “$2}’ | grep ‘(‘

This command uses nmap to perform reverse DNS lookups on a subnet. It produces a list of IP addresses with the corresponding PTR record for a given subnet. You can enter the subnet in CDIR notation (i.e. /24 for a Class C)). You could add “–dns-servers x.x.x.x” after the “-sL” if you need the lookups to be performed on a specific DNS server. On some installations nmap needs sudo I believe. Also I hope awk is standard on most distros.

10) How Many Linux And Windows Devices Are On Your Network?

sudo nmap -F -O 192.168.0.1-255 | grep “Running: ” > /tmp/os; echo “$(cat /tmp/os | grep Linux | wc -l) Linux device(s)”; echo “$(cat /tmp/os | grep Windows | wc -l) Window(s) devices”

Tool of the week – iptstate

Valic —  December 7, 2010 — Leave a comment

I recently came across this neat tool called IP Tables State or in short iptstate. It basically works like top but displays the network stat in real-time. It also has the ability to delete/remove an entry from the stat table.

This tool can be very helpful in troubleshooting or simply analyzing your stat table by sorting and filtering the table in several different ways such as by protocol or service.

Screen:

iptstate

Wine 1.3.8 Released

Valic —  December 2, 2010 — Leave a comment

The Wine development release 1.3.8 is now available.

Whats new in this release:

  • Icons in the “open with” menus.
  • Man pages for all installed binaries.
  • Support for schemas in MSXML.
  • Many installer fixes.
  • Translation updates.
  • Various bug fixes.

The source is available now. Binary packages are in the process of being built, and will appear soon at their respective download locations.

Bugs fixed in 1.3.8:

4098  Visual Basic 6 sp6 runtime installer: No progress window shown

6856  Civilization 4 fails to start

8107  Civilization 4 Warlords fails to start due to XML issues

12293  Warhammer 40K: dark crusade – Cursor is not properly drawn

14343  Bigfishgames “Play My Games” Crashes With “Unhandled page fault”

15195  People’s General randomly hangs with err:seh:setup_exception_record nested exception on signal stack

16548  qedit:mediadet.c test is skipped due to renaming a file

16842  Goldwave crashes

16988  Guild Wars – ‘blocky’ graphics

More : wine-reviews

Some SED Commands

Valic —  November 30, 2010 — Leave a comment

Sed is a stream editor. A stream editor is used to perform basic text transformations on an input stream While in some ways similar to an editor which permits scripted edits (such as ed), sed works by making only one pass over the input(s), and is consequently more efficient. But it is sed’s ability to filter text in a pipeline which particularly distinguishes it from other types of editors.

Here are some SED commands used by everyone:

1) Print all the lines between 10 and 20 of a file

sed -n ’10,20p’ <filename>

Similarly, if you want to print from 10 to the end of line you can use: sed -n ’10,$p’ filename

This is especially useful if you are dealing with a large file. Sometimes you just want to extract a sample without opening the entire file.

2) Check your unread Gmail from the command line

curl -u username –silent “https://mail.google.com/mail/feed/atom” | perl -ne ‘print “\t” if /<name>/; print “$2\n” if /<(title|name)>(.*)<\/\1>/;’

Checks the Gmail ATOM feed for your account, parses it and outputs a list of unread messages.

3) To print a specific line from a file

sed -n 5p <file>

You can get one specific line during any procedure. Very interesting to be used when you know what line you want.

4) Remove a line in a text file. Useful to fix “ssh host key change” warnings

sed -i 8d ~/.ssh/known_hosts

5) Recursive search and replace old with new string, inside files

grep -rl oldstring . |xargs sed -i -e ‘s/oldstring/newstring/’

recursively traverse the directory structure from . down, look for string “oldstring” in all files, and replace it with “newstring”, wherever found

also:

grep -rl oldstring . |xargs perl -pi~ -e 's/oldstring/newstring'