Thursday, June 2, 2016

Wargames - Linux command base games :)

Wargames

The wargames offered by the OverTheWire community can help you to learn and practice security concepts in the form of fun-filled games.
To find out more about a certain wargame, just visit its page linked from the menu on the left.
If you have a problem, a question or a suggestion, you can join us on IRC.

Suggested order to play the games in

  1. Bandit
  2. Leviathan or Natas or Krypton
  3. Narnia
  4. Behemoth
  5. Utumno
  6. Maze

Configuring mutt to work with GMAIL

Mutt is a mail client , that you can configure easier in Linux , i will start with explaining the installation and the configuration of the tool , and some example to send a simple email :

  • sudo apt-get update         #It's always a good idea to update your sources list before you start with installing any thing new .
  • sudo apt-get install mutt         #This command will install the client for you .
  • cd         #This will take you to your home dir , and there you will find a dir called .mutt
  • cd .mutt
  • vi muttrc         # Edit the file like the below example :


Ex :

hdr_order Date From To Cc
ignore "Authentication-Results:"
ignore "DKIM-Signature:"
ignore "DomainKey-Signature:"
set certificate_file="~/.mutt/certificates"
set editor='nano'
set folder=imaps://imap.gmail.com:993
set from="YourEmail@gmail.com"
set header_cache="~/.mutt/cache/headers"
set imap_check_subscribed
set imap_keepalive=300
set imap_pass="YourPassword"
set imap_user="set imap_user="YourEmail@gmail.com"
set markers=no
set message_cachedir="~/.mutt/cache/bodies"
set move=no
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set realname="YourName"
set smtp_pass="YourPassword"
set smtp_url="smtp://YourEmail@smtp.gmail.com:587/"
set sort_aux='last-date-received'
set sort='reverse-threads'
set spoolfile=imaps://imap.gmail.com:993/INBOX
unset imap_passive
You have new mail in /var/mail/root




* Please replace YourName , YourEmail , YourPassword .


And this is an example for sending email with mutt :

Ex :

      echo -e "Hloo \nThis is my body email" | mutt -s "This is my subject" ToEmail@koko.com

How to connect WiFi from Linux command line : WPA/WPA2-PSK

First of all we will have to check that we are working with the wpa configuration file ,

Be sure that you have this section in /etc/network/interfaces :

  •    sudo su 
  •    vi /etc/network/interfaces
  •    And add the following section : , you can figure out what is your interface name with the             command ifconfig , usually it's wlan0 or 1 ..


          auto wlan0
          iface wlan0 inet dhcp
          wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf



  •   To generate the network block use the command : wpa_passphrase essid_name supersecretpassword

   
     and this will create something like the bellow , and then all you have to do is to add this block to
     /etc/wpa_supplicant/wpa_supplicant.conf


  •    So vi /etc/wpa_supplicant/wpa_supplicant.conf , and add this :


     network={ 
          ssid="MyAP111" 
          #psk="MyPassword" 
          psk=cc2499f98beb4dc374d206e56786686cfea3bbb741ac173dbd2a2514e461230a 
     }