웹사이트 검색

Ubuntu 20.04에 SpiderFoot 보안 스캐너를 설치하는 방법


이 페이지에서

  1. 전제 조건
  2. 시작하기\n
  3. 거미발 설치
  4. 웹 UI 모드에서 SpiderFoot 실행\n
  5. SpiderFoot 인증 구성
  6. SpiderFoot에 액세스
  7. 결론

Spiderfoot은 해커의 공격을 줄이는 데 도움이 되는 무료 오픈 소스 취약성 테스트 도구입니다. Linux 서버의 취약점 및 악성 기능을 분석하는 데 사용됩니다. Linux 및 Windows 시스템을 지원하고 GitHub와 협업할 수 있는 크로스 플랫폼 소프트웨어 도구입니다. Python으로 작성되었으며 SQLite를 데이터베이스 백엔드로 사용합니다. 웹 브라우저를 통해 동시에 둘 이상의 대상에 대한 침투 테스트를 수행할 수 있는 웹 기반 인터페이스를 제공합니다.

이 튜토리얼에서는 Ubuntu 20.04 서버에 Spiderfoot을 설치하는 방법을 보여줍니다.

전제 조건

  • Ubuntu 20.04를 실행하는 서버.\n
  • 루트 암호는 서버에 구성됩니다.\n

시작하기

시작하기 전에 패키지 캐시를 최신 버전으로 업데이트하는 것이 좋습니다. 다음 명령으로 업데이트할 수 있습니다.

apt-get update -y

모든 패키지가 최신 상태이면 다음 명령을 사용하여 다른 필수 패키지를 설치합니다.

apt-get install python3 python3-pip -y

모든 패키지가 설치되면 다음 단계로 진행할 수 있습니다.

스파이더풋 설치

먼저 Git 저장소에서 최신 버전의 Spiderfoot을 다운로드해야 합니다. 다음 명령으로 다운로드할 수 있습니다.

wget https://github.com/smicallef/spiderfoot/archive/v3.3.tar.gz

다운로드가 완료되면 다음 명령을 사용하여 다운로드한 파일의 압축을 풉니다.

tar -xvzf v3.3.tar.gz

다음으로 디렉터리를 추출된 디렉터리로 변경하고 다음 명령을 사용하여 모든 Python 종속성을 설치합니다.

cd spiderfoot-3.3
pip3 install -r requirements.txt

설치가 완료되면 다음 명령을 사용하여 SpiderFoot에서 사용 가능한 모든 옵션을 나열할 수 있습니다.

python3 sf.py --help

다음과 같은 결과가 표시되어야 합니다.

usage: sf.py [-h] [-d] [-l IP:port] [-m mod1,mod2,...] [-M] [-s TARGET] [-t type1,type2,...] [-T] [-o tab|csv|json] [-H] [-n] [-r]
             [-S LENGTH] [-D DELIMITER] [-f] [-F type1,type2,...] [-x] [-q]

SpiderFoot 3.3: Open Source Intelligence Automation.

optional arguments:
  -h, --help          show this help message and exit
  -d, --debug         Enable debug output.
  -l IP:port          IP and port to listen on.
  -m mod1,mod2,...    Modules to enable.
  -M, --modules       List available modules.
  -s TARGET           Target for the scan.
  -t type1,type2,...  Event types to collect (modules selected automatically).
  -T, --types         List available event types.
  -o tab|csv|json     Output format. Tab is default. If using json, -q is enforced.
  -H                  Don't print field headers, just data.
  -n                  Strip newlines from data.
  -r                  Include the source data field in tab/csv output.
  -S LENGTH           Maximum data length to display. By default, all data is shown.
  -D DELIMITER        Delimiter to use for CSV output. Default is ,.
  -f                  Filter out other event types that weren't requested with -t.
  -F type1,type2,...  Show only a set of event types, comma-separated.
  -x                  STRICT MODE. Will only enable modules that can directly consume your target, and if -t was specified only those events
                      will be consumed by modules. This overrides -t and -m options.
  -q                  Disable logging. This will also hide errors!

웹 UI 모드에서 SpiderFoot 실행

이제 SpiderFoot가 서버에 설치됩니다. 이제 웹 브라우저를 통해 액세스하려면 웹 UI 모드에서 SpiderFoot를 시작해야 합니다.

다음 명령으로 실행할 수 있습니다.

python3 sf.py -l your-server-ip:5001

다음과 같은 결과가 표시되어야 합니다.

2021-03-01 11:16:53,927 [INFO] Starting web server at 45.58.43.9:5001 ...
2021-03-01 11:16:53,937 [WARNING] 
********************************************************************
Warning: passwd file contains no passwords. Authentication disabled.
Please consider adding authentication to protect this instance!
Refer to https://www.spiderfoot.net/documentation/#security.
********************************************************************


*************************************************************
 Use SpiderFoot by starting your web browser of choice and 
 browse to http://45.58.43.9:5001/
*************************************************************

2021-03-01 11:16:53,996 [INFO] [01/Mar/2021:11:16:53] ENGINE Listening for SIGTERM.
2021-03-01 11:16:53,996 [INFO] [01/Mar/2021:11:16:53] ENGINE Listening for SIGHUP.
2021-03-01 11:16:53,996 [INFO] [01/Mar/2021:11:16:53] ENGINE Listening for SIGUSR1.
2021-03-01 11:16:53,996 [INFO] [01/Mar/2021:11:16:53] ENGINE Bus STARTING
2021-03-01 11:16:54,099 [INFO] [01/Mar/2021:11:16:54] ENGINE Serving on http://45.58.43.9:5001
2021-03-01 11:16:54,100 [INFO] [01/Mar/2021:11:16:54] ENGINE Bus STARTED

보시다시피 SpiderFoot가 시작되고 포트 5001에서 수신 대기합니다. CTRL+C를 눌러 SpiderFoot를 중지합니다.

SpiderFoot 인증 구성

기본적으로 SpiderFoot는 인증 없이 액세스할 수 있습니다. 따라서 기본 인증을 활성화하는 것이 좋습니다.

이렇게 하려면 다음 명령을 사용하여 디렉터리를 SpiderFoot로 변경합니다.

cd spiderfoot-3.3

그런 다음 다음 명령을 사용하여 passwd 파일에 사용자 이름과 비밀번호를 추가하십시오.

echo "admin:yourpassword" > passwd

이제 다음 명령을 사용하여 웹 UI 모드로 SpiderFoot를 다시 시작합니다.

python3 sf.py -l your-server-ip:5001

다음과 같은 결과가 표시되어야 합니다.

2021-03-01 11:17:56,108 [INFO] Starting web server at 45.58.43.9:5001 ...
2021-03-01 11:17:56,118 [INFO] Enabling authentication based on supplied passwd file.

*************************************************************
 Use SpiderFoot by starting your web browser of choice and 
 browse to http://45.58.43.9:5001/
*************************************************************

2021-03-01 11:17:56,138 [INFO] [01/Mar/2021:11:17:56] ENGINE Listening for SIGTERM.
2021-03-01 11:17:56,138 [INFO] [01/Mar/2021:11:17:56] ENGINE Listening for SIGHUP.
2021-03-01 11:17:56,138 [INFO] [01/Mar/2021:11:17:56] ENGINE Listening for SIGUSR1.
2021-03-01 11:17:56,138 [INFO] [01/Mar/2021:11:17:56] ENGINE Bus STARTING
2021-03-01 11:17:56,240 [INFO] [01/Mar/2021:11:17:56] ENGINE Serving on http://45.58.43.9:5001
2021-03-01 11:17:56,241 [INFO] [01/Mar/2021:11:17:56] ENGINE Bus STARTED

SpiderFoot에 액세스

이제 웹 브라우저를 열고 URL http://your-server-ip:5001을 사용하여 SpiderFoot 웹 인터페이스에 액세스하십시오. SpiderFoot 로그인 페이지로 리디렉션됩니다.

관리자 사용자 이름, 비밀번호를 제공하고 로그인 버튼을 클릭합니다. 로그인하면 다음 페이지에 SpiderFoot 대시보드가 표시됩니다.

이제 새 스캔 버튼을 클릭하여 새 스캔을 만듭니다. 다음 페이지가 표시됩니다.

대상 서버 IP를 제공하고 지금 검색 실행을 클릭합니다. 다음 페이지가 표시됩니다.

결론

Ubuntu 20.04 서버에 SpiderFoot를 성공적으로 설치했습니다. 이제 SpiderFoot 대시보드를 통해 원격 컴퓨터에서 취약점을 스캔할 수 있습니다. 궁금한 점이 있으면 언제든지 문의해 주세요.