
네트워크에서 취약한 SSH 비밀번호를 스캔하는 가장 좋은 방법
ssh-auditor는 자동으로 다음을 수행합니다:
scan_interval을 사용하여 다시 확인합니다. 기본값은 14일입니다.매시간 cron에서 ssh-auditor discover + ssh-auditor scan을 실행하여 지속적인 감사를 수행할 수 있도록 설계되었습니다.
$ brew install go # 또는 원하는 방식으로 go 컴파일러 설치
$ go get github.com/ncsa/ssh-auditor
$ go build
$ make static
$ ulimit -n 4096
$ ./ssh-auditor discover -p 22 -p 2222 192.168.1.0/24 10.0.0.1/24
$ ./ssh-auditor addcredential root root
$ ./ssh-auditor addcredential admin admin
$ ./ssh-auditor addcredential guest guest --scan-interval 1 # 하루에 한 번 확인
$ ./ssh-auditor scan
$ ./ssh-auditor vuln
$ ./ssh-auditor rescan
$ ./ssh-auditor dupes
ssh-auditor vuln이 실행하는 이 쿼리는 다음과 같습니다.
select
hc.hostport, hc.user, hc.password, hc.result, hc.last_tested, h.version
from
host_creds hc, hosts h
where
h.hostport = hc.hostport
and result!='' order by last_tested asc