Module 8.1: Linux for hackers: Parrot OS
Parrot OS
Hackthebox Network Chuck
https://www.youtube.com/watch?v=HSRghjwTTOQ&list=PLIhvC56v63IJIujb5cyE13oLuyORZpdkL&index=8
Ep: 1: hack the box intro
https://www.youtube.com/watch?v=VbEx7B_PTOE&list=PLIhvC56v63IJIujb5cyE13oLuyORZpdkL
0:00 ⏩ Intro
1:13 ⏩ FREE HACKING LAB (linux)
2:40 ⏩ What is Linux?
5:22 ⏩ Introducing the Linux Terminal
6:11 ⏩ Linux Command: pwd
6:55 ⏩ Linux Command: ls
7:33 ⏩ Linux Command: cd
10:01 ⏩ Test your skills
<take notes on what you see and do, email to Dr. Bill>
linux kernel vs. Parrot OS
open source, fast, secure
terminal-command line
pwd print working directory
ls list
cd change directory
cd .. cd up
/ root directory
ls root directory
Ep 2: file systems
https://www.youtube.com/watch?v=A3G-3hp88mo&list=PLIhvC56v63IJIujb5cyE13oLuyORZpdkL&index=2
<take notes on what you see and do, email to Dr. Bill>
0:00 ⏩ Intro
0:55 ⏩ access your FREE HACKING LAB (linux)
1:39 ⏩ NEW COMMAND: whoami?
2:02 ⏩ 10 second review
2:28 ⏩ the ROOT of the File System
2:45 ⏩ NEW COMMAND: clear
3:03 ⏩ EVERYTHING is a file!!
3:40 ⏩ /bin
4:49 ⏩ NEW COMMAND: cat
5:43 ⏩ NEW COMMAND: cp
7:12 ⏩ NEW COMMAND: rm
7:25 ⏩ i DELETED a command!!!
8:48 ⏩ /sbin
9:27 ⏩ NEW COMMAND: adduser
10:11 ⏩ /usr
11:32 ⏩ NEW COMMAND: which
12:47 ⏩ /boot
12:52 ⏩ /var
12:58 ⏩ /tmp
13:04 ⏩ /lib
13:12 ⏩ /home
13:40 ⏩ /root
14:10 ⏩ /dev
15:33 ⏩ /etc
17:11 ⏩ /mnt and /media
19:24 ⏩ CHALLENGE
bin directory
clear, ctrl-L
cat
cp
sudo cp ls networkchuck (copied ls to networkchuck command)
sudo rm ls
ls is now gone
sudo cp networkchuck ls
cat cat
cd ..
ls
sbin (only admin commands)
sudo adduser superben
cd usr
ls (usr commands)
which ls
which cat. (where are they?)
local (your command binaries)
lib (your libraries)
back to root—
boot (startup)
var (logs)
home
root home is different, in root directory
devices are files-hard to imagine
cd dev
vda vdb also sda or sd1
cat devices….
sudo cat vda
ctrl-c (cancel)
why? corrupt files, malware
etc (network settings)
cd etc
cd network
sudo cat interfaces
mnt and media
media (usb drives)
mnt (things you mount-file servers)
Ep: 3:
https://www.youtube.com/watch?v=Y17KTiJLcyQ&list=PLIhvC56v63IJIujb5cyE13oLuyORZpdkL&index=3
0:00 ⏩ Intro
1:26 ⏩ FREE Linux LAB
2:17 ⏩ Getting to know the Linux Terminal
4:01 ⏩ NEW COMMAND: PS
7:13 ⏩ !!!! NEW COMMANDSSSS !!!!
8:19 ⏩ HELP!! (how to get help) MAN and -h
9:57 ⏩ NEW COMMAND: apropos
10:56 ⏩ your homework
11:29 ⏩ QUIZ!!!
terminal->shell->computer
bash shell
ps. (shows shell along with other process)
powershell=windows shell
terminal bash shell console
$ means user
# means root user
su root
id
hostname
uname
ifconfig
ip
netstat
ps
who
env
lsblk
lsusb
lsof (open files)
man pages
q to quit
uname -h (help)
apropos (command or thing)
Ep. 4: managing users
https://www.youtube.com/watch?v=jwnvKOjmtEA&list=PLIhvC56v63IJIujb5cyE13oLuyORZpdkL&index=4
0:00 ⏩ Intro
1:50 ⏩ FREE Linux LAB
2:26 ⏩ the Linux User
3:11 ⏩ UNDER ATTACK!!
3:49 ⏩ NEW COMMAND: adduser
5:10 ⏩ How to find users in Linux
6:00 ⏩ exploring /etc/passwd
6:25 ⏩ the /etc/shadow file
7:50 ⏩ NEW COMMAND: useradd
9:16 ⏩ NEW COMMAND: passwd
10:30 ⏩ NEW COMMAND: usermod
13:05 ⏩ the SUDO command
14:20 ⏩ NEW COMMAND: su
16:03 ⏩ the sudoers file
16:21 ⏩ NEW COMMAND: visudo
19:10 ⏩ NEW COMMAND: userdel
20:06 ⏩ NEW COMMAND: groupadd
20:41 ⏩ exploring /etc/group
21:27 ⏩ NEW COMMAND: groups
22:20 ⏩ let's break the sudoers file
23:39 ⏩ NEW COMMAND: usermod -aG
25:06 ⏩ NEW COMMAND: gpasswd
sudo adduser thor
cat /etc/passwd
passwords in /etc/shadow
sudo cat /etc/shadow
UID and GID
home directory
useradd (simple)
sudo passwd user
ls -la
usermod -h
sudo usermod ironman —shell /bin/bash
sudo usermod -l tonystark ironman
sudo useradd hulk -m
su (switch user)
sudo su - (makes you root)
exit or ctrl -d
sudoers file—->
sudo visudo (add sudo user)
name ALL = ALL
sudo userdel
sudo groupadd <name>
cat /etc/group
Ep 8:
https://www.youtube.com/watch?v=HSRghjwTTOQ&list=PLIhvC56v63IJIujb5cyE13oLuyORZpdkL&index=8
python -m http.server
localhost:8000
python -m http.server:7600
(note no index.html)
php -S 127.0.0.1:8085
npx http-server -p 8086
systemctl start apache2
sudo nano /etc/apache2/ports.conf
(change 80 to something else)
curl (client URL)
curl localhost:7600
curl -o coolwebsite localhost:8080
cat coolwebsite
curl -I localhost:8080. (header only)
clear
curl -v localhost:8080
request and response
wget localhost:7600
Migrated from Apple Server Wiki. Original page ID: x9L3H542