
도메인 이름 순열 엔진을 사용해 잠재적 타이포 스쿼팅 도메인 목록을 생성하여 AIL 및 기타 시스템에 공급합니다.
ail-typo-squatting은 잠재적인 타입 스쿼팅(typo squatting) 도메인 목록을 생성하기 위한 Python 라이브러리로, 도메인 이름 순열 엔진을 사용하여 AIL 및 기타 시스템에 데이터를 공급합니다.
이 도구는 독립 실행형 도구로 사용하거나 다른 시스템에 데이터를 공급하는 데 사용할 수 있습니다.
Python 라이브러리를 사용하지 않으려면, https://typosquatting-finder.circl.lu/가 이 라이브러리를 사용하는 온라인 서비스입니다.
ail-typo-squatting은 poetry로 설치할 수 있습니다. poetry가 설치되어 있지 않다면 curl -sSL https://install.python-poetry.org | python3 -를 실행하면 됩니다.
$ poetry install
$ poetry shell
$ cd ail-typo-squatting
$ python typo.py -h
$ pip3 install ail-typo-squatting
dacru@dacru:~/git/ail-typo-squatting/bin$ python3 typo.py --help
usage: typo.py [-h] [-v] [-dn DOMAINNAME [DOMAINNAME ...]] [-fdn FILEDOMAINNAME] [-o OUTPUT] [-fo FORMATOUTPUT] [-br] [-dnsr] [-dnsl] [-l LIMIT] [-var] [-ko] [-a] [-om] [-repe] [-repl] [-drepl] [-cho]
[-add] [-md] [-sd] [-vs] [-ada] [-hg] [-ahg] [-cm] [-hp] [-wt] [-wsld] [-at] [-sub] [-sp] [-cdd] [-addns] [-uddns] [-ns] [-combo] [-ca]
optional arguments:
-h, --help show this help message and exit
-v verbose, more display
-dn DOMAINNAME [DOMAINNAME ...], --domainName DOMAINNAME [DOMAINNAME ...]
list of domain name
-fdn FILEDOMAINNAME, --filedomainName FILEDOMAINNAME
file containing list of domain name
-o OUTPUT, --output OUTPUT
path to ouput location
-fo FORMATOUTPUT, --formatoutput FORMATOUTPUT
format for the output file, yara - regex - yaml - text. Default: text
-br, --betterregex Use retrie for faster regex
-dnsr, --dnsresolving
resolve all variation of domain name to see if it's up or not
-dnsl, --dnslimited resolve all variation of domain name but keep only up domain in final result json
-l LIMIT, --limit LIMIT
limit of variations for a domain name
-var, --givevariations
give the algo that generate variations
-ko, --keeporiginal Keep in the result list the original domain name
-a, --all Use all algo
-om, --omission Leave out a letter of the domain name
-repe, --repetition Character Repeat
-repl, --replacement Character replacement
-drepl, --doublereplacement
Double Character Replacement
-cho, --changeorder Change the order of letters in word
-add, --addition Add a character in the domain name
-md, --missingdot Delete a dot from the domain name
-sd, --stripdash Delete of a dash from the domain name
-vs, --vowelswap Swap vowels within the domain name
-ada, --adddash Add a dash between the first and last character in a string
-hg, --homoglyph One or more characters that look similar to another character but are different are called homogylphs
-ahg, --all_homoglyph
generate all possible homoglyph permutations. Ex: circl.lu, e1rc1.lu
-cm, --commonmisspelling
Change a word by is misspellings
-hp, --homophones Change word by an other who sound the same when spoken
-wt, --wrongtld Change the original top level domain to another
-wsld, --wrongsld Change the original second level domain to another
-at, --addtld Adding a tld before the original tld
-sub, --subdomain Insert a dot at varying positions to create subdomain
-sp, --singularpluralize
Create by making a singular domain plural and vice versa
-cdd, --changedotdash
Change dot to dash
-addns, --adddynamicdns
Add dynamic dns at the end of the domain
-uddns, --updatedynamicdns
Update dynamic dns warning list
-ns, --numeralswap Change a numbers to words and vice versa. Ex: circlone.lu, circl1.lu
-combo Combine multiple algo on a domain name
-ca, --catchall Combine with -dnsr. Generate a random string in front of the domain.
ail-project.org 및 circl.lu에 대해 모든 알고리즘을 사용하여 변형을 생성합니다.dacru@dacru:~/git/ail-typo-squatting/bin$ python3 typo.py -dn ail-project.org circl.lu -a -o .
dacru@dacru:~/git/ail-typo-squatting/bin$ python3 typo.py -fdn domain.txt -co -sub -hyp -o . -fo yara
ail-project.org 및 circl.lu에 대해 모든 알고리즘과 DNS 확인을 사용하여 변형을 생성합니다.dacru@dacru:~/git/ail-typo-squatting/bin$ python3 typo.py -dn ail-project.org circl.lu -a -dnsr -o .
ail-project.org에 대한 변형을 생성하고 해당 변형을 생성한 알고리즘을 표시합니다 (텍스트 형식 전용).dacru@dacru:~/git/ail-typo-squatting/bin$ python3 typo.py -dn ail-project.org -a -o - -var
from ail_typo_squatting import runAll
import math
resultList = list()
domainList = ["google.com"]
formatoutput = "yara"
pathOutput = "."
for domain in domainList:
resultList = runAll(
domain=domain,
limit=math.inf,
formatoutput=formatoutput,
pathOutput=pathOutput,
verbose=False,
givevariations=False,
keeporiginal=False
)
print(resultList)
resultList = list()
from ail_typo_squatting import formatOutput, omission, subdomain, addDash
import math
resultList = list()
domainList = ["google.com"]
limit = math.inf
formatoutput = "yara"
pathOutput = "."
for domain in domainList:
resultList = omission(domain=domain, resultList=resultList, verbose=False, limit=limit, givevariations=False, keeporiginal=False)
resultList = subdomain(domain=domain, resultList=resultList, verbose=False, limit=limit, givevariations=False, keeporiginal=False)
resultList = addDash(domain=domain, resultList=resultList, verbose=False, limit=limit, givevariations=False, keeporiginal=False)
print(resultList)
formatOutput(format=formatoutput, resultList=resultList, domain=domain, pathOutput=pathOutput, givevariations=False)
resultList = list()
출력 파일에는 4가지 형식이 가능합니다:
텍스트 파일의 경우 각 줄은 하나의 변형입니다.
ail-project.org
il-project.org
al-project.org
ai-project.org
ailproject.org
ail-roject.org
ail-poject.org
ail-prject.org
ail-proect.org
ail-projct.org
ail-projet.org
ail-projec.org
aail-project.org
aiil-project.org
...
Yara 파일의 경우 각 규칙은 하나의 변형입니다.
rule ail-project_org {
meta:
domain = "ail-project.org"
strings:
$s0 = "ail-project.org"
$s1 = "il-project.org"
$s2 = "al-project.org"
$s3 = "ai-project.org"
$s4 = "ailproject.org"
$s5 = "ail-roject.org"
$s6 = "ail-poject.org"
$s7 = "ail-prject.org"
$s8 = "ail-proect.org"
$s9 = "ail-projct.org"
$s10 = "ail-projet.org"
$s11 = "ail-projec.org"
condition:
any of ($s*)
}
Regex 파일의 경우 각 변형은 정규식으로 변환되고 다른 변형들과 연결되어 하나의 큰 정규식으로 결합됩니다.
ail\-project\.org|il\-project\.org|al\-project\.org|ai\-project\.org|ailproject\.org|ail\-roject\.org|ail\-poject\.org|ail\-prject\.org|ail\-proect\.org|ail\-projct\.org|ail\-projet\.org|ail\-projec\.org
Sigma 파일의 경우 각 변형은 variations 키 아래에 나열됩니다.
title: ail-project.org
variations:
- ail-project.org
- il-project.org
- al-project.org
- ai-project.org
- ailproject.org
- ail-roject.org
- ail-poject.org
- ail-prject.org
- ail-proect.org
- ail-projct.org
- ail-projet.org
- ail-projec.org
DNS 확인이 선택된 경우 JSON 형식의 추가 파일이 생성됩니다.
각 키는 변형이며, 도메인 이름이 확인(resolve)된 경우 "ip" 필드를 가질 수 있습니다. "NotExist" 필드는 도메인이 존재하는지 여부를 판단하는 Boolean 값과 함께 항상 포함됩니다.
{
"circl.lu": {
"NotExist": false,
"ip": [
"185.194.93.14"
]
},
"ircl.lu": {
"NotExist": true
},
"crcl.lu": {
"NotExist": true
},
"cicl.lu": {
"NotExist": true
},
"cirl.lu": {
"NotExist": true
},
"circ.lu": {
"NotExist": true
},
"ccircl.lu": {
"NotExist": true
},
"ciircl.lu": {
"NotExist": true
},
...
}

이 프로젝트는 CEF-TC-2020-2 - 2020-EU-IA-0260 - JTAN - Joint Threat Analysis Network의 공동 자금 지원을 받았습니다.
| 알고리즘 | 설명 |
|---|
| AddDash | 이러한 오타는 문자열의 첫 번째와 마지막 문자 사이에 대시(dash)를 추가하여 생성됩니다. |
| Addition | 이러한 오타는 도메인 이름에 문자를 추가하여 생성됩니다. |
| AddDynamicDns | 이러한 오타는 원래 도메인 끝에 동적 DNS(Dynamic DNS)를 추가하여 생성됩니다. |
| AddTld | 이러한 오타는 올바른 TLD 앞에 TLD를 추가하여 생성됩니다. 예: google.com은 google.com.it이 됩니다. |
| ChangeDotDash | 이러한 오타는 점(dot)을 대시(dash)로 변경하여 생성됩니다. |
| ChangeOrder | 이러한 오타는 도메인의 각 부분에서 문자의 순서를 변경하여 생성됩니다. |
| Combo | 이러한 오타는 여러 알고리즘을 결합하여 생성됩니다. 예: circl.lu는 cirl6.lu가 됩니다. |
| CommonMisspelling | 이러한 오타는 단어를 철자 오류(misspelling)로 변경하여 생성됩니다. Wikipedia에서 가져온 8000개 이상의 흔한 철자 오류를 사용합니다. 예: www.youtube.com은 www.youtub.com이 되고, www.abseil.com은 www.absail.com이 됩니다. |
| Double Replacement | 이러한 오타는 도메인 이름에서 동일하고 연속된 문자를 교체하여 생성됩니다. |
| Homoglyph | 이러한 오타는 비슷해 보이지만 서로 다른 문자로 문자를 교체하여 생성됩니다. 예를 들어 소문자 l은 숫자 1과 비슷해 보입니다 (l vs 1). 예: google.com은 goog1e.com이 됩니다. |
| Homophones | 이러한 오타는 발음이 같은 다른 단어로 단어를 변경하여 생성됩니다. 발음이 같은 450개 이상의 단어 세트를 사용합니다. 예: www.base.com은 www.bass.com이 됩니다. |
| MissingDot | 이러한 오타는 도메인 이름에서 점(dot)을 삭제하여 생성됩니다. |
| NumeralSwap | 이러한 오타는 숫자를 단어로, 단어를 숫자로 변경하여 생성됩니다. 예: circlone.lu는 circl1.lu가 됩니다. |
| Omission | 이러한 오타는 도메인 이름에서 한 번에 한 글자씩 생략하여 생성됩니다. |
| Repetition | 이러한 오타는 도메인 이름의 문자를 반복하여 생성됩니다. |
| Replacement | 이러한 오타는 도메인 이름의 각 문자를 교체하여 생성됩니다. |
| StripDash | 이러한 오타는 도메인 이름에서 대시(dash)를 삭제하여 생성됩니다. |
| SingularPluralize | 이러한 오타는 단수 도메인을 복수로, 복수 도메인을 단수로 만들어 생성됩니다. |
| Subdomain | 이러한 오타는 서브도메인을 만들기 위해 도메인 이름에 점을 찍어 생성됩니다. 예: google.com은 goo.gle.com이 됩니다. |
| VowelSwap | 이러한 오타는 첫 글자를 제외한 도메인 이름 내의 모음을 서로 바꾸어 생성됩니다. 예: www.google.com은 www.gaagle.com이 됩니다. |
| WrongTld | 이러한 오타는 원래 최상위 도메인(TLD)을 다른 TLD로 변경하여 생성됩니다. 예: www.trademe.co.nz는 www.trademe.co.mz가 되고, www.google.com은 www.google.org가 됩니다. 가장 흔한 19개의 최상위 도메인을 사용합니다. |
| WrongSld | 이러한 오타는 원래 2차 도메인(SLD)을 다른 SLD로 변경하여 생성됩니다. 예: www.trademe.co.uk는 www.trademe.ac.uk가 되고, www.google.com은 여전히 www.google.com입니다. |