Thursday, July 28, 2011
Use Facebook at Office Work in form of Excel Sheet without getting caught
Saturday, May 14, 2011
Hping Examples
- --flood: sent packets as fast as possible. Don't show replies.
- --rand-dest: random destionation address mode. see the man.
- -V <-- Verbose
- -c --count: packet count
- -d --data: data size
- -S --syn: set SYN flag
- -w --win: winsize (default 64)
- -p --destport [+][+]
destination port(default 0) ctrl+z inc/dec - -s --baseport: base source port (default random)
Anex A Hping3 Help
-h --help show this help
-v --version show version
-c --count packet count
-i --interval wait (uX for X microseconds, for example -i u1000)
--fast alias for -i u10000 (10 packets for second)
--faster alias for -i u1000 (100 packets for second)
--flood sent packets as fast as possible. Don't show replies.
-n --numeric numeric output
-q --quiet quiet
-I --interface interface name (otherwise default routing interface)
-V --verbose verbose mode
-D --debug debugging info
-z --bind bind ctrl+z to ttl (default to dst port)
-Z --unbind unbind ctrl+z
--beep beep for every matching packet received
default mode TCP
-0 --rawip RAW IP mode
-1 --icmp ICMP mode
-2 --udp UDP mode
-8 --scan SCAN mode.
Example: hping --scan 1-30,70-90 -S www.target.host
-9 --listen listen mode
-a --spoof spoof source address
--rand-dest random destionation address mode. see the man.
--rand-source random source address mode. see the man.
-t --ttl ttl (default 64)
-N --id id (default random)
-W --winid use win* id byte ordering
-r --rel relativize id field (to estimate host traffic)
-f --frag split packets in more frag. (may pass weak acl)
-x --morefrag set more fragments flag
-y --dontfrag set dont fragment flag
-g --fragoff set the fragment offset
-m --mtu set virtual mtu, implies --frag if packet size > mtu
-o --tos type of service (default 0x00), try --tos help
-G --rroute includes RECORD_ROUTE option and display the route buffer
--lsrr loose source routing and record route
--ssrr strict source routing and record route
-H --ipproto set the IP protocol field, only in RAW IP mode
ICMP
-C --icmptype icmp type (default echo request)
-K --icmpcode icmp code (default 0)
--force-icmp send all icmp types (default send only supported types)
--icmp-gw set gateway address for ICMP redirect (default 0.0.0.0)
--icmp-ts Alias for --icmp --icmptype 13 (ICMP timestamp)
--icmp-addr Alias for --icmp --icmptype 17 (ICMP address subnet mask)
--icmp-help display help for others icmp options
UDP/TCP
-s --baseport base source port (default random)
-p --destport [+][+]
-k --keep keep still source port
-w --win winsize (default 64)
-O --tcpoff set fake tcp data offset (instead of tcphdrlen / 4)
-Q --seqnum shows only tcp sequence number
-b --badcksum (try to) send packets with a bad IP checksum many systems will fix the IP checksum sending the packet so you'll get bad UDP/TCP checksum instead.
-M --setseq set TCP sequence number
-L --setack set TCP ack
-F --fin set FIN flag
-S --syn set SYN flag
-R --rst set RST flag
-P --push set PUSH flag
-A --ack set ACK flag
-U --urg set URG flag
-X --xmas set X unused flag (0x40)
-Y --ymas set Y unused flag (0x80)
--tcpexitcode use last tcp->th_flags as exit code
--tcp-timestamp enable the TCP timestamp option to guess the HZ/uptime
Common
-d --data data size (default is 0)
-E --file data from file
-e --sign add 'signature'
-j --dump dump packets in hex
-J --print dump printable characters
-B --safe enable 'safe' protocol
-u --end tell you when --file reached EOF and prevent rewind
-T --traceroute traceroute mode (implies --bind and --ttl 1)
--tr-stop Exit when receive the first not ICMP in traceroute mode
--tr-keep-ttl Keep the source TTL fixed, useful to monitor just one hop
--tr-no-rtt Don't calculate/show RTT information in traceroute mode
ARS packet description (new, unstable)
--apd-send Send the packet described with APD (see docs/APD.txt)
Tuesday, April 26, 2011
Find alive hosts in a network with ICMP nmap
If you want to know which servers or hosts are alive and responding to ping in your local network, you can use nmap
Using nmap to discover ‘alive’ machines on a Network
To use this command and get an effective response, the servers or hosts you are pinging need to respond to it, today a lot of hosts by default have a firewall, and will not respond to pings, so be aware of that.
The command is:
nmap -sP 10.1.1.*
This will have a response like this:
Nmap scan report for 10.1.1.1
Host is up (0.0060s latency).
Nmap scan report for 10.1.1.192
Host is up (0.0023s latency).
Nmap scan report for 10.1.1.193
Host is up (0.061s latency).
Nmap scan report for 10.1.1.198
Host is up (0.0046s latency).
Nmap scan report for 10.1.1.200
Host is up (0.0044s latency).
Nmap scan report for 10.1.1.254
Host is up (0.030s latency).
Nmap done: 256 IP addresses (6 hosts up) scanned in 2.94 seconds
Those are the machines on, in a holy day at my office.
Sunday, November 14, 2010
Lock Your PC
2. In the Create Shortcut dialog box, copy the following into the 'Type the location' of the item text box:
"rundll32 user32.dll,LockWorkStation" remove quotes while typing.
3. Click Next.
4. In "Type a name for this shortcut", type LOCK and Click Finish
5. Now just double click on the icon, your desktop will be locked.
Wednesday, April 28, 2010
Stop brute force attacks with these iptables examples
In cryptanalysis and computer security, a dictionary attack is a technique for defeating a cipher or authentication mechanism by trying to determine its decryption key or passphrase by searching likely possibilities.
A dictionary attack uses a brute-force technique of successively trying all the words in an exhaustive list called a dictionary (from a pre-arranged list of values). In contrast with a normal brute force attack, where a large proportion key space is searched systematically, a dictionary attack tries only those possibilities which are most likely to succeed, typically derived from a list of words for example a dictionary (hence the phase dictionary attack) or a bible etc. Generally, dictionary attacks succeed because many people have a tendency to choose passwords which are short (7 characters or fewer), single words found in dictionaries or simple, easily-predicted variations on words, such as appending a digit.
So as you can see, we have two "types of brute force attacks" those which use dictionary and those that does not. With this technique we will be protected from both of them.
This technique, uses iptables to block a particular IP, that has passed the threshold of a certain number of connections in a given period of time.
I will show here, some basic IPtables rules to protect a web server from brute force attacks, but this example can be adapted to other scenarios.
Basic rules, only open port 80 (http) and 22 (ssh)
This is written as a script that may be run each time your server start, or can configured to run iptables as daemon, as I will show you later.
iptables -F
iptables -A INPUT -i lo -p all -j ACCEPT
iptables -A OUTPUT -o lo -p all -j ACCEPT
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp ! --tcp-option 2 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport www -j ACCEPT
iptables -P INPUT DROP
This IPtables script example, will close all port but ssh and www ports, but our server is still open to brute force attacks, so let's close this by adding two more rules that will only permit a certain number of connections to our server from a given IP.
Stop brute force attacks
Here is the example that will stop the brute force attacks.
iptables -F
iptables -A INPUT -i lo -p all -j ACCEPT
iptables -A OUTPUT -o lo -p all -j ACCEPT
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp ! --tcp-option 2 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport www -j ACCEPT
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 600 \
--hitcount 2 -j DROP
iptables -P INPUT DROP
If we now run
sudo iptables -L
This is the output
Chain INPUT (policy DROP)
target prot opt source destination
DROP tcp -- anywhere anywhere tcp dpt:ssh state NEW recent: UPDATE seconds: 600 hit_count: 2 name: DEFAULT side: source
tcp -- anywhere anywhere tcp dpt:ssh state NEW recent: SET name: DEFAULT side: source
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
REJECT tcp -- anywhere anywhere tcp option=!2 reject-with tcp-reset
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:www
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
The last two lines do the trick. Here is a simple explanation of what they do:
This line:
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set
Starts a table with each IP that starts a connection to ssh port.
And this one:
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 600 \
--hitcount 2 -j DROP
Counts the number of connections that IP makes to our server in time frame of 600 seconds, if the number of connectios passed 2 (hitcount). The server will not accept any more connections from that IP for 600 seconds.
You can adjust those values to better fit your needs.
Make it automatic
If you are running Debian or Ubuntu you may run:
sudo /etc/init.d/iptables save
If you are running Arch Linux run:
sudo /etc/rc.d/iptables save
And add iptable to the daemons part in the /etc/rc.conf file.
Logging the connections
If you want to keep a log of the failed connections write something like this:
iptables -F
iptables -A INPUT -i lo -p all -j ACCEPT
iptables -A OUTPUT -o lo -p all -j ACCEPT
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp ! --tcp-option 2 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport www -j ACCEPT
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 600 \
--hitcount 2 -j LOG
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 600 \
--hitcount 3 -j DROP
iptables -P INPUT DROP
Look that the LOG line has a hitcount number minor that the DROP line, this will make iptables to write a line like this:
Apr 26 20:44:44 arch kernel: IN=eth0 OUT= MAC=00:19:d1:ea:e6:3f:00:11:2f:8f:f8:f8:08:00 SRC=97.107.x.x DST=200.87.x.x LEN=60 TOS=0x00 PREC=0x00 TTL=52 ID=37839 DF PROTO=TCP SPT=50094 DPT=22 WINDOW=5840 RES=0x00 SYN URGP=0
Monday, March 1, 2010
Modify GRUB
If your install of Linux is a dual boot setup with windows() you have run into this problem before. You reinstall windows and suddenly you can no longer access your Linux partition or the Grub bootloader. You can always go thrugh the entire install of Ubuntu again, or you can try to repair the bootload, but how do you repair the bootloader?
Well friends if you have the live CD for which ever distro you are using (that installed Grub) it is quite easy and can save you hours of reconfiguration as well as install time.
1. Find your Live CD and boot it up (set your BIOS to boot from CD first, or if your BIOS allows it you can select the boot device.
2. After the Live CD does its thing you will need to open a terminal screen and type in the command: sudo grub. This command will bring you into the grub prompt
3. Type the following commands assuming sda0 is which ever partition you are using (hd0,0 would be first hard drive and first prompt, hd1,1 would be the second hard drive and second partition).
> root (hd0,0)
> setup (hd0)
> exit
4. Reboot the system and remember to remove your Live CD before your system reboots
5. At reboot you should now see the Grub boot loader along with all your previous setting.
If with the new setup you now see Ubuntu but no longer see a windows menu item follwo the following steps.
If Ubuntu was installed before your Windows version there will be no information in the Grub confiruation for your windows setup. To get windows setup in Grub you will need to do a bit more tweeking.
Boot into Ubuntu and run the following command:
sudo gedit /boot/grub/menu.lst
Inside this file you will see an example for a windows choice for when Grub runs. *COPY* the exmple and remove the “#” from the beginning of each line
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
Remember you will need to change the hd0,0 to which ever if your windows partition, it may take a few trys, but if you were able to select the correct partition for Linux when resetting up Grub you should be able to figure out the correct partition for Windows.
Courtesy:Linux Tricks
Thursday, March 26, 2009
Be CAREFUL, If U use Cyber Cafe for Personal Use
Sounds dangerous, so if you travel a lot or uses cyber café for internet access, be careful!
A new device has been introduced to the marketplace that is a huge danger to anyone who uses a PC that is not theirs. It is known as a key tracker and it sits between the keyboard and the PC. As can be seen in the pictures it is very discreet but is probably one of the most dangerous items of equipment to personal information that is readily available. These devices record every key that is pressed on the keyboard. Due to it's position (it sits between the keyboard and the PC) the information is logged by the tracker before the PC knows about it and as such is very difficult for the PC to detect. They are available in both USB and PS2 formats so pretty much any PC can be logged. The user puts the tracker in line, leaves it there for a set amount of time and then retrieves it. They can then download the data onto their own PC.
If you intend to use a PC that is not yours (i.e. hotel business centre, internet café, airport etc) I would advise looking at the back of the PC to see if one of these trackers has been placed in line (scrambling under a desk is the better alternative to losing your email details). If you cannot get to see the back of the PC, I would suggest you don't use it for anything personal. If a tracker is there and you do not notice it, whoever placed it there (could be any user of that PC before you) will be able to recall all of your keystrokes – logins, passwords etc.
TAKE CARE OF U R PERSONAL DATA
WISH U ALL THE BEST
Thursday, November 13, 2008
BYPASS FIREWALL 4 GOOGLE
-----------------------------------------------------------------------
1. Using Google services to bypass a firewall to access blocked sites
-----------------------------------------------------------------------
In this hack we try to exploit Google's Translation service to bypass the
firewall to access orkut. If you notice the url it is translating from English
to English.
Use the given link below and try logging in to orkut.
http://www.google. com/translate? langpair= en|en&u=www.orkut. com
sometimes the link may break out from the frame example when you initially
login into Orkut. It might redirect you back to http://www.orkut. com in which
case again use the given link above.
-----------------------------------------------------------------------
Next is using the Google Mobile Search to access blocked Websites.
------------------------------------------------------------------------
http://www.google. com/xhtml
This is not a great option since it displays them as it would look like when
you are viewing them on a mobile phone. Also it strips out all the javascript
content and CSS scripts and breaks a longer page into several smaller pages.
Example http://www.google. com/gwt/n? u=clazh.blogspot .com
--------------------------------------------------------------------------
2. Using a Proxy Server For bypassing Firewalls at office.
---------------------------------------------------------------------------
First find a "proxy server." Simply search the internet for "proxy servers".
(Even a good proxy server might not work later. Therefore, learn how to find
them. For these instructions, we will use an actual proxy server in Taiwan
with the technical specs "address 139.223.199. 194" and "port 8080". Try these
links List of Proxies A directory of free web-based proxy services and A
Directory of free proxy servers ) Then proceed as follows:
Internet Explorer 6.0
1. On the Tools menu in Internet Explorer, click Internet Options, click the
Connections tab, and then click LAN Settings.
2. Under Proxy server, click to select the Use a proxy server for your LAN
check box.
3. In the Address box, type the IP address of the proxy server.
4. In the Port box, type the port number that is used by the proxy server for
client connections (by default, 8080).
5. You can click to select the Bypass proxy server for local addresses check
box if you do not want the proxy server computer to be used when you connect
to a computer on the local network (this may speed up performance) .
6. Click OK to close the LAN Settings dialog box.
7. Click OK again to close the Internet Options dialog box.
----------------------------------------------------------------------------
3. Using IP resolution to bypass weak firewalls to access blocked sites
-----------------------------------------------------------------------------
BlockedThis is for all those pathetic souls out there who are sad and worried
sitting in their office cubicle behind a firewall/filter, which has rendered
your dear old orkut inaccessible ! Well, just as something to do with my free
time today as my brain was unable to solve a bug in my current code, I decided
to break open the filter settings of orkut being inaccessible ! Pre-requisites
* Need to keep trying and trying hard @ breaking stuff
* A lil bit know-how of using computers... Essentially the mantra of Ctrl+C
and Ctrl+V
* Ability to browse
That's right - anybody with the basics of browsing can break open the filter
for orkutting Principle behind the breaking This section can be skipped by the
people who are not interested in learning why you can break open a filtered
site! Essentially what your filter is checking for is the domain name to be
blocked. IOW, the filter would search for ur HTTP header for the domain name
to be say www.orkut.com and will block any headers from proceeding to the
website ! Now, how can we hack this? The answer is much simpler than it seems
actually. At least for my case, I just replaced the domain name by its
corresponding IP address. For e.g. the time when I wanted to access orkut.com
I went to Convert Host Name to IP Address or Find IP address of a host - e.g.
find IP address of host name of and found out the IP address of www.orkut.com
Replace the www.orkut.com occurrence in the URL on your web-address by the
corresponding IP. Boom, everything starts working!! Instructions specific to
accessing orkut With orkut you require a little bit more patience...
IP Address
Step 1: Get the IP address of orkut.com from here, and let's say it's named
X.X.X.X
Step 2: Type http://www.orkut. com/GLogin. aspx?done= http%3A%2F% 2Fwww.orkut.
com%2F and replace "www.orkut.com" with the IP address you have located. So,
the address should be http://X.X.X.X/GLogin.aspx? done=http% 3A%2F%2FX.X.X.X%2F
Replaced URL
Step 3: This would lead you to another blocked page, wherein the site address
on the top/or the URL that was blocked needs to be retrieved... Usually it's
of this type - http://www.orkut. com/RedirLogin. aspx?page= http://www.
orkut.com/ Home.aspx? xid=::weirdnumbe rhere::
New URL
Login screen
A ray o hope?
Step 4: Replace www.orkut.com with the IP address and the ::weirdnumberhere: :
with your unique XID [Everybody has a unique id], and click on enter.
Replaced New URL
You are through, pathetic soul !
Tadaaa
Note: Put Screenshots in!! P.S. Please if you are asking questions, gimme the
exact steps you followed in the comment! Thanks P.P.S: I am not responsible
for any loss of jobs, firings, hirings etc because you followed my
instructions! ! Thanks and have a nice day!! !
4. Using the TOR Network Tor (The Onion Router) to bypass firewall
restrictions Only For Advanced users.
Tor (The Onion Router) is a free software implementation of second-generation
onion routing — a system enabling its users to communicate anonymously on
the Internet. Originally sponsored by the US Naval Research Laboratory, Tor
became an Electronic Frontier Foundation (EFF) project in late 2004. The EFF
supported Tor financially until November 2005 and continues to provide web
hosting for the project.