0

Hướng dẫn cài đặt MASSCAN Web Interface

MASSCAN là một công cụ hỗ trợ đắc lực cho việc scan port. Bài viết này sẽ hướng dẫn bạn cách cài đặt và cùng vọc vạch tìm hiểu để biết MASSCAN là gì.

Việc cài đặt MASSCAN cũng vô cùng đơn giản và dễ hiểu. Đầu tiên bạn cần lấy mã nguồn của MASSCAN tại trang github: https://github.com/offensive-security/masscan-web-ui . Và cài đặt library.

root@kali:~# apt-get install apache2 php5 php5-mysql mysql-server
root@kali:~# systemctl start mysql
root@kali:~# systemctl start apache2
root@kali:~# git clone https://github.com/offensive-security/masscan-web-ui
root@kali:~# mv masscan-web-ui/* /var/www/html/
root@kali:~# cd /var/www/html/

Sau đó thực hiện tạo CSDL MYSQL

root@kali:/var/www/html# mysql -u root -p
Enter password:
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database masscan;
Query OK, 1 row affected (0.01 sec)

mysql> CREATE USER 'masscan'@'localhost' IDENTIFIED BY 'changem3';
Query OK, 0 rows affected (0.00 sec)

mysql>GRANT ALL PRIVILEGES ON masscan.* TO 'masscan'@'localhost';
Query OK, 0 rows affected (0.01 sec)

mysql> exit
Bye
root@kali:/var/www/html# mysql -u root -p masscan < db-structure.sql
Enter password:
root@kali:/var/www/html# rm db-structure.sql README.md

Bước cuối cùng bạn sẽ phải cập nhật lại cấu hình cài đặt mysql vào file config

vi includes/config.php

define('DB_DRIVER', 'MySQL');
define('DB_HOST', 'localhost');
define('DB_USERNAME', 'masscan');
define('DB_PASSWORD', 'changem3');
define('DB_DATABASE', 'masscan');

Sau khi hoàn thành xong các bước cài đặt. Bạn có thể sử dụng masscan để scan mục tiêu. Hoặc cũng có thể xem thêm link sau [https://github.com/robertdavidgraham/masscan#banner-checking](masscan GitHub page.)

masscan 10.0.0.0/8 -p80,21,53 --banners --source-ip 10.0.0.2 --max-rate 100000 -oX scan-01.xml

Kết quả

root@kali:/var/www/html# ls -l scan*
-rw-r--r-- 1 root root 212929324 Dec 1 13:23 scan-01.xml
-rw-r--r-- 1 root root 700816226 Dec 1 13:55 scan-02.xml
root@kali:/var/www/html# php import.php scan-01.xml

Do you want to clear the database before importing (yes/no)?: yes

Clearing the db
Reading file
Parsing file
Processing data (This may take some time depending on file size)

Summary:
Total records:738279
Inserted records:738279
Took about:3 minutes,18 seconds
root@kali:/var/www/html# php import.php scan-02.xml

Do you want to clear the database before importing (yes/no)?: no
Reading file
Parsing file
Processing data (This may take some time depending on file size)

Summary:
Total records:2411974
Inserted records:2411974
Took about:9 minutes,41 seconds
root@kali:/var/www/html#

Việc scan port cũng như IP giờ trở nên thật dễ dàng. Hoặc bạn cũng có thể sử dụng phiên bản web ui bằng cách truy cập link GitHub project page.

Đây là phiên bản web ui để các bạn tham khảo.

masscan-webui-1024x783 (1).png

Tài liệu tham khảo: https://www.offensive-security.com/offsec/masscan-web-interface/


All rights reserved

Viblo
Hãy đăng ký một tài khoản Viblo để nhận được nhiều bài viết thú vị hơn.
Đăng kí