Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Tuesday, July 3, 2012

How to install Dropbox on Ubuntu

How to install Dropbox - the fastest way

Go to their install page:

https://www.dropbox.com/install?os=lnx

Download the ".deb" file and it will install through the store.

How to fix Eclipse library errors on Ubuntu

Here is a list of Eclipse Errors:

Eclipse - Indigo
On start, it will load and then soon crash stating that the

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.path
Can't load library: /.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /.swt/lib/linux/x86_64/libswt-gtk.so

Ubuntu 12.04 32 bit
sudo ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

Ubuntu 12.04 64 bit
sudo ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

http://stackoverflow.com/questions/10165693/ubuntu-eclipse-cannot-load-swt-libraries-not-opening

How to install Eclipse on Ubuntu

How to install Eclipse

Open your terminal:

sudo apt-get install eclipse

This is will install the stable version from the repositories.

How to switch your Java version on Ubuntu

How to easily change your Java version

This is how you can get the versions you are using now:

java -version
javac -version
javaws -version

Easily change which Java installation you would like to use:

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

If you have installed this repository:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update

You can install a graphical version to easily change your Java version:

sudo apt-get install update-java
sudo update-java

How to install Java 7 on Ubuntu

How to install Java 7 - fastest way
 
Add this repository:

sudo add-apt-repository ppa:webupd8team/java

Update your package list:

sudo apt-get update

Add this, in case you don't have it:

sudo mkdir -p /usr/lib/mozilla/plugins

Finally install Java 7:

sudo apt-get install oracle-jdk7-installer

http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html
http://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7

How to install Gnome on Ubuntu

How to install Gnome on Ubuntu

Open your terminal:

sudo apt-get install gnome-panel

Now when you log out, you can log back in with Gnome or Gnome Classic.

How to add Swap Drives on Linux

How to add swap drives after installation

After installing Ubuntu and you would like to install a swap partition, make sure there is an empty partition.

Let's list your partitions:

ls /dev/sda*

Let's say that your the partition your going to make a swap is "/dev/sda3":

sudo mkswap /dev/sda3

Mount the swap partition:

sudo swapon -U xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

This command will give you the UUID of the drive:

sudo blkid /dev/sd3

Open your "/etc/fstab":

sudo nano /etc/fstab

Add the following but make sure to replace the UUID:

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0

To save, hit Ctrl + x, then Enter.

In the end, make sure your swap is loading properly

sudo blkid
Make sure the UUID for "swap" matches the one in the "/etc/fstab".

Further testing:

sudo mountvall -v

How to install Adobe Reader on Ubuntu

How to install Adobe Reader

First open the terminal and type this in:

sudo apt-add-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"

Update your package list:

sudo apt-get update

Finally install:

sudo apt-get install acroread

How to open .rar files in Ubuntu

How to open .rar files in Ubuntu

Default installation doesn't can not open .rar files

sudo apt-get install unrar

Wednesday, May 30, 2012

How to turn off DNSMASQ in Ubuntu

Disable DNSMASQ
 
If you sudo netstat -tupln, you will notice DNSMASQ running.

Edit the file: /etc/NetworkManager/NetworkManager.conf

sudo gedit /etc/NetworkManager/NetworkManager.conf

Simply comment out:
#dns=dnsmasq

Now restart to make sure it is off.
sudo restart network-manager

Sunday, February 19, 2012

What is Wifi Security?

Everyone's on Wifi
In today's society almost every one has a cell phone and/or laptop or tablet. Either way everyone has used a wifi connection at least once before. Wifi is available almost anywhere you go, in cafes, restaurants and of course, our homes.

Summary of Topics:
- No matter where you are always use HTTPS which is a secure protocol for protecting the data you send and receive on your computer. This is the first line of defence for Data Encryption.
- Attackers can steal/view packets, if they not encrypted, they can read passwords and credit card information in plain text.
- It's always good not to broadcast your SSID, make it slightly harder for the curious.
- Hidden SSIDs are hidden but their BSSIDs aren't.
- Always filter MAC addresses because some people are very curious and like to poke around.
- Attackers can easily spoof accepted MAC addresses.
- Always use WPA2-PSK with AES encryption, this way even if people steal your packets, it will be very hard to read encrypted packets, especially if you are also using HTTPS as well.
- No encryption makes it easy for attackers and WEP is easy to crack.
- Keep good passwords on local computers as well as the router/access points.

Some terms to know(there's more that could be added):
ESSID = Extended Service Set Identification
SSID = Service Set Identification
- This is the name of the network that is being broadcasted
- Ex. "Tom's House"
BSSID = Basic Service Set Identification
- This is the MAC(Media Access Control)
- Ex. "01:23:45:67:89:ab"
WEP = Wired Equivalent Privacy
- Encryption that has 40 and 128 bit keys
WPA = Wi-Fi Protected Access
- Passworded wifi uses TKIP
WPA2-PSK = Wi-Fi Protected Access with Pre-Shared Keys
- Passworded wifi that uses AES and can use TKIP
- Uses "handshakes" for authentication
HTTP = Hypertext Transfer Protocol
- Common used on port 80 for standard web surfing
HTTPS = Hypertext Transfer Protocol Secure
- Secure web surfing that is tunnelled(SSL/TLS) on port 443

When settings up a router we configure the following:

At Home or in the Office (there are more than one way for the methods shown)

1. SSID/ESSID
It doesn't add much security, however I suggest that everyone should hide their router/wifi networks. Simply hiding the broadcast of the SSID from the world will help deter hackers and annoying gamers from wanting break into your router/network to see if they can and poke around or simple just to obtain free Internet. Let alone, this doesn't do much because people can still find and attempt to connect to routers/networks that are hiding their SSID by simply scanning or by turning their wireless cards in monitor mode, you can view network BSSIDs as well as client's MAC addresses:
sudo iwlist wlan0 scan
or
sudo airmon-ng wlan0 start
sudo airodump-ng mon0

2. MAC Address Filtering
Everyone's first line of defence by far should be MAC address filtering. There are two types of MAC address filtering: MAC address control for wifi and wired connections and MAC address filtering for just wireless connections. The most important one to use is MAC address filtering for wifi connections. Someone would have to break into your house or office to use the wired connection anyway and if someone breaks into your facility there are way bigger problems than connecting to a network. MAC address filtering will stop most people who usually poke around at other people's wifi networks. Routers have a list of MAC address that are either "Allowed" or "Denied" to connect to the router. This allows you to simply control who can connect and those who cannot. However, once again, this hardly does much to stop an attacker or someone who simply wants free Internet. If someone is near by, they can simply scan for networks nearby. After scanning nearby networks, attackers can change or "spoof" their MAC address temporarily:
sudo ifconfig wlan0 down
sudo ifconfig wlan0 hw ether 01:23:45:67:89:ab
sudo ifconfig wlan0 up
or another way
sudo ip addr
sudo ip link set dev wlan0 address 01:23:45:67:89:ab
The easiest way it use GNU MAC Changer.
3. Wifi Encryption
Today there are generally three types of encryption for wireless networks: None, WEP(40-bit and 128-bit keys), WPA(WPA-TKIP and WPA2-CCMP). I can't stress this enough to use encryption because attackers do not even need to be on your network to steal your data. If you are not using encryption attackers can simply use tools to capture your wireless packets and steal your data. (more on Packet Analysis) It is also very important that you always use HTTPS when available. Secure sessions are important to prevent session hijacking or phishing websites because it encrypts the data coming in and leaving port 443 instead of using the default port of 80 for HTTP that is not encrypted. So even if the attacker scans for hidden SSIDs and finds some client's MAC addresses that are connected to some routers and spoofs his MAC address in order to connect to the network of his choice, wifi encryption is the next line of defence. While connecting to the network the attacker will be prompted with a password/passphrase in order to actually access and gain Internet access. Obviously these can be guessed or brute-forced, that's why it is very important to have a very hard and obfuscated password.(generate one here Random Password Generator) Create passwords that are very long and use random characters. Since passwords can be brute-forced, it is important to implement "passphrases". A pass phrase a group of a words for a password, which makes it harder to guess because it is longer and uses many words which helps defeat the purpose of brute-forcing(dictionary attack). When choosing an encryption, it is best to go with the latest and greatest WPA2-PSK which is more secure than WPA. WEP, can be easily cracked with tools such as Aircrack and CoWPAtty. Attackers that are not even connected to your network can capture your packets and then crack the WEP key. WPA2 uses a better encryption, AES encryption and isn't crackable because of the handshakes it uses for authentication. Even if the attacker catches your packets and you were using WEP or WPA/WPA2 it would make it very hard for the attacker to read them. To crack WPA2, an attacker would have to capture your packets and then run a dictionary attack which would take a very long time, making WPA2-CCMP(AES encryption) the best standard to use.

4. Inside the Network/Router
So say if the attacker simply logged in your router because you have no encryption or cracked your WEP key, he can now see all the computer on the network by scanning the network by using tools such as Nmap:
ifconfig - view internal ip
Ex. "192.168.1.65" - usually means he is the 64th client, being that the router/access point is on 192.168.1.1
nmap 192.168.1.0/24 - the "/24" indicates "192.168.1.1 - 192.168.1.255
or
sudo nbtscan -r 192.168.1.0/24 - scans the local network, shows hostnames
Since the attacker can see everything on the network they can try to attack individual computers, the router itself or just capture packets. Since the attack is on the network, regardless of encryption or not, they are physically on the network and can see what you are doing. If they try to access the router, it is very important that you have strong passwords on the router as well. Since the router is usually on the "192.168.1.1", attackers can type that in the address bar of their browsers and see if there is a router admin page. It is very important to change the default passwords because an attacker can simply just guess or Google the default password. If they still can't get in the easy way, they can try brute forcing the password using tools such as THC Hydra.

Topics to Read:

http://en.wikipedia.org/wiki/MAC_address
http://en.wikipedia.org/wiki/Wireless_cracking
http://en.wikipedia.org/wiki/Wired_Equivalent_Privacy
http://en.wikipedia.org/wiki/Wi-Fi_Protected_Access
http://en.wikipedia.org/wiki/Packet_analyzer
http://en.wikipedia.org/wiki/Wi-Fi
http://en.wikipedia.org/wiki/IEEE_802.11
http://en.wikipedia.org/wiki/Wireless_security

Wednesday, February 1, 2012

How to capture packets using Wireshark/Aircrack/TCPDump

Capturing Packets
Analyzing packets is very important in order to see where your data is being sent and received. Here are some good tools and commands to get you going:

Wireshark: www.wireshark.org/
Install: sudo apt-get install wireshark
Different filters:
port 80
http contains msg_text
ip.addr == 192.168.2.8
ip.dst == 192.168.2.8
ip.src == 192.168.2.8
tcp.port == 80 || http
http.request.method == "GET"
http.request.method == "POST"

Aircrack suite: www.aircrack-ng.org/
Install: sudo apt-get install aircrack-ng
Different examples:
sudo airmon-ng start wlan0
sudo airodump-ng mon0 -w OUTPUTFILE

Analyzing Packets:
TCP Dump: www.tcpdump.org/
Install: sudo apt-get install tcpdump
Different examples:
tcpdump -ttttnnr tcp_dump.pcap
tcpdump -qns 0 -A -r blah.pcap
tcpick -C -yP -r tcp_dump.pcap
tcpdump -qns 0 -A -r tcp_dump.pcap
tcpdump -qns 0 -X -r tcp_dump.pcap

Thursday, November 17, 2011

How to create Desktop Icons in Ubuntu

Desktop Icons

Where program is located:
echo $SHELL

Creating the Terminal Icon on the Desktop, just like Ubuntu 10.04
gnome-desktop-item-edit --create-new ~/Desktop

Application: /bin/bash

Friday, October 7, 2011

How to disable Avahi Daemon

Disable
package: avahi-daemon
open config file:
 sudo gedit /etc/default/avahi-daemon
set: 
 AVAHI_DAEMON_START = 1

you might also have to:
 sudo gedit /etc/avahi/avahi-daemon.conf
set: 
 use-ipv4=no
 use-ipv6=no

restart:
 sudo /etc/init.d/avahi-daemon restart
or Unistall - Remove Package
sudo apt-get remove avahi-daemon

Friday, July 22, 2011

Ubuntu - Trash Can

Open Terminal and follow the commands:

gconf-editor
go to apps > nautilus > desktop
check trash_icon_name

It should appear on your desktop :)

Monday, July 4, 2011

How to get Free Mobile 3G/4G Tethering

Using Operating System(No Software, No Root)


Ubuntu (Tested on Droid X)
Disclaimer - must have Bluetooth on your computer
1. Turn Bluetooth on both devices
2. On Ubuntu, select use device as "network device (NAP/PAN)"
3. Click on the "wifi/internet" icon and now your using your 3G/4G.

Using Windows 7(Tested on Droid X)
Disclaimer - must have Bluetooth on your computer
1. Go to start, search "Bluetooth", click on "Change Bluetooth Settings".
2. Turn on Bluetooth on the computer and allow other devices to connect to it in "Options".
3. Use your phone to Scan Bluetooth Devices and attempt to pair with the computer.
4. Accept both connections on the computer and the phone.
5. Go to Control Panel, Hardware and Sound and then Device and Printers.
There you should see your phone, right click and click on Connect Using Access Point.

PDA Net(No Root)

- http://junefabrics.com/

1. Go the main page, download the app to your phone.
2. Install the application to your computer.
3. Turn the app on your phone and connect to the net.

Easy Tether Lite(No Root)

- http://www.mobile-stream.com/easytether/android.html - http://easytether.blogspot.com


Wireless Tether(Requires Root- Tested on Froyo)

-Download

Thursday, June 16, 2011

How to add the Force Quit Button in Ubuntu 11.04+

If you use Ubuntu 11.04+ Unity(app panel to the left), you cannot add application shortcuts to the top panel any more. In order to add a Force Quit Button in the apps panel:

Open the "Terminal" and Copy and Paste, hit enter:

gedit ~/.local/share/applications/quit.desktop

Copy and Paste in the Text Document and hit enter:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=xkill
Name=Force Quit
Icon=/usr/share/icons/Humanity/actions/48/process-stop.svg--adjust

Save the Text Document, then open home folder (view > show hidden files), browse to

.local/share/applications

And drag the quit.desktop onto the launcher

If you are using Gnome (Classic), here is what it would look like: