Saturday, July 8, 2017

[How-to] Access Google Drive in Ubuntu

Step 1
~$ sudo apt-get install gnome-control-center gnome-online-accounts

Step 2
Search Gnome Control Center from DASH and open Settings.
Beware that Unity Control Center looks similar to Gnome but it won't work in Unity (at least as of my posting date).

Step 3
Add your Google account and respond to succeeding instructions. When asked about applications to integrate with your online account, ensure you include FILES.

Step 4
Open FILES (or Nautilus). Your online account should be in the right panel.

Assumptions
Ubuntu 16.04 LTS

Monday, April 4, 2016

Installing SSH server in Kali [Reminders]

Installing SSH server in Kali [Reminders]

Considerations
- Kali 2016.1 Rolling Edition

Install
~# apt-get update
~# apt-get install openssh-server
~# update-rc.d -f ssh remove
~# update-rc.d -f ssh defaults
 
Create security keys 
~# cd /etc/ssh/
~# mkdir tsktsktsk
~# mv ssh_host_* tsktsktsk
~# dpkg-reconfigure openssh-server
 
Allow root account 
~# edit /etc/ssh/sshd_config 
   Find        PermitRootLogin without-password
   change to   PermitRootLogin yes
~# sudo service ssh restart
 
Auto-start the ssh server on boot
~# update-rc.d -f ssh enable 2 3 4 5  

Friday, April 1, 2016

OpenVAS install sequence

[How to]
OpenVAS install sequence


Parameters:
  • Kali 2016.1 Rolling Edition
  • OpenVAS 8.0

~# apt-get update

~# apt-get install openvas

~# openvas-setup

~# vi /lib/systemd/system/greenbone-security-assistant.service
      Change --listen=127.0.0.1
          to      --listen=0.0.0.0
      This will allow remote browsers to connect to Greenbone.

~# openvas-nvt-sync --wget OV_HTTP_FEED
      Do this if NVT sync through rsync failed.
      Source of NVT: http://www.openvas.org/openvas-nvt-feed-current.tar.bz2

~# openvas-start

~# openvasmd --user=admin   --new-password=blahblah
      This is to assign a password to admin because this was skipped during setup.
       The setup only created the admin account.

Run OpenVAS at https://localhost:9392 or https://serveripaddress:9392

Friday, September 11, 2015

[How-to] Enable Hibernate in Ubuntu

[How-to] Enable HIBERNATE in Ubuntu

I enabled Hibernate in my Ubuntu 14.04 by following these:

To enable the Hibernate menu
as instructed by http://ubuntuhandbook.org/index.php/2014/04/enable-hibernate-ubuntu-14-04/

~$ sudo vi /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
   [Re-enable hibernate by default in upower]
   Identity=unix-user:*
   Action=org.freedesktop.upower.hibernate
   ResultActive=yes

   [Re-enable hibernate by default in logind]
   Identity=unix-user:*
   Action=org.freedesktop.login1.hibernate
   ResultActive=yes

   [Re-enable hibernate for multiple users by default in logind]
   Identity=unix-user:*
   Action=org.freedesktop.login1.hibernate-multiple-sessions
   ResultActive=yes



Setup SWAP as space to hibernate
as instructed by https://help.ubuntu.com/community/SwapFaq
 
~$ sudo blkid
   Copy the UUID of swap

~$ sudo vi /etc/default/grub
   Look for the line GRUB_CMDLINE_LINUX=""
   Replace with GRUB_CMDLINE_LINUX="resume=UUID=yourUUID"
 
~$ sudo update-grub

~$ sudo vi /etc/initramfs-tools/conf.d/resume
   Ensure that it contains RESUME=UUID=yourUUID

~$ sudo update-initramfs -u

~$ sudo reboot

Friday, March 13, 2015

Installing JAVA on Ubuntu 14.04LTS

Install Oracle Java in Ubuntu 14.04LTS

9 Sep 2015
My script when I installed JAVA in my Ubuntu 14.04 64-bit
~$ sudo apt-add-repository ppa:webupd8team/java
~$ sudo apt-get update
~$ sudo apt-get install oracle-java8-installer

13 Mar 2015
This was my script when I installed JAVA SE JDK in my Ubuntu 14.04LTS.
  • wget -c http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-i586.tar.gz
  • cp -r jdk-8u40-linux-i586.tar.gz /usr/local/java/
  • sudo cp -r jdk-8u40-linux-i586.tar.gz /usr/local/java/
  • cd /usr/local/java
  • sudo tar xvzf jdk-8u40-linux-i586.tar.gz
  • sudo gedit /etc/profile      ## and append the following:
            JAVA_HOME=/usr/local/java/jdk1.8.0_40
            JRE_HOME=$JAVA_HOME/jre
            PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$JRE_HOME/bin
            export JAVA_HOME
            export PATH

  • sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_40/bin/java" 1
  • sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_40/bin/javac" 1
  • sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.8.0_20/bin/javaws" 1
  • sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.8.0_40/bin/javaws" 1
  • sudo update-alternatives --set java /usr/local/java/jdk1.8.0_40/bin/java
  • sudo update-alternatives --set javac /usr/local/java/jdk1.8.0_40/bin/javac
  • sudo update-alternatives --set javaws /usr/local/java/jdk1.8.0_40/bin/javaws
  • source /etc/profile
  • cd /usr/lib/mozilla/plugins ## create if none
  • sudo ln -s /usr/local/java/jdk1.8.0_40/jre/lib/i386/libnpjp2.so
  • java -version
  • javac -version
  • sudo reboot

Source: http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux

Thursday, January 29, 2015

[How-to] Mount /home to another disk partition

[How-to] Mount /home to another disk partition

I need to free up some space in my linux(Ubuntu) main partition. I decided to move my /home folder to another partition. So I did the following, as instructed here, https://help.ubuntu.com/community/Partitioning/Home/Moving:

~$ sudo blkid
~$ sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
~$ cmp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
~$ sudo gedit /etc/fstab
    and appended
    UUID=????????  /media/home  ext4  defaults  0  2 
~$ sudo mkdir /media/home
~$ sudo mount -a
~$ sudo rsync -aXS --exclude='/*/.gvfs' /home/. /media/home/.
~$ sudo diff -r /home /media/home
~$ sudo gedit /etc/fstab
     and edited /media/home to /home
~$ cd / && sudo mv /home /old_home && sudo mkdir /home
~$ reboot
~$ sudo rm -r /old_home
~$ sudo rmdir /media/home

Kali Linux - My Disaster Recovery Script

~# update-rc.d ssh enable

~# cat /etc/apt/sources.list
        deb http://security.kali.org/kali-security kali/updates main contrib non-free
   deb http://http.kali.org/kali kali main contrib non-free

~# echo export http_proxy=\"http://userid:password@proxyaddressordomainname:8080/\" >> ~/.bashrc
~# echo export https_proxy=\"http://userid:password@proxyaddressordomainname:8080/\" >> ~/.bashrc
~# echo export ftp_proxy=\"http://userid:password@proxyaddressordomainname:8080/\" >> ~/.bashrc
~# echo export all_proxy=\"socks://userid:password@proxyaddressordomainname:8080/\" >> ~/.bashrc

~# openvas-mkcert
~# oepnvas-mkcert-client -i
~# openvas-nvt-sync --wget OV_HTTP_FEED
~# openvassd
~# openvasmd --rebuild --progress
~# openvasmd --create-user=openvasadmin --new-password=1234567890
~# openvasmd -p 9390 -a 0~# gsad --http-only --listen=0 -p 9392~# openvas-check-setup