Skip to main content

Posts

Showing posts from September, 2020

How to setup 2FA On Linux SSH Login

  This is a simple setup guide to enabling Two Factor Authentication (2FA) on Linux SSH login. I this article I wont go deep into setup and issues that I have faced when implementing this. First thing is first Update your system first. I have used Ubuntu 20.04 and it is always up to date. To enable 2FA you need to install google authenticator modules sudo apt install libpam-google-authenticator Configuration for PAM and SSHD Add the the following line to /etc/pam.d/sshd and After adding this line please restart the sshd services.  auth required pam_google_authenticator.so Go to /etc/ssh/sshd_config and check if the following line exist. Default value will be "no" so change it to "yes" to activate.  ChallengeResponseAuthentication yes Configuration for Authenticator In the terminal run google authenticator command It will ask few things to acknowledge by user. Details you can see from the below video. Once this part is done you are ready to use the 2FA in ubuntu. T

NMAP - What is NMAP and what is it used for?

What is NMAP & use of it? Basically NMAP is a free security scanner and a network mapper mainly used by system administrators, hackers , pentesters and etc.  These are few use cases of NMAP and there are tons of ways to use NMAP. Finding hosts in the network ports used by hosts and its status Finding vulnerabilities Information on versions and OS used Basic NMAP Scan nmap -sP 192.168.1.0/24 Ping multiple host to check if the hosts are alive or not Screen capture of scan TCP scan (full open scan) nmap -sT 192.168.1.9 This is a TCP connect scan. TCP connections are done with a 3 way handshake SYN SYN-ACK ACK This is otherwise called as full open scan Screen capture of scan Wireshark packet capture Stealth Mode Scan (Half open scan) namp -sS 192.168.1.9 This is known as SYN scan / Half open scan / Stealth scan SYN SYN-ACK RST Screen capture of