Assessing Your Vulnerability
It is a common mistake for people to assume that switching on a firewall makes them safe. This is not the case and, in fact, has never been the case. Each system has distinct security needs, and taking the time to customize its security layout will give you maximum security and the best performance.
The following list summarizes the most common mistakes:
- Installing every package Do you plan to use the machine as a DNS server? If not, why have BIND installed? Go through Synaptic and ensure that you have only the software you need.
- Enabling unused services Do you want to administer the machine remotely? Do you want people to
- upload files? If not, turn off SSH and FTP because they just add needless attack vectors. This goes for many other services.
- Disabling the local firewall on the grounds that you already have a firewall at the perimeter In security, depth is crucial: The more layers someone has to hack through, the higher the likelihood she will give up or get caught.
- Letting your machine give out more information than it needs to Many machines are configured to give out software names and version numbers by default, which is just giving hackers a helping hand.
- Placing your server in an unlocked room If so, you might as well just turn it off now and save the worry. The exception to this is if all the employees at your company are happy and trustworthy. But why take the risk?
- Plugging your machine into a wireless network Unless you need wireless, avoid it, particularly if your machine is a server. Never plug a server into a wireless network because it is just too fraught with security problems.
Understanding Computer Attacks on Ubuntu
Understanding Computer Attacks
There are many ways in which computer attacks can be divided, but perhaps the easiest is internal, which are computer attacks done by someone with access to a computer on the local network, and external, which are attacks by someone with access to a computer through the Internet. This might sound like a trivial separation to make, but it is actually important: Unless you routinely hire talented computer hackers or allow visitors to plug computers into your network, the worst internal attack you are likely encounter is from a disgruntled employee.
Hacker Versus Cracker
In earlier days, there was a distinction made between the words hacker and cracker. A hacker was someone who used technology to innovate in new or unusual ways, whereas a cracker was someone who used technology to attack another's computers and cause harm.
This distinction was lost on the general public, so the term hacker has now come to mean the same as cracker.
Although you should never ignore the internal threat, you should arguably be more concerned with the outside world. The big bad Internet is a security vortex. Machines connected directly to the outside world can be attacked by people across the world, and invariably are, even only a few minutes after having been connected.
This situation is not a result of malicious users lying in wait for your IP address to do something interesting. Instead, canny virus writers have created worms that exploit a vulnerability, take control of a machine, and then spread it to other machines around them. As a result, most attacks today are the result of these autohacking tools; there are only a handful of true hackers around, and, to be frank, if one of these ever actually targets you seriously, it will take a mammoth effort to repel him regardless of which operating system you run.
Autohacking scripts also come in another flavor: prewritten code that exploits a vulnerability and gives its users special privileges on the hacked machine. These scripts are rarely used by their creators; instead, they are posted online and downloaded by wannabe hackers, who then use them to attack vulnerable machines.
So, the external category is itself made up of worms, serious day job hackers, and wannabe hackers (usually called script kiddies). Combined they will assault your Internetfacing servers, and it is your job to make sure your boxes stay up, happily ignoring the firefight around them.
On the internal front, things are somewhat more difficult. Users who sit inside your firewall are already past your primary source of defense and, worse, they might even have physical access to your machines.
Regardless of the source of the attack, there is a five-step checklist you can follow to secure your box:
1. Assess your vulnerability. Decide which machines can be attacked, which services they are running, and who has access to them.
2. Configure the server for maximum security. Only install what you need, only run what you must, and configure a local firewall.
3. Secure physical access to the server.
4. Create worst-case-scenario policies.
5. Keep up-to-date with security news.
Howto: Sniff Gmail and Windows Passwords with ettercap on Ubuntu Linux
What You Will Need
*A Ubuntu machine to perform the ettercap hackery
*A Windows machine to act as a file server (your virtual Windows XP machine will work)
*Another Windows machine to be a client (your host Windows XP machine will work)
Start Your Ubuntu Virtual Machine
1. Start your Ubuntu machine and log in as usual.
Installing ettercap
2. From the menu bar in the upper left corner of the Ubuntu desktop, click Applications, Add/Remove.
3. In the Add/Remove Applications box, in the Search field, enter ettercap and press the Enter key.
4. When the ettercap application appears, as shown below on this page, check the check box in the Application pane. In the “Apply the following changes?” box, click Apply. Enter your password when you are prompted to. Wait while software downloads and installs.
5. When you see a Changes applied box saying that the changes were successful, click Close.
Starting ettercap
6. From the Ubuntu menu bar, click Applications, Accessories, Terminal.
7. In the terminal window, enter this command, then press the Enter key:
ettercap --help
8. In the terminal window, enter this command, then press the Enter key:
sudo ettercap –i eth1 –Tq -d
Enter your password when you are prompted to. This command starts ettercap in text mode, with DNS resolution of IP addresses. There are several lines of introductory information, as shown to the right on this page, followed by the message “Text only Interface activated…”. This window is now sniffing all network traffic to find passwords.
Logging in to mail.google.com with Firefox from Ubuntu
9. Leave the Terminal window open.
10. From the menu bar in the upper left corner of the Ubuntu desktop, click Applications, Internet, Firefox Web Browser.
11. Type in the address mail.google.com and press the Enter key. Enter your name into the Username field. Put in a password of FromUbuntu and press the Enter key.
12. When a box pops up asking whether you want Firefox to remember this password, click “Not now”. After a few seconds, you will see a message saying Username/Password Failure.
13. Close or minimize the Firefox window. The ettercap window should now show the name and password you typed in.
Logging in to mail.google.com with Firefox from Windows
14. Leave the Terminal window open.
15. Go to a Windows machine. You could use your host system, or any computer in the room.
16. On the Windows machine, open a Web browser and go to mail.google.com
17. Enter your name into the Username field. Put in a password of FromWindows and press the Enter key.
18. When a box pops up asking whether you want the browser to remember this password, click “Not now”. After a few seconds, you will see a message saying Username/Password Failure.
19. Look at your Ubuntu machine now. The ettercap window should now show both names and passwords.
Setting up a File Share on a Windows Machine
1. Start a Windows XP virtual machine. You can use the same host machine you are running Ubuntu on, or any other host computer on the LAN. Log in as usual.
2. Click Start, My Computer. In the My Computer window, click Tools, Folder Options. In the Folder Options box, click the View tab. Scroll to the bottom of the list and make sure the Use simple file sharing (recommended) box is checked, as shown to the right on this page. Click the OK button.
3. Right-click the desktop and select New, Folder. Name the new folder YourNameShare. Don’t use the literal text “YourName”—instead use your own name.
4. Right-click the YourNameShare folder and click Sharing and Security.
5. If you see a window with text saying “If you understand the security risks, but want to share files without running the wizard, click here.” If you don’t see that box, that’s OK, just proceed to the next step.
6. In the YourNameShare Properties box, click the Share this folder button, as shown to the right on this page. Accept the default selections for the other options and click the OK button. This machine is now a File Server.
7. On your File Server Windows machine, click Start, Run, enter CMD, and press the Enter key. Find the IP address of your Windows machine and write it down.
Connecting to the File Share From a Different Windows Machine
8. Go to a different Windows machine, such as the host Windows XP system. Click Start, Run. In the Run box, enter two backslashes and the IP address you wrote in the box above, as shown to the right on this page. Use the IP address of your own Windows XP file server. Press the Enter key.
9. If a Connect to box appears, requesting a User name and Password, just click Cancel.
10. Look at your Ubuntu machine now. The ettercap window should one or more password hashes, as shown below on this page. It’s possible to crack these hashes, but it can be difficult. You need to use a tool like John the Ripper.
11. If you don’t see any hashes, try opening any local network share from any computer. The simplest way to do it is to go to any host Windows XP machine, click Start, Run and enter \\192.168.1.3
HOWTO: Tunnel Gnome, KDE, and X11 applications through SSH
Besides offering the user a remote shell, SSH can also run X11 applications on a remote computer. This extends even to desktop environments such as GNOME and KDE, as they consist of a collection of separate applications.
I have used this method with two computers running Kubuntu 7.04. However, the computers do not necessarily need to run the same environment or even the same distribution.
1. On the server, install a desktop environment and OpenSSH server, if they are not already present. An X server is not required.sudo aptitude install openssh-server
3. On the client, press Ctrl+Alt+F1 to show a terminal. Log in and typexinit /usr/bin/xterm -- :1
Note: In distributions besides Ubuntu and Debian, the xterm executable may be in a different place. Use the command whereis xterm
4. In the new terminal, open an SSH connection to the server. Type:ssh -Y username@hostname
5. The SSH client will ask you for your server password. Enter it. :)
6. Now that you have a shell prompt, all you need to do is launch the desktop enviroment.
For GNOME: gnome-session
startkde
startxfce4
Howto: Local Password Encryption for Gaim and Pidgin
There is a patch for Gaim at http://dooglus.rincevent.net/gaim/ . Attached is a patch for Pidgin.
In order to use the patch, you will need a couple libraries and development headers.
sudo apt-get install libnspr4-0d libnss3-0d
sudo apt-get install libnss-dev libnspr-devDownload the patch into the same directory and do the following
tar xf master-password.patch.tar
patch -p 1 <>
./configure
make && sudo make installTo remove pidgin, run the following from the directory in which you built pidgin:
make uninstallHowto: Get DIVX Working through Swiftfox and VLC Player
This howto assumes that you have Swiftfox already installed. If you don't, what's keeping you? ;)
Step 1 - Install VLC
Follow the instructions for your particular version of Ubuntu according to the VLC Media Player's website.
The problem is, if you do: about:plugins
Step 2 - Hunt down the mozilla plug-in files
This is the most important part of this howto. For some reason, the mozilla-plugin-vlc package does not install the plugin where Swiftfox can access them. We need to find the .so and .xpt files and soft link them to our Swiftfox plugins directory.
First let's drill-down to the Swiftfox plugins directory.cd ~/.mozilla/plugins
ln -s /usr/lib/mozilla-firefox/components/vlcintf.xpt vlcintf.xpt
ln -s /usr/lib/mozilla-firefox/plugins/libvlcplugin.so libvlcplugin.so
Step 3 - Install and configure the Media Connectivity Add-On
You can scoop this up here. Restart Swiftfox and let the installation wizard run as it searches for your media players (you only really need VLC for everything). Once it's done, you'll be presented with a list of media formats and which application the Add-On should launch. Scroll down and look for the entry marked "DivX". Make sure the checkbox is ticked and enter this line as the default player: /usr/bin/X11/vlc
Done!
This howto won't help if you absolutely want to watch stuff off of stage6's website, but it works fabulously at tv-links.co.uk, even though a lot of their material is hosted at stage6.com. Simply click on the video to start.
Howto: Setup Ubuntu and XBOX Live to allow Xbox Live to pass through
I have borrowed this technique from this post, but made it shorter.
First, go into terminal and type this:
sudo gedit /etc/rc.local
ifconfig eth0 up
ifconfig eth0 192.168.2.1
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ethX -s 192.168.2.1/24 -j MASQUERADE
Hookup your Xbox360 and your computer via Ethernet and boot up the Xbox360 without a game in it. Go to Network Settings and Edit Settings. Now change these things:
IP Address: 192.168.2.2
Subnet mask: 255.255.255.0
Gateway: 192.168.2.1
It will ask you to test these settings. Test Xbox Live. You should get an IP, but no DNS. Go to Edit settings once it's finished.
Your DNS should be the router's IP Address. To check it, return to your computer, right-click the wireless bars/two computers in the taskbar. Click 'Connection Information'. The Default route should be the router's IP address.




