OS/Kali Linux Hydra & crunch 사용법
  • 728x90
    반응형

     

     

    목차

       

      Hydra 사용법

      nmap 을 사용하여 포트 445(microsoft-ds service) 가 열려있는 host PC를 스캔한다.

      root@kail:~# nmap -p 445 --open 192.168.0.xxx/24

       

      스캔 결과

       

      PC 로그인 ID는 이미 알고 있는 경우 passlist.txt 사전 파일을 이용한 hydra 명령어는 아래와 같다.

      root@kail:~# hydra -l user -P /root/Desktop/passlist.txt 192.168.0.xxx smb

       

      PC 로그인 ID와 PASSWORD를 둘다 모를 경우 loginlist.txt 와 passlist.txt 사전 파일을 이용한 hydra 명령어는 아래와 같다.

      root@kail:~# hydra -L /root/Desktop/loginlist.txt -P /root/Desktop/passlist.txt 192.168.0.xxx smb

       

       

       

      crunch 사용법

       

      crunch는 hydra와 같은 무차별 대입공격에 필요한 사전파일을 자동으로 생성해주는 도구이다.

      root@kail:~# crunch -h
      crunch version 3.6
      Crunch can create a wordlist based on criteria you specify. The output from crunch can be sent to the screen, file or to another program.
      Usage: crunch <main> <max> [options]where min and max are numbers Please refer to the man page for instructions and examples on how to use crunch.

       

      자릿수 최소 4 최대4 1234567890의 숫자의 모든 경우의 수를 출력해보는 명령어 예이다.

      root@kail:~# crunch 4 4 123456780

       

      생성 결과

       

      위의 출력내용을 파일로 생성해주는 명령어는 아래와 같다.

      root@kail:~# crunch 4 4 1234567890 -o /root/Desktop/list.txt

       

      자릿수 최소 5 최대 5 abcdef의 숫자의 모든 경우의 수를 파일로 저장하는 명령어 예이다.

      root@kail:~# crunch 5 5 abcdef -o /root/Desktop/abc.txt

       

      특정 파일의 명령을 참조하여 리스트 파일을 저장하는 방법중 특정 파일 작성의 예이다.

      [lefpad /root/Desktop/charset.txt]
      numeric = [0123456789]
      alpha = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
      alpha-numeric = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
      loweralpha = [abcdefghijklmnopqrstuvwxyz]
      loweralpha-numeric = [abcdefghijklmnopqrstuvwxyz0123456789]
      ascii-32-95 = [!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]
      ascii-32-65-123-4 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~]
      alpha-numeric-sysbol32-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]

       

      위에서 작성된 파일을 이용하여 사전파일을 만드의 명령어 예이다.

      root@kail:~# crunch 4 4 -f /root/Desktop/charset.txt numeric -o /root/Desktop/list.txt

      root@kail:~# crunch 4 4 -f /root/Desktop/charset.txt mixalpha -o /root/Desktop/list.txt

      root@kail:~# crunch 4 4 -f /root/Desktop/charset.txt ascii-32-95 -o /root/Desktop/list.txt

       

       

       

       

      728x90
      반응형

      'OS > Kali Linux' 카테고리의 다른 글

      Metasploit collaboration Shellter  (0) 2018.04.13
      kail Applications Automatic Installation  (0) 2018.04.13
      nmap 사용법  (0) 2018.04.11
      TCP idle Scan  (0) 2018.04.10
      Custom Payload feat shellter  (0) 2018.04.10
    상단으로