Tag: linux

  • Ubuntu Linux Video Tutorials.

    http://www.youtube.com/watch?v=h1Qulf8jr_M

    This tutorial explains how to install ubuntu with wubi and shows how to install drivers.

    OMFG I HAVE AN ACCENT!!11!!!

    I’ve made a bash script to make screencasting easier.

    I’ll adding more videos later.

    WINE

    http://www.youtube.com/watch?v=n8Vdf6ZG2a0

    Discuss
    http://www.totse.info/bbs/showthread.php?t=10271

  • A Guide To Choosing The Perfect Linux Distribution

    A Guide To Choosing The Perfect Linux Distribution

    “What distro should I choose?” is a very common question on a lot of Linux forums. The answer is always twofold:

    1. Depends on what you want to do with it
    2. Just install a lot of ’em untill you find one you like

    Both those answers are very true. I am going to give you a couple guidelines, but in the end, if you really wanna get into linux and computers, you just need to try out a lot of ’em.

    So, first, take a couple minutes of your time and think about these questions:

    1. What do I want to do with my computer?
    2. How much do I know about computers, operating systems etc?
    3. How much am I willing to learn about all this?
    4. How much effort do I want to put into configuring and tweaking my computer?

    If anywhere during question nr 1 you thought “Gaming!” you’ll need Windows, so you’ll at least need to dualboot. If you just wanna use your computer for web browsing, watching movies, watching porn, taking notes in class and basic office stuff, you can do that all in Linux. Open office’s functionality can be compared to Microsoft Office 2003, so don’t expect any of the advanced features, the amazing new intuitive layout or the advanced formatting options to be available. Also, some documents made in the office 2007 and later formats will not be opened correctly in open office, meaning the layout will be messed up if it uses the more advanced features. Other than that, pretty much anything a non-gaming person does can be done with most major distro’s without too much of a hassle. Most software development apps are available in any major distro.

    If you’re not very tech-savvy and not willing to learn about computers, you need to pick a “plug and play”-distro. Otherwise your computer will be unuseable.

    If you know how a computer works but don’t wanna put too much effort in it, you should lean towards the “plug and play” end of the spectrum, but you don’t have to.

    If you wanna learn about computers and linux and are willing to put a lot of time in your installation, the more advanced and technical-minded distro’s are what you’re looking for. Beware however, with some distributions it can take a week or longer to have a working desktop system.

    Now I’m gonna tell you about the major distro’s I’ve ran long enough to give a valid opinion, ranging from highest “plug-and-play” factor to most technical. Not the order in which I started using them, btw.

    Linux Mint
    Unless you’re running very old or exotic hardware, this is the plug-and-play distro of choice for complete newbies who don’t want to spend any more time configuring their system than absolutely necessary. Ubuntu-based, however, so that means it’s kinda slow and not the most stable distro available. Linux mint is meant to be installed and ran, not installed and tweaked. Configuration files contain non-standard code without proper comments, making it dificult to edit them yourself. The big advantage to this is that on most modern computers it will “just work”, the disadvantage is that if it doesn’t work for some reason it’s not easy to fix. Kinda like Mac OSx

    OpenSuse Linux
    This is my personal recommendation for a desktop distro. It’s “just works”-factor is lower than Linux Mint, but it’s a lot easier to start tweaking and changing things under the hood.

    Crunchbang Linux
    A Debian Testing rolling release (everything is constantly updated instead of only updating most apps when a new release comes out) derative. Considered beta-quality by it’s developers, but I haven’t had any more trouble with Crunchbang than with the two distro’s mentioned above. On the contrary. A bit less than OpenSuse concerning plug-and-play factor. Very lightweight, so good for turning that old laptop / desktop that has been collecting dust into a useable web-surfing and simple word processing box. Images are available for i486, i686 and AMD64 processor architecture.

    Non-technical newbies, your section just ended.

    Slackware Linux
    Very stable, conservative and very unix-like distro. Not a very newbie-friendly distro. All configuration is done by writing / editing textfiles. Applications are well-tested before they are added to the releases. This results in a very stable and relatively bug-free system. However, Slackware does not like advanced package managers. Basically it comes down to this: if it’s not in the standard installation, you’ll have to download the sources of the application and it’s dependencies, compile and install them all from source. This takes time. A lot of time. A HELL of a LOT of time. And you need to keep up to date on security updates of your extra packages. This has one huge advantage however: installing / updating one application is very unlikely to mess up other parts of your system. You can spend a week installing a couple applications and their dependencies and configuring your system, but once it works it will keep working untill you start messing with it again. And then only the parts you’re messing with can be broken, the rest will keep working. This is a huge advantage for mission-critical servers which run several applications and need to keep running, but if you want an up-to-date desktop distro with easy package management, Slackware is not the distro for you.

    Arch Linux
    Hands-on, lightweight, rolling-release, DIY, great package management, great wiki. Those are the keywords of Arch Linux. After the installation is finished you are left with a console-only distro and an awful lot of howto’s on the wiki. You’ll have to install and configure everything else yourself. If you do it right (I.E. if you follow the wiki) you’ll slowly build a system suited to your needs and likes as you go, while always updating to the latest stable packages.

    Gentoo Linux
    Gentoo Linux is basically the even more geekier elder brother of Arch Linux. The biggest differences are that the installation is harder on Gentoo (but far from impossible for newbies, Gentoo was my third distro) and in Gentoo everything is compiled on your computer. This means every package will fit your processor architecture and will only contain the parts you want it contain, but this also means installing larger applications and large updates can take a couple hours. Gentoo shares a lot if similarities with Arch linux, and you’ll notice a lot of people run both of them or switch now and then. A lot of former Gentoo users have moved to Arch however, because it takes less time and it’s documentation is a little less chaotic. I still feel a lot of sympathy towards Gentoo and often browse the forums, but I don’t run Gentoo anymore. The advantages of compiling everything from source are not big enough to make up for the disadvantages IMO.

    Discuss 

  • Privacy 101 – How to Use Truecrypt

    Privacy 101 – How to Use Truecrypt

    By trx100

     

    What is Truecrypt?

    As written on the Truecrypt website, Truecrypt is – Free open-source disk encryption software for Windows 7/Vista/XP, Mac OS X, and Linux.

    Where should I download it from?

    http://www.truecrypt.org/downloads

    So, how do I create an encrypted file container?

    Once you have downloaded and installed the Truecrypt software, you should go ahead and open it up. You should be presented with a window which looks something like this…
     

    Ubuntu Truecrypt

    • Click on the “Create Volume” button. From here, you can either create an encrypted file container on your HDD, or format an external drive or non-system partition which will then be encrypted. For the purpose of this tutorial, we’ll be creating an encrypted file container. If you wish to play around with the other option, it’s easy enough to follow and get working correctly.
    • Next, the program asks you if you wish to create a “Standard Truecrypt Volume”, or a “Hidden Truecrypt Volume”. The hidden option is fantastic, as it creates a container within a container, each with different passwords. This offers deniability in case you have to reveal your password – in which case you would reveal the password to your unimportant encrypted volume. For the sake of the guide though, we’re going to select Standard TrueCrypt Volume.
    • Choose your file location. Simple enough.
    • Choose your encryption strength and hash algorithm. I’d leave it all default (AES, RIPEMD-160).
    • Specify how much space you want to dedicate to your encrypted file container. Make it as big or as small as you need it to be.
    • Choose a password. Make it s STRONG password. Read the guidelines on creating a password, as using a dictionary word isn’t good at all. Make it significantly long, and jumbled.
    • Once you’ve done that, you need to decide on the type of filesystem you’re going to use. If you don’t, your filesystem won’t be able to be mounted by TrueCrypt and you wont be able to access your files. Just leave it on FAT.
    • Next up is the part where you need to move your mouse around the screen in a completely random manner. Do this for as long as you want, but remember that the longer you do it, the more random and strong the encryption keys will be.
    • Finally, hit the “Format” button. Your encrypted container has been created!

    How do I access the container?

    • Simple. When you’re on the main TrueCrypt screen, select a slot (anyone, it doesn’t matter). Then, hit the “Select File” button, browse to your encrypted container, and double click it. Once you’re brought back to the main screen, hit the “Mount” button, and put in your password.
    • Double click on the newly mounted drive, and use the encrypted file to your hearts content!

    Some words of wisdom by Negrophobe…

    From my basic knowledge and from confirmation from others who are better in the know with programming, there is no tampering or backdoors in thre.

    SERPENT 256 and TWOFISH 256 trump AES in algorithms; and truecrypt allows you to use all of them ontop of each other.

    Free encryption software is the best bet for you. You’re less likely to have some programmers who are doing this for free tricking you for the government. Obviously still check the source code (if it’s closed source it’s a good bet that it’s backdoored e.g. JAP) to make sure.

    With a laptop taken off the back of a van or where ever, with full encyption and random passwords on someone elses unsecure wifi; along with all flash drives encrypted and material saved onto; whilst using a VPN set up by you, or even tor; you should be relatively safe.

    Keep this hidden as well and have a decoy comp and PC which you use too.

    In the UK if they demand the password you can just give them the password to your work safe area whilst they can’t see any of the incriminating material, unless you give them the passphrase for that. Personally I would just stick with the 5 words instead of making their job easy.

    I’d recommend reading the dr who manual (I’ll upload it when I find which flash drive it’s on)

    Here’s some good links for you:

    You have nothing to lose and everything to gain, if you keep your mouth shut.

     

    Discuss

    http://www.totse.info/bbs/showthread.php?t=8082

  • Basic Port Scanning With Nmap

    Basic Port Scanning With Nmap

     

     

    What is Nmap all about?

    Taken from the Nmap website… (I bolded the best bits)

     

    Quote:
    Nmap (“Network Mapper”) is a free and open source (license) utility for network exploration or security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. It was designed to rapidly scan large networks, but works fine against single hosts. Nmap runs on all major computer operating systems, and official binary packages are avalable for Linux, Windows, and Mac OS X. In addition to the classic command-line Nmap executable, the Nmap suite includes an advanced GUI and results viewer (Zenmap), a flexible data transfer, redirection, and debugging tool (Ncat), and a utility for comparing scan results (Ndiff).

    What will this guide show me?

    I aim to give you a basic insight into how you can use Nmap through it’s command line interface to scan networks and individual hosts. I will also show you some different scan techniques, and provide a list of some ports and the services which run on them.

    Installing Nmap

    1. Visit the Nmap website – http://nmap.org/download.html
    2. Choose your OS, and follow the instructions.
    3. Keep in mind that I am writing this guide using Linux and a command line to run Nmap. If you’re on Windows, you’ll probably have the GUI version. While this looks different, you can use the same commands and it does the same thing.

    Obtaining a list of hosts through a ping scan

    If you’re on your own network, you should already know which devices are connected. To find the IP addresses of these, I usually run the following scan…

    nmap -sP 192.168.0.0-255

    This will pingscan the network between hosts 192.168.0.0 all the way up to 192.168.0.255. Once the scan is complete, you should see a result like this…

    Nmap Ping Scan

    Port Scanning a Host

    Once you have found the host you wish to scan, you can go ahead and scan it. Before scanning, you may wish to take a look at the list of scanning techniques on the Nmap website. These can be used to add extra functionality to your scans giving them more detailed results.

    The simplest port scan you could run would be as follows…

    • nmap 192.168.0.1 (replace IP address with your host of choice).

    In my case, this would be my router being scanned although I could have scanned any device on the network. It displays this output once I have scanned it…

    Nmap Port Scan Ubuntu

    From this screen, we can tell which ports are open or closed. In this case, my HTTP port (80) is open because I am running a webserver. However, this open port could be seen as a vulnerable hole in the firewall – something which could be used as a way into a system and a way of gaining a shell/complete access to a computer system.

    List of common TCP ports

    When port scanning (either from an attacking or defensive point of view), you’re looking for open ports and services which could be exploited in some way. Below is a list of the most commonly found TCP ports, and the services which run on them.

    20 FTP data (File Transfer Protocol)
    21 FTP (File Transfer Protocol)
    22 SSH (Secure Shell)
    23 Telnet
    25 SMTP (Send Mail Transfer Protocol)
    43 whois
    53 DNS (Domain Name Service)
    68 DHCP (Dynamic Host Control Protocol)
    79 Finger
    80 HTTP (HyperText Transfer Protocol)
    110 POP3 (Post Office Protocol, version 3)
    115 SFTP (Secure File Transfer Protocol)
    119 NNTP (Network New Transfer Protocol)
    123 NTP (Network Time Protocol)
    137 NetBIOS-ns
    138 NetBIOS-dgm
    139 NetBIOS
    143 IMAP (Internet Message Access Protocol)
    161 SNMP (Simple Network Management Protocol)
    194 IRC (Internet Relay Chat)
    220 IMAP3 (Internet Message Access Protocol 3)
    389 LDAP (Lightweight Directory Access Protocol)
    443 SSL (Secure Socket Layer)
    445 SMB (NetBIOS over TCP)
    666 Doom
    993 SIMAP (Secure Internet Message Access Protocol)
    995 SPOP (Secure Post Office Protocol)

    Summary

    This guide hasn’t been particularly in depth – I realize that. I have however, given you a slight nudge in the right direction with port scanning, and how you can do it. To understand it more, you should take the time to read some tutorials and guides on the subject. Here are some useful links.

    Nmap
    Backtrack Forums
    List of Nmap Commands
    Irongeek

  • Tips For Linux Newbies

    Tips For Linux Newbies

    I would like this thread to become a compilation of various tips and tricks Linux newbies usually learn through much cursing and reading countless man pages and forums. This is meant to save people time when creating a working Linux system. I’m primarily focussing on desktop configurations myself, but I don’t mind if you add server tips as well. I’m still learning about Linux every day, so if you do not agree with what I wwrite, feel free to comment.

    First of all, to the newbie: Linux is not Windows. No, you don’t need to read this whole rant, and no, I don’t agree with everything it says. It comes down to the fact that Linux is completely different from Windows. Linux is made by coders to do what they want it to do, not what the majority of people on this planet want. Because of that, it’s often more difficult to get something going, but once it’s up and running it usually works very well. If you don’t have any technical knowledge and don’t want to learn about computers, stay away from this thread; and IMO, stay away from Linux.

    A little joke to illustrate my point:
    *What do Linux users actually do with their computer?
    -They spend weeks configuring it so that if they actually had to get some work done they could do it, and then they reformat and start again with a new release / distribution.

    That’s not exactly true, but it is true that Linux generally takes more work to get up and running than Windows. It’s like using lego versus playmobil: half the fun is in building things, but you can’t actually play with it the way it comes from the store.

    I’m going to assume the people who read this thread know at least the basics about the difference between hardware and software, what the main components in a computer are and have already read a bit about Linux. If not, feel free to start reading anyway and google anything you don’t understand.

    First things first: partitioning your harddrive.

    Partitioning your harddrive correctly is very important. It’s difficult to change your partition layout once your system is installed without breaking everything, and a good partition layout will make your system perform a lot better. Most distributions use a really shitty default partition layout, so make your own.

    Here is the general layout I use (for a desktop system):
    sda1 = swap = 512 Mb = swap
    sda2 = /boot = 64 Mb = ext2
    sda3 = / = 8 Gb = ext4
    sda4 = /home = rest of the disk = ext4

    swap: Swap space is virtual RAM, when you run out of RAM your OS starts filling your swap space. Make sure your swap partition is always the first partition on the disk. If swap is necessary it is accessed often so you want to put it on the fastest sectors of your harddisk. As your harddisk spins at a constant rate, the outer most sectors are read and written to faster, and harddisks are filled starting from the outside. Wether you need a swap partition or not is a huge debate. In my opinion, any desktop with at least 2 Gb of RAM does not need swap space, so modern computers don’t need it. On hardware with less RAM, use once or twice your RAM size, don’t go making a 2 Gb swap partition if you have 1 Gb of RAM, that’s ridiculous IMO. If you have multiple harddisks, devide your swap over the first sectors of all your harddisks, this makes it a tiny bit faster still. EDIT TO ADD: It seems hybernate puts everything in Ram in your swap partition, so it might be necessary to use a swap partition at least as big as your RAM to make sure hibernate functions properly. Will add when I figure out if and how every distro (well, at least the distro’s I care about) does this.

    /boot The /boot folder is where Linux stores its kernel and the bootloader if it’s too big to fit in the MBR of your harddisk. Putting your kernel on a seperate tiny /boot partition formatted in ext2 reduces your boot time with 10 – 30 seconds. I don’t know the exact technical details of why it works, but it works; just make sure it’s not too big and it’s ext2. I don’t know why none of the distros I tried include this in their default partition layout, it doesn’t waste space and it’s a huge perceived performance boost when your system boots a lot faster.

    / The root of your system. This is where your whole operating system and all your applications will go (unless you make an even more advanced partitioning scheme, but that’s only really necessary on servers). For most distros, 8 Gb is enough, unless you’re going to install a lot of very big applications. For a small distro (like Crunchbang, my favorite lightweight easy to use distro) 4 Gb is plenty with room to spare for installing applications. If you’re using Gentoo (another distro I love) and intend on using Gnome or KDE you need at least 15 Gb of space in / ; preferably 20 Gb. Gentoo wastes a lot of space because it keeps the source of everything you install so you don’t have to redownload it when you want to reinstall it, and the compiling itself can also use up a sizeable amount of harddisk space. Ext4 because it’s the best.

    /home is where all your personal files go. Documents, movies, music, pictures, it’s all in /home, so make this partition the biggest. Also ext4 because it’s the best, unless you want to access it from within Windows, in that case, make it NTFS.

    Most distros have a graphical installer which makes it very easy to make your own partition layout, so do it. Assigning the mountpoints is usually nothing more than selecting them in a dropdown menu.

    Once the installation is finished, edit /etc/fstab and add the options noatime,nodiratime (use relatime if any of your applications needs acces times to work properly – unlikely btw) to any ext3/4 partition and the option noauto to your /boot partition. And remember to mount it if you’re going to change your bootloader or your kernel. This way you avoid the file system check which happens automatically on any ext2 partition after x ammount of mounts. As your boot partition is read without mounting it during bootup and usually never written to, this check is not necessary.

    More is for later.


    Short guide to compiling from source

    So for one reason or another you’ve downloaded an application as source instead of using your distro’s repositories. Either it’s not available in the repositories or it’s not the right version or you just wanna try something different (I personally don’t see any reason not to use the repositories if they have the version you want because they often add little patches to make an app work better with your specific ditribution, but you can do whatever the hell you want, that’s why you’re using linux in the first place). Now you’re staring at that darn tarball and you’re asking yourself “Now how do I install this thing? Clicking won’t work, drag-and-dropping to my programs menu won’t work?” Really simple, but there are a few things you should watch. Let’s say you wanna install application Duck and you’ve opened a console and navigated to the folder with the tarball (which is an archive, like a .zip / .rar file in case you’re wondering what that thing actually is) in it.

    Untarring the tarball:

    If the tarball ends in .tar.bz2 use
    tar -xvjf ./duck-2.0.6.tar.bz2
    If the tarball ends in .tar.gz use
    tar -xvzf ./duck-2.0.6.tar.gz

    Now you should have a folder named duck. Move in that folder, and here’s the part most people forget: Read the included textfiles. Read any file titled “help”, “installing”, “readme”, “release notes” etc., any file meant for you to read it. Or at least skim trough them. Those files will tell you about any dependencies you need to install first (and the developers of this awesome app didn’t bother to mention on their webpage or just forgot to mention), known problems with certain distributions / configurations / other installed applications / other things you need to take care of to actually get it working.

    Compiling and installing the application

    Now you’re in the recently untarred folder, you’ve scrutinized all the files you’re supposed to read / ignored them all (whatever – linux is all about choice, innit?) and installed any dependencies. Now you just type these commands:
    ./configure
    make
    make install
    make clean

    The last three commands can be combined into one:
    make install clean

    The “make clean” command is often forgotten. It deletes any files created for the compilation and installation process which aren’t needed for the installed application to run. Some people like to keep the installable executables so they don’t need to recompile while reinstalling an application. I like to keep my drive free of clutter, so I always issue a “make clean” after the installation is done; I’ve never had to install really large applications from source so compile times are not much of an issue to me. It’s up to you.

    Most problems during installing from source – like most problems in Linux in general – arise because people don’t take the effort of reading the files they should read before installing. It can be a pain, especially if it’s a file full of coders patting their own backs with nothing useful in it. However, unlike most Windows readme files, there’s often very useful information in readme files in Linux.


    In this thread I’m going to explain the basics of wine. I think it would be useful if we all post the apps we have runnng under wine and what we did to get it running.

    What is WINE and does it work?

    WINE is an attempt to write an open source windows API from scratch for linux. This involves “blackbox reverse engineering” – meaning they have no access to code. The entire thing is written by prodding and poking at MS binaries and attempting to copy the response. As a result it may not always work. What works and does not work depends on what calls the software makes and whether or not wine has implemented that call.

    How do i Install WINE?

    Install wine the same way you install any other app on you distro. Some distros delay upgrading to newer versions of WINE due to regression issues. If you wish you can also compile it from source.

    Most of the time people use winetricks along side of wine. winetricks is a script that downloads MS libraries that are “freely redistributable” and installs them (with WINE). for example MS office spellcheck will not work without installing the “Microsoft Jscripy library” and so on.

    you can download winetricks from:
    Winetricks

    you will need to set it as an exectutable before running it, This can be done with:
    chmod +x /path/to/winetricks

    How do i run apps with WINE?

    it can be as simple as:

    wine /path/to/executable.exe

    but wine is not perfect, in many cases you will have to override dlls and install libraries with winetricks. It is not as difficult as it sounds but sometimes you may have to sacrifice many animals to various gods.

    you can see exactly how well WINE handles your app by searching: WineHQ

    for the sake of this tutorial

    we will install MS office 2007

    . The process is similar for all apps

    wine appdb says office installer “works fine”. NOTE: This does not mean it will run, it only means it will successfully install, we will have to do more tweaking before it can run.

    The first step is to install MS office 2007
    you can install msoffice with:

    wine /path/to/office/setup.exe

    run the setup as normal type in your CD key ( 🙂 ). It will install the same as windows. After it has finished installing (you can close the installer) run:

    winecfg

    This is the wine configuration utility, here you can set overrides to various DLLs. For this particular app we will have to do a few things to get it running.
    reading the wine appdb, we have to:

    > set riched20.dll to “native(windows)”
    we do this by going to the Libraries tab in the area labeled “New override for library” type in riched20.dll and click on Add. click on the Edit button. Set it to Native (Windows) and click OK.

    > set usp10 to ‘native,builtin’ (done the same way as above)

    In this case we will have to install jscript to get spellcheck to work. Making sure winetricks is set to exectubale – we type in a new terminal window:

    /path/to/./winetricks wsh56js

    This will install Jscript for you after that is done you can run MS office on linux.

    other stuff

    The above process of installing MS office is the same way you install all apps under WINE – sometimes you will have to muck about with winecfg and winetricks quite a bit longer (WINE appdb will tell you exactly what to do)
    Sometimes wine appdb can be a bitch to decipher but if you app is even halfway popular someone has probably blogged it.

    Windows app fonts look terrible under linux if you don’t have MS fonts installed. you can install them here: Corefonts

    If you want an easier WINE way and don’t mind paying there are several supported GUI wine installers:
    cadega – supported wine for games
    crossover – suppoted wine for apps