[원문: http://tools.kali.org/information-gathering/recon-ng]


정의

Recon-ng is a full-featured Web Reconnaissance framework written in Python. Complete with independent modules, database interaction, built in convenience functions, interactive help, and command completion, Recon-ng provides a powerful environment in which open source web-based reconnaissance can be conducted quickly and thoroughly.


Recon-ng has a look and feel similar to the Metasploit Framework, reducing the learning curve for leveraging the framework. However, it is quite different. Recon-ng is not intended to compete with existing frameworks, as it is designed exclusively for web-based open source reconnaissance. If you want to exploit, use the Metasploit Framework. If you want to Social Engineer, us the Social Engineer Toolkit. If you want to conduct reconnaissance, use Recon-ng! See the Usage Guide for more information.


Recon-ng is a completely modular framework and makes it easy for even the newest of Python developers to contribute. Each module is a subclass of the “module” class. The “module” class is a customized “cmd” interpreter equipped with built-in functionality that provides simple interfaces to common tasks such as standardizing output, interacting with the database, making web requests, and managing API keys. Therefore, all the hard work has been done. Building modules is simple and takes little more than a few minutes. See the Development Guide for more information.

 recon-ng를 간략하게 소개하면 파이썬 기반의 웹 정찰 프레임 워크이다. 정찰이라는 말이 조금 우스워 보일 수는 있으나 마치 스타크래프트에서 드론이 적의 진영이 취약한지 아닌지에 대해 정찰 간다. 정도로 표현하면 어느정도 일맥상통하지 않을까..?
recon-ng는 보기에는 metasploit-framework와 비슷해 보인다. 하지만 꽤 다른데 recon-ng는 오로지 웹 기반을 위해 설계되었다. 만약에 exploit을 원한다면 metasploit framework를 이용하면 되고 사회적 공학을 원한다면 Setoolkit을 이용하면 된다.

추후 업데이트가 되겠지만 간단한 정보로는
metaspolit: http://kkn1220.tistory.com/34

setoolkit: http://kkn1220.tistory.com/31 을 참고하면 되겠다.

28번이 SET(Social Engineer Toolkit)이기 때문에 Setoolkit은 좀 더 업데이트 할 예정이다.

recon-ng는 칼리에 build-in 설치 되어 있기 때문에 추가 설치나 다운로드 받을 필요가 없다.


Usage

이러한 프레임워크는 기본적으로 help를 눌러 어떤 기능들을 제공하는지 보는 것이 우선되어야 한다.

아래 load의 경우 모듈을 커스터마이징하거나 새롭게 출시되는 모듈에 대해 다운로드하고 로드할 수 있다.

recon-ng 커맨드 입력 시 위의 화면과 같이 출력된다.

제공하는 모듈이 상당히 많다. 하나하나 보고는 싶지만 그러기엔 docu의 수도 부족하고 시간 제약상...

모듈 중 xssposed를 확인하였는데 이것은 오픈 버그바운티라 불린다. 해당 내용으로는 기한이나 범위 등의 제약 없이 모든 웹사이트에서 발견되는 모든 종류의 취약점들이 있다.

해당 url에는 취약점이 발견되지 않았다.

구글의 경우 65개의 취약점이 발견되었으며 일부는 fixed되었지만 많은 수의 취약점들이 unfixed 상태였다.

target website의 취약점 발견을 하는 데 있어 유용할 것 같다.


제공하는 api가 많다. 페이스북, 구글, jigsaw, 쇼단 등을 제공한다.

api의 경우 무료로 제공하는 것들과 유료로 제공하는 것들이 있을 수 있는데 전에 shodan api를 받아 놓은 것이 있어 추가해보겠다.

쇼단에 대한 내용은 http://kkn1220.tistory.com/68 을 참고하면 된다.

usage: keys add <name>

keys list를 입력하면 아래와 같이 value값이 추가 된 것을 확인할 수 있다.

각각에 대한 모듈 적용 후 show info를 입력하면 해당 모듈에 대한 간단한 설명과 방법에 대해 소개한다.

간단히 테스트 목적이기 때문에 특정 타겟이 아닌 naver로 run시켜보았다.

쭈주죽 나온다.

그냥 끄면 아쉽기 때문에 임의의 ip를 가지고 접속해보았다.

접속 결과 웹사이트가 오래 된 느낌이 들었다. 혹시나 하는 마음에 sql 인젝션을 수행하였다.

실제로 sql인젝션에 대해 이론으로만 배웠는데 되는 것을 보고 신기한 마음도 있었다.

아래는 사이트에 대해 공개는 할 수 없고 관리자 권한으로 접속한 페이지의 화면이다.


recon-ng는 웹사이트 정찰에 있어 제공하는 모듈도 많고 업데이트도 빈번하게 되어 타겟에 대한 정보를 획득하기 좋은 툴이라고 사료된다.

다만 아쉬운 점은 빈번한 업데이트로 인해 모듈 통합이나 없어지는 것들이 많아 document 수가 부족하다는 점?

'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering26]p0f  (0) 2016.04.07
[Information-Gathering25]nmap  (0) 2016.04.06
[Information-Gathering24]miranda  (0) 2016.03.29
[Information-Gathering23]masscan  (0) 2016.03.24
[Information-Gathering22]hping3  (0) 2016.03.18

[원문: http://tools.kali.org/information-gathering/p0f]


정의

P0f is a tool that utilizes an array of sophisticated, purely passive traffic fingerprinting mechanisms to identify the players behind any incidental TCP/IP communications (often as little as a single normal SYN) without interfering in any way. Version 3 is a complete rewrite of the original codebase, incorporating a significant number of improvements to network-level fingerprinting, and introducing the ability to reason about application-level payloads (e.g., HTTP).

Some of p0f’s capabilities include:

  • Highly scalable and extremely fast identification of the operating system and software on both endpoints of a vanilla TCP connection – especially in settings where NMap probes are blocked, too slow, unreliable, or would simply set off alarms.
  • Measurement of system uptime and network hookup, distance (including topology behind NAT or packet filters), user language preferences, and so on.
  • Automated detection of connection sharing / NAT, load balancing, and application-level proxying setups.
  • Detection of clients and servers that forge declarative statements such as X-Mailer or User-Agent.

The tool can be operated in the foreground or as a daemon, and offers a simple real-time API for third-party components that wish to obtain additional information about the actors they are talking to.


Common uses for p0f include reconnaissance during penetration tests; routine network monitoring; detection of unauthorized network interconnects in corporate environments; providing signals for abuse-prevention tools; and miscellanous forensics.

  p0f를 간략하게 소개하면 운영하는 서비스에 대한 OS를 확인하거나 어플리케이션의 정보를 확인할 수 있다.
예를 들면 서버의 OS가 리눅스 3.x, 또는 80 아파치 2.x 등을 확인할 수 있다.

해킹을 하기 전 footprint 단계에서 타겟 서비스의 정보를 파악해야 할 일이 생기는데 이럴 때 사용하는 것이 p0f 이다.
(footprint에 대한 설명은 http://kkn1220.tistory.com/61 참고)

25번 nmap에서 -O 옵션을 주어 타겟의 OS를 확인해보았다. (http://kkn1220.tistory.com/103 참고)
그렇다면 nmap과 p0f의 차이점은 무엇일까? 라는 질문을 할 수 있다. p0f는 Passive OS Fingerprinting으로 말 그대로 수동적인 OS 탐지 도구이다. nmap과 같은 Active Fingerprinting과는 수동적이냐 능동적이냐의 차이가 있으며 수동적인 OS 탐지도구의 경우 추가 또는 비정상적 트래픽을 생성하지 않는 것이 특징이다. 즉 정상적인 통신을 하면서 타겟 시스템의 OS를 확인할 수 있다.

 p0f는 4가지 동작모드를 지원한다.

-SYN mode: 연결 시도 측 운영체제 정보 확인

-SYN + ACK mode: 응답하는 측 운영체제 정보 확인

-RST/RST+ ACK mode: 연결 시도 거부 시스템 측 정보 확인

-stray ACK mode: 기존 세션 검토


Usage

사용법은 어렵지 않다. 

옵션으로 인터페이스를 설정하거나 promiscuous 모드 설정, 저장하거나 input file 지정 등 사항에 맞게 지정하면 끝이다.


-i 인터페이스 모드로 eth0을 지정하였고 promiscuous를 지정하였다. 이전에 스니핑 포스트 때 언급하였는데 자신의 주소값을 무시하고 모든 패킷을 받아들이는 상태를 promiscuous 모드라고 한다. (스니핑 http://kkn1220.tistory.com/67 참고)

그림출처: 안랩

kali는 기다리게 된다....


보기 편하도록 ubuntu(192.168.100.5)에서 실행이 아닌 kali에서 ssh로 192.168.100.5로 접속을 한 상태이다.

kkn은 ubuntu(192.168.100.5)이고 ssh로 raspberry pi(192.168.100.9)로 연결을 시도하는 화면의 모습이다.

위의 사진을 보면 192.168.100.5의 OS를 확인할 수 있다. 실제로는 3.19인데 완벽하게 맞추지는 못한다.

또한 9번 raspberry의 경우 라즈비안을 설치하였는데 os에 ??? 로 확인할 수가 없었다..


심심해서 ubuntu에서 apt-get update를 하였다. 

위의 사진에는 표현되지 않았지만 해당 서버의 경우 리눅스 2.4, 3.x로 출력이 되었다. 

또한 80포트 apache의 경우 2.x로 출력이 되었음을 확인할 수 있었다.


뭐 간단한 예제이기에 별거 없어보인다. 하지만 실제 타겟에 대해 할 경우 많은 내용이 출력될 수 있다. 그렇기 때문에 패킷 덤프파일을 이용하여 os를 탐지하는 경우가 더 많은 듯 보인다.

'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering27]recon-ng  (0) 2016.04.12
[Information-Gathering25]nmap  (0) 2016.04.06
[Information-Gathering24]miranda  (0) 2016.03.29
[Information-Gathering23]masscan  (0) 2016.03.24
[Information-Gathering22]hping3  (0) 2016.03.18

[원문: http://tools.kali.org/information-gathering/nmap]


정의

Nmap (“Network Mapper”) is a free and open source (license) utility for network discovery and security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. It was designed to rapidly scan large networks, but works fine against single hosts. Nmap runs on all major computer operating systems, and official binary packages are available for Linux, Windows, and Mac OS X. In addition to the classic command-line Nmap executable, the Nmap suite includes an advanced GUI and results viewer (Zenmap), a flexible data transfer, redirection, and debugging tool (Ncat), a utility for comparing scan results (Ndiff), and a packet generation and response analysis tool (Nping).


Nmap was named “Security Product of the Year” by Linux Journal, Info World, LinuxQuestions.Org, and Codetalker Digest. It was even featured in twelve movies, including The Matrix Reloaded, Die Hard 4, Girl With the Dragon Tattoo, and The Bourne Ultimatum.

 기존과는 다르게 nmap은 간략하게 소개 할 수가 없다. nmap에는 상당히 많은 기능과 옵션이 존재하기 때문이다.

그래도 굳이 정의하자면 포트스캐닝 도구로서 호스트나 네트워크를 스캐닝 할 때 매우 우용한 도구다. 라고 표현하고 싶다.

위의 정의를 보면 nmap은 네트워크 검사나 보안 감사를 위한 무료이자 오픈소스 유틸리티로 표현하고 있다.

nmap은 raw ip 패킷을 이용하여 네트워크상의 호스트 검사, 사용하는 서비스가 무엇인지, 운영하는 OS, 사용 중인 패킷 필터, 방화벽 타입 등을 검사한다.

 원문 페이지를 방문하면 nmap에 대한 장점을 소개하였는데 간략하게 소개하자면

1) 다양한 포트스캐닝 메커니즘(TCP&UDP), os 감지, 버전 감지, ping sweeps 등을 제공하는 유연성

2) huge network 상에서 제공할 수 있는 강력함

3) 윈도우, 리눅스, 솔라리스, 맥 등에서 사용할 수 있음

4) 자세한 다큐먼트 등을 소개하고 있다.


Usage

위에서 볼 수 있듯이 엄청많다....


#nmap [Scan Type(s)] [Options] {target specification}

기본 syntax는 위와 같다.

자주 사용하는 옵션에 대해 소개하고자 한다. 나머지 옵션 및 기능들은 man page 참고!

(분류는 보기좋게(?) 개인적으로 판단하였습니다.)

[Scan Type(s)]

1)Port Scanning

-sT: TCP connect() scan: TCP scanning의 가장 기초적인 형태로 connect()함수를 사용해서 모든 포트에 대해 스캔

-sS: TCP SYN scan: full TCP접속을 하지 않으므로 "half-open" 스캐닝이라 한다. 하나의 SYN 패킷을 보내어 SYN|ACK 응답이 오면 그 포트는 listening 상태임을 나타내며, RST(ReSeT)응답이 오면 non-listener임을 나타냄

이 기술은 하나의 패킷을 보내어 응답을 받으면 그 즉시 RST 패킷을 보내서 접속을 끊어버리기 때문에 로그를 남기지 않는 경우가 대부분임. 즉 추적이 어렵다.

-sF: Stealth FIN: SYN 패킷을 막아놓은 방화벽이나 패킷 필터 또는 Synlogger와 Courtney 같은 스캔을 탐지하는 프로그램들을 무사히 통과할 수 있다. open 포트로 FIN 패킷을 보내면 이 패킷을 무시하고, closed 포트로 보내면 RST 패킷이 온다.

-sX: Xmas Tree: FIN, URG, PUSH 코드 비트를 설정한 채 패킷을 보냄. RESET은 포트가 닫혔다는 것을 말해주며, 반응이 없는 것은 포트가 열려있음을 뜻함

-sN: Null scan: 어떤 코드 비트도 설정하지 않은 패킷을 보냄. RESET은 포트가 닫힌 것을 말하며, 반응이 없는 것은 포트가 열린 것을 뜻함

-sP: Ping scanning: 네트워크의 어느 호스트가 살아있는지를 알고 싶을 때 사용(-sn 과 동일)

-sU; UDP scan, 시간이 상당히 오래 걸림

-sA: ACK scan 

-sW: window scan 

-sR: RPC scan

2)Service And Version Detection

-sV:Version detection

-sR:RPC scan

3)OS Detection

-O: Enable OS detection

리눅스 3.x를 사용한다고 추측하고 있다. 정확한 버전까지는 확인할 수 없으나 대략적으로 판단할 수 있다.


[Options]

1)Port Specification And Scan Order

-p: port ranges(Only scan specified ports): 특정 포트를 지정하는 것으로 예를 들어 -p 80 식으로 지정함, '-' 범위 지정 가능
(Udp:53, 111, 137, Tcp:21-25, 80, 139, 8080)

-F(fast scan)

-r(Don't randomize ports)

2) Timing and Performance

-T:paranoid|sneaky|polite|normar|aggressive|insane

->The first two are for IDS evasion. Polite mode slows down the scan to use less bandwidth and target machine resources. Normal mode is the default and so -T3 does nothing. Aggressive mode speeds scans up by making the assumption that you are on a reasonably fast and reliable network. Finally insane mode. assumes that you are on an extraordinarily fast network or are willing to sacrifice some accuracy for speed.

주로 4번(-T4)을 많이 사용하는 것 같음

3) Verbosity

nmap을 쓰는 사람은 기본적으로 v옵션을 사용

-v: Increase verbosity level: 자세히

Use it twice or more for even greater verbosity: -vv, or give a verbosity level directly, for example -v3


{target specification}

타겟을 지정하는 데 있어 단일 호스트 192.168.100.5, 다중 호스트 192.168.100.3-20 으로 주어지는게 가능하다.

또한 CIDR-style을 지원한다. 예를 들어 192.168.100.0/24는 192.168.100.0번부터 192.168.100.255까지 256의 호스트를 스캔

-iL inputfilename

작성한 파일이 제대로 동작하는지 tab기능과 enter를 통해 작성 결과 모두 정상적으로 출력되는 것을 확인할 수 있었다.

비록 위의 결과는 3개의 호스트에 대해서만 출력하였지만 같은 IP대역이 아닌 다양하고 상당히 많은 수의 호스트 리스트가 필요할 수 있다. 이 때 유용하게 쓰일 것으로 사료된다.


nmap을 모두 설명하기에는 실력의 부족도 있지만 nmap에 대한 기능만 다룬 두꺼운 책 한권이 있을 정도로 다루는 범위가 방대하다. 해당 포스트는 nmap에 대한 소개 정도로 보면 좋을 듯 싶다. 하지만 기능은 매우 강력하다라는 것을 표현하고 싶다.

'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering27]recon-ng  (0) 2016.04.12
[Information-Gathering26]p0f  (0) 2016.04.07
[Information-Gathering24]miranda  (0) 2016.03.29
[Information-Gathering23]masscan  (0) 2016.03.24
[Information-Gathering22]hping3  (0) 2016.03.18

[원문: http://tools.kali.org/information-gathering/miranda]


정의

Miranda is a Python-based Universal Plug-N-Play client application designed to discover, query and interact with UPNP devices, particularly Internet Gateway Devices (aka, routers). It can be used to audit UPNP-enabled devices on a network for possible vulnerabilities. Some of its features include:


Interactive shell with tab completion and command history

Passive and active discovery of UPNP devices

Customizable MSEARCH queries (query for specific devices/services)

Full control over application settings such as IP addresses, ports and headers

Simple enumeration of UPNP devices, services, actions and variables

Correlation of input/output state variables with service actions

Ability to send actions to UPNP services/devices

Ability to save data to file for later analysis and collaboration

Command logging

 간략하게 miranda는 Internet Gateway Device(ex.router)같은 UPNP 디바이스를 찾고 상호작용하기 위해 설계 된 파이썬 기반의 Universal PnP 클라이언트 어플리케이션이다. 즉 IGD 타겟에 대해 나열하기 위해 사용 된다고 정의할 수 있다.

Miranda를 실행하기 전에 UPnP에 대한 적절한 지식이 필요하다.

UPnP(https://www.microsoft.com/korea/windowsxp/pro/techinfo/planning/upnp/protocol.mspx 발췌)

UPnP 정의

UPnP는 네트워크 상에 있는 네트워크 장치들이 서로 연동될 수 있도록 하는 범용 표준 프로토콜이다.

UPnP는 표준 IP 프로토콜을 활용함으로 다양한 네트워크 매체를 활용할 수 있는데 즉 장치들을 네트워크로 서로 연결시키는데 활용할 수 있는 모든 매체가 UPnP 기능을 구현할 수 있다.

UPnP가 사용하는 프로토콜

UPnP 프로토콜 스택

    <UPnP 프로토콜 스택>

1)TCP/IP

-TCP/IP 네트워킹 프로토콜 스택은 나머지 모든 UPnP 프로토콜을 구축하는 기반 역할

-TCP/IP 서비스(DHCP, DNS 등) 뿐만 아니라 TCP, UDP, IGMP, ARP , IP 등 TCP/IP 스택에 있는 많은 프로토콜을 사용


2)HTTP, HTTPU, HTTPMU

-HTTP를 기본 프로토콜로하여 유니캐스트, 멀티캐스트를 지원하는 프로토콜

-HTTP는 TCP/IP기반, HTTPU, HTTPMU는 UDP/IP 기반 위에서 동작


3)SSDP

-SDP(Simple Service Discovery Protocol)는 네트워크 서비스를 네트워크 상에서 검색하는 방법을 정의

-SSDP는 HTTPU 및 HTTPMU 기반 위에 구축되며, 제어 포인트가 네트워크 상에서 원하는 리소스를 검색하는 방법 및 장치들이 네트워크상에서 자신들이 가용상태에 있음을 알리는 방법을 정의

-제어 포인트 및 장치 모두가 SSDP를 사용하는데 UPnP 제어 포인트는 부팅이 되자마자 SSDP 검색 요청(HTTPMU을 사용함)을 보내서 네트워크에서 활용 가능한 장치와 서비스를 검색

-UPnP 장치는 멀티캐스트 포트 정보를 수신하고, 검색 요청을 수신하자마자 장치는 일치 여부를 확인하기 위하여 검색 조건을 점검. 만약 일치된 것이 발견되면 유니캐스트 SSDP (HTTPU를 사용) 응답이 제어 포인트로 전송

-이외에도 SSDP는 장치 및 장치 관련 서비스가 네트워크와의 연결을 원활하게 끊는 방법을 포함하고 있으며, 또한 자체적인 문제 해결을 위하여 유해 정보를 정화하는데 사용되는 캐시 타임아웃(cache timeouts)을 포함


4)GENA

-GENA (Generic Event Notification Architecture)는 TCP/IP를 통한 HTTP 및 멀티캐스트 UDP를 사용하여 통보(notifications)를 송수신하는 기능을 제공

-또한 GENA은 이벤트 실행을 위하여 가입자 및 통보 발행자의 개념을 정의

-UPnP는 GENA 포맷을 사용하여 존재 발표 내용을 생성한 후에 SSDP 프로토콜을 통하여 전송하고 UPnP 이벤트 작업의 서비스 상태 변화를 신호로 알려주는 기능 수행


5)SOAP
-SOAP (Simple Object Access Protocol)는 XML 및 HTTP의 용법을 정의하여 원격 프로시저 호출을 실행

-SOAP는 또한 보안용으로 SSL (Secure Sockets Layer)을 활용하고 HTTP의 연결 관리 기능을 활용


6)XML

-XML(Extensible Markup Language)은 웹 상의 구조화된 데이터를 위한 범용 포맷

-XML은 태그와 특성(tags, attributes)을 사용한다는 측면에서 보면 HTML과 유사한 점이 많지만, XML은 그러한 태그와 특성들이 일반적으로 정의된 것이 아니라 사용되는 컨텍스트 내에서 해석된다는 관점에서 보면 상당히 다름

-XML은 장치 및 서비스 설명서, 제어 메시지 및 이벤트에 사용되는 UPnP의 핵심적 부분


(https://www.ethicalhacker.net/columns/heffner/plug-n-play-network-hacking 정리가 참 잘되어 있음)

UPnP 위험성 언급

-UPnP implementations are at more risk than others; several UPnP-enabled IGDs allow the DNS settings to be directly altered via UPnP, which is just begging for a MITM/phishing attack. Still others, particularly those devices that use some form of embedded Linux, actually use the un-sanitized values they receive via UPnP requests as part of executed shell commands, leaving them open to command-injection attacks. A list of some known vulnerable routers can be found here.

UPnP protocol overview

-The UPnP protocol uses a multicast address of 239.255.255.250 and TCP port 1900. 

Devices that offer UPnP services will periodically send out SSDP NOTIFY messages to 239:255:255:250:1900, announcing themselves to any UPnP clients that are listening. 

Likewise, UPnP clients can send SSDP M-SEARCH requests to 239:255:255:250:1900 to see if any UPnP devices respond. Clients can send an M-SEARCH request looking for any UPnP device, or they can specify that they are looking for a particular UPnP device, or they can query only for a device that supports a specific UPnP service. UPnP hosts that match the devices/services requested will respond with a SSDP RESPONSE message, which contains the same information sent in an SSDP NOTIFY message.

-An SSDP NOTIFY message sent by a UPnP host contains a ‘Location’ header which specifies the location of an XML file. This file contains XML data indicating, among other things, the UPnP device type(s) and services supported by the host, 

as well as paths to additional XML documents that describe the various services in detail. In order to discover the full UPnP capabilities of an IGD, you must parse through all the XML files to extract the devices types, services, and actions offered by the IGD.

-UPnP devices support various services that advertise what actions they support. 

A UPnP client can send a UPnP device an action request at any time; this could be a request to open up a port, change the default DNS server, or anything else that the UPnP device supports. 

Input/output data for action requests and responses are sent using SOAP, which uses XML to structure information sent between two parties. 

SOAP requests are essentially HTTP POST requests with some additional SOAP headers included in the HTTP headers.


Usage

usage는 심플하다. 

miranda를 실행하면 upnp 프롬포트의 쉘로 입력할 수 있다. msearch와 pcap으로 명령을 실행할 수 있는데

pcap의 경우 SSDP NOTIFY 메시지를 통한 수동적 실행이고

msearch의 경우 M-SEARCH 메시지를 이용하여 UPnP디바이스에 쿼리를 날린다.

기본적으로 msearch는 모든 UPnP 디바이스를 탐색하지만, 특정 디바이스 타입이나 서비스를 정해서 찾을 수도 있다.

위의 msearch결과는 네트워크상에서 하나의 UPnP가 있다는 것을 확인할 수 있다. 

위의 xml의 경로를 찾아가면 아래와 같이 화면이 출력된다.


위의 host list명령어는 발견된 모든 UPnP 호스트의 리스트를 보여준다.

아래의 host get 0은 위의[0]의 인덱스 번호이며 해당 호스트의 모든 정보를 얻는다.

얻은 정보를 가지고 host info 0 명령어를 실행하면 아래와 같이 해당 호스트에 대한 정보를 수집할 수 있다.

해당 호스트의 요약된 정보를 보고싶으면 host summary 0 명령어를 실행하면 된다.

위의 xml정보와 동일하다. 내용으로는 모든 디바이스 타입과 각각의 디바이스 타입에 관련된 추가 데이터를 확인 할 수 있다.

조금 더 자세한 내용을 확인하고자 한다면 host details 0을 실행하면 된다. 각각 디바이스의 데이터 타입 등이 출력된다.

종종 데이터가 길게 출력될 수 있기 때문에 text로 볼 수 있도록 기능이 제공된다.

save info 0 <file_name>

데이터 저장

summary에서 WANConnectionDevice를 확인했었다.

위에서 보면 알 수 있듯이 AddportMapping과 DeletePortMapping을 확인할 수 있다. 

또한 GetExternalIPAddress 또한 확인할 수 있다.


Let’s try adding a port mapping to open up the administrative interface on port 80 of the IGD (192.168.0.1) by mapping it to port 8080 on the WAN:

add port mapping

upnp> host send 0 WANConnectionDevice WANIPConnection AddPortMapping


Required argument:

     Argument Name:  NewPortMappingDescription

     Data Type:      string

     Allowed Values: []

     Set NewPortMappingDescription value to: All your ports are belong to us


Required argument:

     Argument Name:  NewLeaseDuration

     Data Type:      ui4

     Allowed Values: []

     Set NewLeaseDuration value to: 0


Required argument:

     Argument Name:  NewInternalClient

     Data Type:      string

     Allowed Values: []

     Set NewInternalClient value to: 192.168.0.1


Required argument:

     Argument Name:  NewEnabled

     Data Type:      boolean

     Allowed Values: []

     Set NewEnabled value to: 1


Required argument:

     Argument Name:  NewExternalPort

     Data Type:      ui2

     Allowed Values: []

     Set NewExternalPort value to: 8080


Required argument:

     Argument Name:  NewRemoteHost

     Data Type:      string

     Allowed Values: []

     Set NewRemoteHost value to:


Required argument:

     Argument Name:  NewProtocol

     Data Type:      string

     Allowed Values: [‘TCP’, ‘UDP’]

     Set NewProtocol value to: TCP


Required argument:

     Argument Name:  NewInternalPort

     Data Type:      ui2

     Allowed Values: []

     Set NewInternalPort value to: 80

The AddPortMapping action takes several input values, but there are a few important notes that should be made here:

1) Boolean values are either ‘1’ (true) or ‘0’ (false);

2) The NewProtocol argument only allows for two values, ‘TCP’ or ‘UDP’

3) We did not specify a value for the NewRemoteHost variable, which allows all remote hosts to match this port mapping.


We didn’t get any output from the AddPortMapping action because it has no output variables defined (again, this information is all stored in the data structure if you’re curious). However, we can verify that the action was successful by running the GetSpecificPortMappingEntry action:


get specific port mapping entry

upnp> host send 0 WANConnectionDevice WANIPConnection GetSpecificPortMappingEntry


Required argument:

     Argument Name:  NewExternalPort

     Data Type:      ui2

     Allowed Values: []

      Set NewExternalPort value to: 8080


Required argument:

     Argument Name:  NewRemoteHost

     Data Type:      string

     Allowed Values: []

     Set NewRemoteHost value to:


Required argument:

     Argument Name:  NewProtocol

     Data Type:      string

     Allowed Values: [‘TCP’, ‘UDP’]

     Set NewProtocol value to: TCP


NewPortMappingDescription : All your ports are belong to us

NewLeaseDuration : 0

NewInternalClient : 192.168.0.1

NewEnabled : 1

NewInternalPort : 80


delete port mapping

upnp> host send 0 WANConnectionDevice WANIPConnection DeletePortMapping


Required argument:

     Argument Name:  NewProtocol

     Data Type:      string

     Allowed Values: [‘TCP’, ‘UDP’]

     Set NewProtocol value to: TCP


Required argument:

     Argument Name:  NewExternalPort

     Data Type:      ui2

     Allowed Values: []

     Set NewExternalPort value to: 8080


Required argument:

     Argument Name:  NewRemoteHost

     Data Type:      string

     Allowed Values: []

     Set NewRemoteHost value to:


'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering26]p0f  (0) 2016.04.07
[Information-Gathering25]nmap  (0) 2016.04.06
[Information-Gathering23]masscan  (0) 2016.03.24
[Information-Gathering22]hping3  (0) 2016.03.18
[Information-Gathering21]goofile  (0) 2016.03.18

[원문: http://tools.kali.org/information-gathering/masscan]


정의

This is the fastest Internet port scanner. It can scan the entire Internet in under 6 minutes, transmitting 10 million packets per second.


It produces results similar to nmap, the most famous port scanner. Internally, it operates more like scanrand, unicornscan, and ZMap, using asynchronous transmission. The major difference is that it’s faster than these other scanners. In addition, it’s more flexible, allowing arbitrary address ranges and port ranges.


NOTE: masscan uses a custom TCP/IP stack. Anything other than simple port scans will cause conflict with the local TCP/IP stack. This means you need to either use the -S option to use a separate IP address, or configure your operating system to firewall the ports that masscan uses.

 간략하게 masscan은 매우 빠른 포트 스캐너이다. massscan은 포트스캐너로 가장 유명한 nmap과 유사한 결과를 보여준다.

고로 nmap을 사용하면 될듯.....


Usage

기본적으로는 #masscan <ip> -p<port number> 를 해주면 된다.

단일 ip의 경우 xxx.xxx.xxx.x 이고 xxx.xxx.xxx.0/24나 xxx.xxx.xxx.1-xxx.xxx.xxx.5 형식도 가능하다.

아래의 경우 포트번호를 1번에서 10000번까지 주었다. 시간이 오래 걸린다. rate속도가 형편이 없다.

--rate <number> 옵션을 주어 속도를 향상시킬 수 있다. 차이가 엄청나다.


exclude text와 include text를 줄 수 있다.

exclude의 경우 제외하다는 의미로 해당 ip를 제외할 수 있다.

#masscan <ip> --excludefile <exclude file_name> -p<port_number>

아래의 경우 5번을 제외시키라는 옵션을 주었고 범위를 0번에서 5번을 주었으나 excludefile 옵션으로 인해 제외되는 것을 확인할 수 있다.

위와는 반대로 포함시키는 옵션이다.

#masscan <ip> --includefile <include file_name> -p<port_number>

ip범위를 0번에서 3번을 주었으나 include option으로 인해 5번도 포함되는 것을 확인할 수 있다.

마지막으로 conf파일에 미리 지정값을 정해주어 사용하는 방법이 있다.

#masscan <ip> -c <conf_file_name>

# Example conf for masscan                                                                                                     

rate =  100000.00                                                                                                              

output-format = grepable                                                                                                       

output-filename = nope                                                                                                         

ports = 80                                                                                                                     

includefile = include.txt                                                                                                      

excludefile = exclude.txt  


'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering25]nmap  (0) 2016.04.06
[Information-Gathering24]miranda  (0) 2016.03.29
[Information-Gathering22]hping3  (0) 2016.03.18
[Information-Gathering21]goofile  (0) 2016.03.18
[Information-Gathering20]golismero  (0) 2016.03.18

[원문: http://tools.kali.org/information-gathering/hping3]


정의

hping is a command-line oriented TCP/IP packet assembler/analyzer. The interface is inspired to the ping(8) unix command, but hping isn’t only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features.


While hping was mainly used as a security tool in the past, it can be used in many ways by people that don’t care about security to test networks and hosts. A subset of the stuff you can do using hping:


-Firewall testing

-Advanced port scanning

-Network testing, using different protocols, TOS, fragmentation

-Manual path MTU discovery

-Advanced traceroute, under all the supported protocols

-Remote OS fingerprinting

-Remote uptime guessing

-TCP/IP stacks auditing

-hping can also be useful to students that are learning TCP/IP.

 간략하게 hping3은 command-line으로 인터페이스는 ping으로부터 영감을 받았다. 그러나 hping3은 ping의 ICMP echo 뿐만 아니라 UDP/TCP패킷 전송이 가능하다. 또한, hping3은 fragmentation, packet body/size를 다룰 수 있으며, 지원되는 프로토콜 아래 파일 전송을 하기 위해 사용되어진다.

(fragmentation 소개: http://kkn1220.tistory.com/76 참고)

지원 목록

-방화벽 테스트

-포트 스캐닝

-protocols, TOS, fragmentation을 이용한 네트워크 테스트

-MTU확인

-traceroute

-OS 핑거프린팅

-업타임 추측

-TCP/IP 스택 감사

-> hping3은 일전에 DoS 공격 때 언급했었는데 상당히 강력하다. 추천!


Usage

#hping3 -h  입력 시 출력되는 것이 상당히 많다.

아래는 조금이나마 편하게(?) 볼 수 있는 페이지이다. 기본 옵션, 자주쓰는 옵션, IP 관련 옵션, ICMP 관련 옵션, TCP/UDP 관련 옵션, TCP FLAGS, Protocol Selection으로 구분할 수 있다.

조금 더 구분을 하자면 아래와 같다.(아래의 자주쓰는 명령어는 지극히 개인적인 판단이니 단순 참고용)

Base

-c, --count: 지정한 패킷만 전송 후 종료

-i, --interval: 간격 정하기

 --fast      alias for -i u10000 (10 packets for second)

      --faster    alias for -i u1000 (100 packets for second)

      --flood    sent packets as fast as possible. Don't show replies.

-V, --verbose: 자세히 보기

IP Related

-a, --spoof: 출발지 ip 변조 (상당히 강력)

--rand-source: 출발지 ip를 랜덤값으로 바꿈(MAC 주소는 안바뀐다고 들었는데 확인 필요)

TCP/UDP Related

-p, --destport: 목적지 port

TCP Flags

-F --fin,  -S --syn, -R --rst, -A --ack

MODE

-1: icmp

-2: udp

-8: scan


활용방법
http://kkn1220.tistory.com/75 참고

위의 주소는 DoS공격에 hping3이 사용되는 것을 확인할 수 있다. 자세한 설명은 위의 주소에서 확인하면 된다.

아래는 대략적인 사용법이다.

1) SYN Flooding

- SYN flooding이란 SYN을 넘치게 하는 것을 뜻한다. 즉 클라이언트가 서버의 SYN Queue를 overflow시켜 서버를 오동작하거나 충돌시키는 공격이다.

#hping3 <target-ip> -a <fake-ip> -p <destination port> -S -i u10000

//-S는 TCP Flags 의 --syn이며, i u10000은 --fast 이다. 위의 명령어에서 확인 가능하다.


2) Land Attack

- 패킷을 전송할 때 출발지 IP주소와 목적지 IP주소 값을 타겟의 IP주소 값으로 똑같이 만들어서 타겟으로 보낸다.

- 시스템은 처음 시도된 SYN에 대한 reply 패킷을 출발지 IP 주소값을 참조하여 그 값을 목적지 IP주소 값으로 설정하여 패킷을 보낸다. 그러나 이 값은 자기 자신의 IP 주소값이기 때문에 네트워크 밖으로 나가지 않고 자기 자신에게 돌아오며 land 공격은 동시 사용자를 점유하는 것 동시에 CPU부하 또한 올리게 된다.

#hping3 <target-ip> -a <target-ip> -s 100 -p 100


3) Smurf Attack 

1. smurf공격은 공격자가 타겟의 IP로 스푸핑한 후, 타겟이 속해 있는 broadcast network로 broadcast 요청을 보낸다.

2. ICMP request를 수신한 컴퓨터들은 타겟에 reply 패킷을 보낸다.

3. 대량의 ICMP reply를 수신한 타겟은 과부하 상태가 된다.

#hping3 <broadcast network> -a <target-ip> --icmp --flood


4) PortScan

hping3은 타겟의 열린 포트를 확인할 수 있다.

hping –I <interface> --scan <port> -S <target-ip> 

'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering24]miranda  (0) 2016.03.29
[Information-Gathering23]masscan  (0) 2016.03.24
[Information-Gathering21]goofile  (0) 2016.03.18
[Information-Gathering20]golismero  (0) 2016.03.18
[Information-Gathering19]fragrouter  (0) 2016.03.07

[원문: http://tools.kali.org/information-gathering/goofile]


정의

Use this tool to search for a specific file type in a given domain.

 간략하게 (진짜 간략하다...)goofile은 주어진 도메인 내 특정 파일을 찾는 툴이다....


Usage

일전에 kali에서 제공하지 않는 tool은 포스팅 하지 않는다고 했다.

kali 2.0 이전 버전에서는 제공했는지 모르겠지만 2.0에는 지원을 하지 않는다.

그렇다. 해당 툴을 정말 좋아한다고 한다. 그 뒤의 말이 우습지만 굳이 한글로 번역하진 않겠다...

-install

#wget "https://goofile.googlecode.com/files/goofilev1.5.zip"  -> 경로변경됨

안된다.

https://code.google.com/archive/p/goofile/downloads 로 접속해서 1.5버전을 다운받자.

#unzip -p goofilev1.5.zip goofilev1.5/goofile.py > /usr/bin/goofile && chmod +x /usr/bin/goofile

#goofile

사용법이 정말 심플하다.

안된다

https://code.google.com/archive/p/goofile/issues/5

issue에 올라와있다.

google에서 반환하는 것을 막았다고 개인적으로 공감한다.

그래서 2.0에서는 지원을 하지 않는다고 생각한다.


결론: goofile이니 뭐니 그냥 구글을 이용하자.

'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering23]masscan  (0) 2016.03.24
[Information-Gathering22]hping3  (0) 2016.03.18
[Information-Gathering20]golismero  (0) 2016.03.18
[Information-Gathering19]fragrouter  (0) 2016.03.07
[Information-Gathering18]fierce  (0) 2016.03.07

[원문: http://tools.kali.org/information-gathering/golismero]


정의

GoLismero is an open source framework for security testing. It’s currently geared towards web security, but it can easily be expanded to other kinds of scans.


The most interesting features of the framework are:


Real platform independence. Tested on Windows, Linux, *BSD and OS X.

No native library dependencies. All of the framework has been written in pure Python.

Good performance when compared with other frameworks written in Python and other scripting languages.

Very easy to use.

Plugin development is extremely simple.

The framework also collects and unifies the results of well known tools: sqlmap, xsser, openvas, dnsrecon, theharvester

Integration with standards: CWE, CVE and OWASP.

Designed for cluster deployment in mind (not available yet).

 간략하게 golismero는 보안테스트를 위한 오픈소스 프레임워크이며 웹 사이트에 맞게 설계는 되어 있지만, 다른 종류의 스캔 방법에 대해 쉽게 확장할 수 있다.

제공하는 PDF를 보자. 이해가 훨씬 빠를 것이다.


- golismero는 파이썬 기반으로 되어 있다. 

- 리눅스, 윈도우, 맥 , BSD(Berkley Software Distribution) 등 다양한 OS에 적용 가능하다. 

- OpenVAS, nmap, SSLscan 등의 툴박스이다.

- 사용이 매우 쉽다.

- 위의 툴박스의 통합된 결과를 report형태로 볼 수 있다.


Usage


installing

- kali는 기본적으로 제공된다.

1)Debian/Ubuntu

$su

# apt-get install python2.7 python2.7-dev python-pip python-docutils git perl nmap sslscan

#cd /opt

#git clone https://github.com/golismero/golismero.git

#cd golismero

#pip install -r requirements.txt

#pip install -r requirements_unix.txt

#ln -s /opt/golismero/golismero.py /usr/bin/golismero

#exit

2)Mac OS

$sudo -s

#easy_install-2.7 -U distribute

#easy_install install pip

#port install nmap sslscan

#cd /opt

#git clone https://github.com/golismero/golismero.git

#cd golismero

#pip install -r requirements.txt

#pip install -r requirements_unix.txt

#ln -s /opt/golismero/golismero.py /usr/bin/golismero

#exit

3)window

cd %HOME%

git clone https://github.com/golismero/golismero.git

cd golismero

pip install -r requirements.txt


제공하는 pdf에는 간단한 사용법이 나와있다.

Quick scan을 해보자.

# golismero scan <target>

툴박스라더니 정말로 그렇다. 유심히 볼 것은 plugin이 disabled 된 것을 확인할 수 있다.

밑에 내용들은 추가를 안했지만 harvester, zone transfer 등을 수행한다.

plugin 목록을 확인해보자

#golismero plugins

엄청 많다...

Plugin list

-------------


-= Import plugins =-

csv_nikto:

    Import the results of a Nikto scan in CSV format.

csv_spiderfoot:

    Import the results of a SpiderFoot scan in CSV format.

xml_nmap:

    Import the results of an Nmap scan in XML format.

xml_openvas:

    Import the results of an OpenVAS scan in XML format.

xml_sslscan:

    Import the results of an SSLScan run in XML format.


-= Recon plugins =-

dns:

    DNS resolver plugin.

    Without it, GoLismero can't resolve domain names to IP addresses.

dns_malware:

    Detect if a domain has been potentially spoofed, hijacked.

exploitdb:

    Integration with Exploit-DB (http://www.exploit-db.com/)

    This plugin requires a working Internet connection to run.

fingerprint_web:

    Fingerprinter of web servers.

geoip:

    Geolocates IP addresses using online services.

    This plugin requires a working Internet connection to run.

punkspider:

    Integration with PunkSPIDER (http://punkspider.hyperiongray.com/)

    This plugin requires a working Internet connection to run.

robots:

    Analyzes robots.txt files and extracts their links.

shodan:

    Integration with Shodan: http://www.shodanhq.com/

    This plugin requires a working Internet connection to run.

spider:

    Web spider plugin.

    Without it, GoLismero can't crawl web sites.

spiderfoot:

    Integration with SpiderFoot: http://www.spiderfoot.net/

theharvester:

    Integration with theHarvester: https://github.com/MarioVilas/theHarvester/


-= Scan plugins =-

brute_directories:

    Tries to discover hidden folders by brute force:

    www.site.com/folder/ -> www.site.com/folder2 www.site.com/folder3 ...

brute_dns:

    Tries to find hidden subdomains by brute force.

brute_url_extensions:

    Tries to discover hidden files by brute force:

    www.site.com/index.php -> www.site.com/index.php.old

brute_url_permutations:

    Tries to discover hidden files by bruteforcing the extension:

    www.site.com/index.php -> www.site.com/index.php2

brute_url_predictables:

    Tries to discover hidden files at predictable locations.

    For example: (Apache) www.site.com/error_log

brute_url_prefixes:

    Tries to discover hidden files by bruteforcing prefixes:

    www.site.com/index.php -> www.site.com/~index.php

brute_url_suffixes:

    Tries to discover hidden files by bruteforcing suffixes:

    www.site.com/index.php -> www.site.com/index2.php

nikto:

    Integration with Nikto: https://www.cirt.net/nikto2

nmap:

    Integration with Nmap: http://nmap.org/

openvas:

    Integration with OpenVAS: http://www.openvas.org/

plecost:

    WordPress vulnerabilities analyzer, completely rewritten for GoLismero,

    based on the original idea of Plecost (https://code.google.com/p/plecost/)

    and their team: @ffranz and @ggdaniel

sslscan:

    Integration with SSLScan: http://sourceforge.net/projects/sslscan/

zone_transfer:

    Detects and exploits DNS zone transfer vulnerabilities.


-= Attack plugins =-

heartbleed:

    Test for the CVE-2014-0160 vulnerability (aka "heartbleed attack").

sqlmap:

    SQL Injection plugin, using SQLMap.

    Only retrieves the DB banner, does not exploit any vulnerabilities.

xsser:

    Integration with XSSer: http://xsser.sourceforge.net/


-= Report plugins =-

bson:

    BSON (Binary JSON) output for programmatic access.

csv:

    Writes reports in Comma Separated Values format.

html:

    Writes reports as offline web pages.

json:

    JSON output for programmatic access.

latex:

    Writes reports in LaTeX document format (.tex).

log:

    Extracts only the logs.

ltsv:

    Extracts only the logs, in labeled tab-separated values format.

msgpack:

    MessagePack output for programmatic access.

    See: http://msgpack.org/

odt:

    Writes reports in OpenOffice document format (.odt).

rst:

    Writes reports in reStructured Text format.

text:

    Writes plain text reports to a file or on screen.

xml:

    XML output for programmatic access.

yaml:

    YAML output for programmatic access.


-= UI plugins =-

console:

    Console user interface. This is the default.

disabled:

    Empty user interface. Used by some unit tests.

전에 shodan에 대해 소개를 했는데 shodan도 제공을 해준다.

(shodan 소개: http://kkn1220.tistory.com/68 참고)

#golismero info <plugins>

apikey가 없다.

vi /usr/share/golismero/golismero.conf에 추가해주면 된다.

[openvas]

host = localhost


[testing/scan/openvas]

user = admin

password = <your password>


[shodan:Configuration]

apikey = <your shodan key>


http://goo.gl/im2FLe for detailed instructions on setting up OpenVAS

http://www.shodanhq.com/account/register for a shodan API key


결과를 콘솔로만 보면 확인의 어려움이 있다. pdf에서 보면 알 수 있듯이 결과 report를 확인할 수 있다.

#golismero scan <target> -o <outputfile_name>

(https://github.com/golismero/golismero 발췌)

'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering22]hping3  (0) 2016.03.18
[Information-Gathering21]goofile  (0) 2016.03.18
[Information-Gathering19]fragrouter  (0) 2016.03.07
[Information-Gathering18]fierce  (0) 2016.03.07
[Information-Gathering17]exploitdb  (0) 2016.03.02

[원문: http://tools.kali.org/information-gathering/fragrouter]


정의

This program was written in the hopes that a more precise testing methodology might be applied to the area of network intrusion detection, which is still a black art at best.


Conceptually, fragrouter is just a one-way fragmenting router – IP packets get sent from the attacker to the fragrouter, which transforms them into a fragmented data stream to forward to the victim.

 간략하게 fragrouter는 네트워크 침입 탐지를 회피하는 툴킷이다. fragrouter는 "Insertion, Evasion, and Denial of Service"와 같은 대부분의 공격에 실행된다.


Usage

 usage는 심플하다. i로 인터페이스를 지정해주고 ATTACK단에 아래 -option을 주면 된다.

 단계적으로 target의 arp를 속이기 위해 arpspoof를 수행한다.

 dsniff나 ettercap 등으로 스니핑하면 패킷 중 원하는 정보를 도청할 수 있는데 그 이유는 arpspoof만 수행했을 경우 패킷이 빠져 나갈 곳이 없기 때문이다. 패킷이 모두 공격자로 오기 때문에 포워딩이 필요하다. 이 때 사용되는 것이 fragrouter이며 fragrouter를 통해 패킷을 밖으로 보낼 수 있다. 

 스니핑을 하거나 세션을 가로챘을 때 공격자에게 온 패킷을 정상적으로 전달해주려면 패킷 포워딩이 필요하다.

공격대상의 세션이 끊어지면 계속 사용할 수 없게 되므로 공격자 역시 스니핑을 할 수 없다.

 따라서 fragrouter는 스니핑한 세션을 마치 정상적인 것처럼 돌려주기 위해 필요하다.

ettercap: http://kkn1220.tistory.com/63 참고

dsniff: http://kkn1220.tistory.com/72 참고 

fragrouter 부분 또한 http://kkn1220.tistory.com/72 에서 dnsspoof 부분을 참고

실제 웹페이지 패스워드 도청: http://kkn1220.tistory.com/32 참고


'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering21]goofile  (0) 2016.03.18
[Information-Gathering20]golismero  (0) 2016.03.18
[Information-Gathering18]fierce  (0) 2016.03.07
[Information-Gathering17]exploitdb  (0) 2016.03.02
[Information-Gathering16]enum4linux  (0) 2016.02.29

[원문: http://tools.kali.org/information-gathering/fierce]


정의

First what Fierce is not. Fierce is not an IP scanner, it is not a DDoS tool, it is not designed to scan the whole Internet or perform any un-targeted attacks. It is meant specifically to locate likely targets both inside and outside a corporate network. Only those targets are listed (unless the -nopattern switch is used). No exploitation is performed (unless you do something intentionally malicious with the -connect switch). Fierce is a reconnaissance tool. Fierce is a PERL script that quickly scans domains (usually in just a few minutes, assuming no network lag) using several tactics.

 간략하게 fierce는 semi-lightweight한 스캐너로 DNS, whois, ARIN같은 것들을 이용하여 특정 도메인을 위한 비연속적 IP와 hostnames의 위치에 대해 취약점을 테스트하는 데 이용하는 도구이다.

또한, fierce는 주로 DNS를 이용하기 때문에 internal address space의 mis-configured networks를 찾는 데 사용된다.


Usage

syntax: #fierce -dns example.com

-delay    The number of seconds to wait between lookups.

-dns     The domain you would like scanned.

-dnsfile   Use DNS servers provided by a file (one per line) for reverse lookups (brute force).

-dnsserver Use a particular DNS server for reverse lookups 

-file A file you would like to output to be logged to.

-help This screen.

-range Scan an internal IP range (must be combined with -dnsserver).  

Usage: #fierce-range 111.222.333.0-255 -dnsserver ns1.example.co


-search  Search list.  When fierce attempts to traverse up and

down ipspace it may encounter other servers within other

domains that may belong to the same company.  If you supply a 

comma delimited list to fierce it will report anything found.

This is especially useful if the corporate servers are named

different from the public facing website.  

Usage: #fierce -dns examplecompany.com -search corpcompany,blahcompany 

Note that using search could also greatly expand the number of

hosts found, as it will continue to traverse once it locates

servers that you specified in your search list.  The more the

better.

-traverse Specify a number of IPs above and below whatever IP you

have found to look for nearby IPs.  Default is 5 above and 

below.  Traverse will not move into other C blocks.

-wordlist Use a seperate wordlist (one word per line).  

Usage: #fierce -dns examplecompany.com -wordlist dictionary.txt

fierce는 zone transfer를 수행하는데 아래는 수행이 되는 화면의 모습이다.

whoah가 인상적이다.

하지만 다른 사이트를 실행하면 알 수 있듯이 대부분의 사이트는 zone transfer가 수행되지 않는다.

zone transfer가 허용되지 않으면 무차별 대입으로 넘어가게 된다. 

output("Okay, trying the good old fashioned way... brute force"); 

$wordlist = $wordlist || 'hosts.txt'; 

if (-e $wordlist) { 

# user provided or default 

open (WORDLIST, '<', $wordlist) or 

open (WORDLIST, '<', 'hosts.txt') or 

quit_early("Can't open $wordlist or the default wordlist");

hosts.txt에는 2,280개의 host names이 들어가 있다. 

2013년 10월 이전까지는 kali의 버그로 인해 hosts.txt 위치를 찾을 수 없다고 출력되었는데 11월에 수정이 되었다.

vi편집기로 hosts.txt를 확인한 결과이다.

fierce는 2,280개의 common host names을 가지고 도메인 내의 특정 host names을 찾는다.

위의 구글 결과를 보면 알 수 있다.

아래는 hosts파일을 이용한 것이 아닌 개별로 작성한 wordlist의 결과화면이다.

wordlist에는 간략하게 mail, www, admin 정도만 넣었고 결과는 아래와 같다.


'해킹 > kali tools' 카테고리의 다른 글

[Information-Gathering20]golismero  (0) 2016.03.18
[Information-Gathering19]fragrouter  (0) 2016.03.07
[Information-Gathering17]exploitdb  (0) 2016.03.02
[Information-Gathering16]enum4linux  (0) 2016.02.29
[Information-Gathering15]DotDotPwn  (0) 2016.02.29

+ Recent posts