
감지된 Cobalt Strike Team Server 비컨을 JSON 객체로 수집하는 스캐너
Cobalt Strike 비콘을 사냥/채굴하고 나중에 인덱싱을 위해 비콘 구성을 "축소"하는 도구입니다. 사냥은 SecurityTrails, Shodan, ZoomEye와 같은 서비스를 사용하여 광범위하고 인터넷 전체를 대상으로 하거나 IP 목록을 사용할 수 있습니다.
📺 데모
요구 사항: virtualenv, python3.8+
git clone https://github.com/splunk/melting-cobalt && cd melting-cobalt 프로젝트를 클론하고 프로젝트 디렉토리로 이동합니다.pip install virtualenv && virtualenv -p python3 venv && source venv/bin/activate && pip install -r requirements.txt Virtualenv를 생성하고 요구 사항을 설치합니다.SecurityTrails, Shodan 또는 ZoomEye API 키에 대한 구성을 계속 진행하세요.
melting-cobalt.confmelting-cobalt.conf.example를 melting-cobalt.conf로 복사하세요!
사용 가능한 공급자 중 하나에 대한 토큰을 설정해야 합니다. 계정에 대한 토큰을 생성해야 하는 경우 [이](htt://need wiki page) 지침을 따르세요.
구성 예:
[global]
output = results.json
# stores matches in JSON here
log_path = melting-cobalt.log
# Sets the log_path for the logging file
log_level = INFO
# Sets the log level for the logging
# Possible values: INFO, ERROR, VERBOSE
nse_script = grab_beacon_config.nse
# path to the nse script that rips down cobalt configs. This is specifically using https://github.com/whickey-r7/grab_beacon_config
searches = search.yml
# contains the different searches to run on each internet scanning service provider (eg shodan, zoomeye, security trails) when hunting for team servers.
shodan_token = TOKENHERE
# shodan token for searching
zoomeye_token = TOKENHERE
# zoomeye token for searching
securitytrails_token = TOKENHERE
# security trails token for searching
서로 다른 공급자에서 수행되는 기본 마이닝을 수정하려면 search.yml을 사용자 정의하세요. 기본 melting-cobalt 검색 예제는 아래와 같습니다.
실행:
python melting-cobalt.py
ips.txt에 잠재적인 Cobalt Strike C2 IP를 줄바꿈으로 구분하여 채우세요. 예:
1.1.1.1
2.2.2.2
3.3.3.3
실행:
python melting-cobalt.py -i ips.txt
헌터들에게서 영감을 얻고 싶다면 다음을 적극 추천합니다:
usage: melting-cobalt.py [-h] [-c CONFIG] [-o OUTPUT] [-v] [-i INPUT]
scans for open cobalt strike team servers and grabs their beacon configs and write this as a json log to be analyzed by any analytic tools
like splunk, elastic, etc..
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
config file path
-o OUTPUT, --output OUTPUT
file to write to the results, defaults to results.json.log
-v, --version shows current melting-cobalt version
-i INPUT, --input INPUT
newline delimeted file of cobalt strike server ips to grab beacon configs from. example ips.txt
다음 검색은 기본 제공되며 더 많은 데이터를 위해 search.yml에 추가할 수 있습니다.
'ssl.jarm:07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1'
'ssl.jarm:07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1 port:"22, 80, 443, 444, 1234, 2000, 2222, 3000, 3780, 4000, 4443, 6379, 7443, 8443, 8080, 8081, 8082, 8087, 8088, 8099, 8089, 8090, 8181, 8888, 8889, 9443, 50050" HTTP/1.1 404 Not Found Content-Length: 0'
'product:"cobalt strike team server"'
note: 많은 노이즈 결과를 생성하므로, 라이선스 크레딧을 소진할 의도가 아니라면 실제로 예약하지 마세요.
'ssl.cert.serial:146473198'
'SELECT address, ports.port FROM ips WHERE jarm = "07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1"'
'SELECT address, ports.port, isp.name_normalized, ports.port, address, asn.number, jarm, http.headers.raw FROM ips WHERE jarm = "07d14d16d21d21d07c42d41d00041d24a458a375eef0c576d23a7bab9a9fb1" OR jarm = "07d14d16d21d21d07c07d14d07d21d9b2f5869a6985368a9dec764186a9175" OR jarm = "2ad2ad16d2ad2ad22c42d42d00042d58c7162162b6a603d3d90a2b76865b53" AND http.headers.content_type = "text/plain" AND http.headers.raw = "content-length:0" AND ports.port IN (22, 80, 443, 444, 1234, 2000, 2222, 3000, 3780, 4000, 4443, 6379, 7443, 8443, 8080, 8081, 8082, 8087, 8088, 8099, 8089, 8090, 8181, 8888, 8889, 9443, 50050)'
버그를 제출하거나 기능을 요청하려면 GitHub 이슈 트래커를 사용하세요.
질문이 있거나 지원이 필요하면 다음을 이용할 수 있습니다:
Copyright 2020 Splunk Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.