Python을 사용하여 가짜 암호로 사기꾼 범람
10169 단어 securitycybersecuritypython
문자 메시지를 통한 피싱 시도
오늘 저는 피싱 시도가 분명한 다음과 같은 문자 메시지를 받았습니다.

궁금해서 사이트에 들어가서 확인했습니다. 실제 사이트를 재현하려는 평범한 시도였습니다.

네트워크 활동을 캡처하기 위해 브라우저의 개발 도구를 열었습니다. 그런 다음 일부 구성 자격 증명을 제출했습니다. 당연히 작동하지 않았습니다.

개발 도구에서 헤더 탭을 확인하여 요청이 실제로
https://toys-store.site/citi.php
로 가는지 확인했습니다.
페이로드에서 내 자격 증명을 볼 수도 있습니다.

이 정보를 사용하여 가짜 자격 증명으로 사기꾼을 범람시키는 Python 스크립트를 만들 수 있습니다. 이렇게 하면 사용자가 직접 사용할 때 어떤 자격 증명이 유효한지 알 수 없습니다.
파이썬 스크립트 만들기
내 계획은 사기꾼 사이트에 POST 요청을 지속적으로 보내는 루프를 만드는 것이었습니다. 한 번에 보낼 수 있는
POST
요청의 속도를 높이고 싶었습니다. 나는 그것을 도울 수 있는 multiprocessing 패키지를 발견했습니다. 또한 자격 증명을 동적으로 생성하기 위해 Faker을 사용할 계획이었습니다.다음 코드를 생각해 냈습니다.
from multiprocessing import Process
from faker import Faker
import requests
fake = Faker()
url = "https://toys-store.site/citi.php"
# use the same request headers shown in the browser dev tools under the 'Network' tab
headers = {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Content-Length": "69",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Host": "toys-store.site",
"Origin": "https://mobilecitiauthorization.dns2.us",
"Pragma": "no-cache",
"Referer": "https://mobilecitiauthorization.dns2.us/",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "cross-site",
"Sec-GPC": "1",
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
}
# infinite loop to send requests
def send_post_request():
while True:
# dynamically generate request payload using Faker
payload = {
"usr": fake.simple_profile()["username"],
"pwd": fake.password(),
"login": "",
"apitoken": "o7y4jat0p65kd4h",
}
# send post request with payload and headers
response = requests.post(url, data=payload, headers=headers)
# extract time from response headers to make it easier to see when requests are sent in the CLI
time = response.headers["Date"].split(" ")[4]
print(f"{time} -- Request sent. Status Code: {response.status_code}.")
# starts 25 different processes running this code
if __name__ == " __main__":
for _ in range(25):
Process(target=send_post_request).start()
fake.simple_profile()
사전에서 payload
에 대한 빠른 메모: 이 줄은 사용자 정보가 포함된 사전을 생성합니다. 이 경우 사용자 이름 부분만 사용하고 있습니다.{'username': 'ywarren', 'name': 'Patricia Lyons', 'sex': 'F', 'address': '2910 Smith Islands Suite 134\nRogerschester, SC 47471', 'mail': '[email protected]', 'birthdate': datetime.date(1984, 4, 20)}
스크립트를 실행하고 잠시 실행 상태로 두었습니다. 출력되는 시간은 응답 헤더에서 추출됩니다. 이렇게 하면 CLI에서 전송되는 요청을 쉽게 볼 수 있습니다.

스크린샷으로 구분하기 쉽지 않지만
multiprocessing
패키지를 사용하면 게시 요청을 보내는 프로세스를 빠르게 할 수 있습니다. 터미널이 꽤 빨리 채워졌습니다.이로 인해 사기꾼들의 삶을 더 어렵게 만들었기를 바랍니다. 또한 향후 브라우저에서 표시될 수 있도록 사용 중인 도메인을 보고했습니다.
Reference
이 문제에 관하여(Python을 사용하여 가짜 암호로 사기꾼 범람), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/nelsonfigueroa/using-python-to-flood-scammers-with-fake-passwords-2lif텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)