南工資安社創辦人/社長
113 年度教育體系資安攻防演練之攻防檢測員
第九屆臺灣好厲駭
CEH Master , CEH Practical , CEH
ubuntu@ubuntu:~$ pwd /home/ubuntu
ubuntu@ubuntu:~$ ls Desktop Documents Downloads Music Pictures Public snap Templates Video
ubuntu@ubuntu:~$ ls -la 總用量 88 drwxr-x--- 17 ubuntu ubuntu 4096 11月 23 21:34 . drwxr-xr-x 3 root root 4096 11月 23 20:34 .. -rw------- 1 ubuntu ubuntu 816 11月 27 20:20 .bash_history -rw-r--r-- 1 ubuntu ubuntu 220 11月 23 20:34 .bash_logout -rw-r--r-- 1 ubuntu ubuntu 3771 11月 23 20:34 .bashrc drwx------ 16 ubuntu ubuntu 4096 11月 27 19:57 .cache drwx------ 2 ubuntu ubuntu 4096 11月 23 21:58 .chewing drwx------ 16 ubuntu ubuntu 4096 11月 27 19:54 .config drwxr-xr-x 2 ubuntu ubuntu 4096 11月 27 19:48 Desktop drwxr-xr-x 2 ubuntu ubuntu 4096 11月 23 20:53 Documents drwxr-xr-x 2 ubuntu ubuntu 4096 11月 27 20:11 Downloads drwx------ 2 ubuntu ubuntu 4096 11月 23 21:23 .gnupg drwx------ 3 ubuntu ubuntu 4096 11月 23 20:53 .local drwxr-xr-x 2 ubuntu ubuntu 4096 11月 23 20:53 Music -rw-r--r-- 1 ubuntu ubuntu 363 11月 23 21:11 .pam_environment drwxr-xr-x 2 ubuntu ubuntu 4096 11月 23 20:53 Pictures -rw-r--r-- 1 ubuntu ubuntu 807 11月 23 20:34 .profile drwxr-xr-x 2 ubuntu ubuntu 4096 11月 23 20:53 Public drwx------ 6 ubuntu ubuntu 4096 11月 23 21:37 snap drwx------ 2 ubuntu ubuntu 4096 11月 23 21:23 .ssh -rw-r--r-- 1 ubuntu ubuntu 0 11月 23 21:34 .sudo_as_admin_successful drwxr-xr-x 2 ubuntu ubuntu 4096 11月 23 20:53 Templates drwxr-xr-x 2 ubuntu ubuntu 4096 11月 23 20:53 Videos untu 4096 11月 23 20:53 Videos
ubuntu@ubuntu:~$ cd / ubuntu@ubuntu:/$ pwd / ubuntu@ubuntu:/$ ls bin boot cdrom dev etc home lib lib32 lib64 libx32 lost+found media mnt opt proc root run sbin snap srv swapfile sys tmp usr var
ubuntu@ubuntu:/$ cd ~ ubuntu@ubuntu:~$ pwd /home/ubuntu ubuntu@ubuntu:~$ ls Desktop Documents Downloads Music Pictures Public snap Templates Videos
cd ..
向上移動一層cd /
移動到根目錄cd ../../../
向上移動三層,以此類推cd ~
直接進到家目錄bandit1@bandit:~$ ls file123 bandit1@bandit:~$ cat file123 rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzic
mkdir [options] directory_name
mkdir new_directory
rmdir [options] directory_name
rmdir old_directory
rmdir -rf directory_name
rmdir -rf new_directory
mv [options] source destination
mv file.txt destination/
bandit4@bandit:~/inhere$ file /home/bandit4/inhere/* /home/bandit4/inhere/-file00: data /home/bandit4/inhere/-file01: data /home/bandit4/inhere/-file02: data /home/bandit4/inhere/-file03: data /home/bandit4/inhere/-file04: data /home/bandit4/inhere/-file05: data /home/bandit4/inhere/-file06: data /home/bandit4/inhere/-file07: ASCII text /home/bandit4/inhere/-file08: data /home/bandit4/inhere/-file09: data bandit4@bandit:~/inhere$ cat /home/bandit4/inhere/-file07 lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR
bandit5@bandit:~/inhere$ ls maybehere00 maybehere02 maybehere04 maybehere06 maybehere08 maybehere10 maybehere12 maybehere14 maybehere16 maybehere18 maybehere01 maybehere03 maybehere05 maybehere07 maybehere09 maybehere11 maybehere13 maybehere15 maybehere17 maybehere19 bandit5@bandit:~/inhere$ find -type f -size 1033c ! -executable ./maybehere07/.file2 bandit5@bandit:~/inhere$ cat maybehere07/.file2 P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU
-type f
找尋的對象是檔案
-type d
找尋的對象是目錄
-size 1033c
檔案大小為 1033 個位元
! -executable
檔案不具有可執行權限
-executable
檔案具有可執行權限
grep [選項] 模式 [文件]
# 搜索包含特定模式的行 grep "pattern" file.txt # 遞迴搜索文件夾中的所有文件 grep -r "pattern" /path/to/directory
chmod [options] mode file
chmod 755 script.sh
ps [options]
ps aux
ssh [user]@[host]
ssh root@192.168.1.100
nc [options] [host] [port]
nc -lvp 1234
curl [options] [URL]
curl https://example.com
wget [options] [URL]
wget https://example.com/file.zip
sudo [command]
sudo apt update
sudo apt install [package_name]
sudo apt install python3
pip install [package_name]
pip install requests