
BloodHound "Legacy"의 사용자 정의 쿼리를 BloodHound "Community"로 가져오는 도구
BloodHound "Legacy"(https://github.com/BloodHoundAD/BloodHound)에서 사용하던 customqueries를 BloodHound "Community"(https://github.com/SpecterOps/BloodHound)로 가져오기 위한 도구입니다.
참고: Linux/Kali에서 BloodHound Legacy의 customqueries.json 파일은 ~/.config/bloodhound/customqueries.json에 있습니다.
example.env 파일을 .env로 복사하고 필요한 환경 변수를 입력합니다.pip3 install -r requirements.txt
이 스크립트는 다음 환경 변수를 사용하며, .env 파일(example.env 참고)에 설정해야 합니다:
BHE_DOMAIN: BHE API의 도메인.BHE_PORT: BHE API의 포트.BHE_SCHEME: BHE API의 스킴 (http 또는 https).BHE_TOKEN_KEY: BHE API의 토큰 키.BHE_TOKEN_SECRET: BHE API의 토큰 시크릿.자세한 내용: BloodHound API
python bh-toolset.py [-h] [-i [FILE]] [--new [NEW_FILE]] [--delete]
-h: 도움말 메시지를 표시하고 종료합니다.-i: 레거시 형식의 customqueries.json 파일을 가져옵니다. (기본값: customqueries.json).--new: 새 버전 형식으로 이미 변환된 customqueries를 가져옵니다. (기본값: new_customqueries.json).--delete: 저장된 모든 쿼리를 삭제합니다.# 도움말 표시
python3 bh-toolset.py -h
# bloodhound legacy에서 customqueries를 변환하여 가져오기
python3 bh-toolset.py -i
# 이미 변환된 customqueries도 함께 가져오기
python3 bh-toolset.py -i --new
# 특정 파일 이름 지정
python3 bh-toolset.py -i my_customqueries.json --new my_new_customqueries.json
# 저장된 모든 쿼리 삭제
python3 bh-toolset.py --delete
BloodHound Community에서는 owned, highvalue와 같은 일부 속성이 변경되었습니다. (현재로서는) 수동으로 수정해야 합니다. 예:
MATCH (m:User) WHERE m.owned=TRUE RETURN m → MATCH (m:User) WHERE m.system_tags =~ '.*owned*.' RETURN mnew_customqueries.json에서 확인하세요.