
Dahua 카메라 P2P 보안 스캐너

CGI, SDKType 0/1 장치 지원Go 사용:
go install github.com/thebadinteger/p2pwn@main
소스에서 빌드:
git clone https://github.com/thebadinteger/p2pwn.git
cd p2pwn
go build
또는 **Releases page**에서 최신 바이너리를 다운로드하세요.
./p2pwn -i [input] -o [output] -t [threads] (-c [config]) (--nuke) (--debug)
[-i, --input] Input file or specific target(s)
Format:
XXXXXXXXXX > Prefix
XXXXXXXXXXYYYYY > S/N
others > csv,xml,dhscp,folders
[-o, --output] Output folder for results
Default > DD-MM-YYYY_HH-MM-SS
If doesn't exist, will be created
[-t, --threads] Number of threads for scanning
Default > 100
[-c, --config] Path to config file
Default > config.toml
[-n, --nuke] Use destructive options
[-d, --debug] Log everything
[-?, -h, --help] Get general help
입력 형식:
S/N 또는 접두사
XXXXXXXXXX
XXXXXXXXXXYYYYY
XXXXXXXXXX,XXXXXXXXXXYYYYY
또는 csv,xml,dhscp,folders
출력 형식:
pwned.csv:
sn,model,login,password,channels,ip,vuln
import_*.xml:
(파일당 최대 64개 장치)
<?xml version="1.0" encoding="UTF-8"?>
<DeviceManager version="2.0">
<Device name="{serial}" domain="{serial}" port="37777" username="{login}" password="{encryptedpass}" protocol="1" connect="19" />
</DeviceManager>
snapshots/:
특수 비밀번호 문자는 파일 이름에 표시되지 않습니다
{serial}_{login}_{password}_{model}_{channel(s)}.jpg
config.toml구성에서 스캐닝 및 펜테스팅을 설정하고 검사 방법을 활성화하거나 비활성화할 수 있습니다.
기본 구성:
[scan] # Scan configuration
timeout = 5000 # Connection timeout in milliseconds
retries = 3 # Number of retries on connect
generate = 1048576 # How many S/N to generate on prefix (1-1048576)
nurses = 200 # Number of workers for checking online S/N
governor = true # Enable/disable governor
maxrps = 3000 # Cap on concurrent online/offline checks
[pwn] # Usage of different protocols and methods
protocol.cgi = true # Web CGI protocol
protocol.sdk = true # 37777 SDK protocol
protocol.type1 = true # Type 1 protocol
methods.brute = true # Credentials bruteforce
methods.cve-2021-33044 = true # CVE-2021-33044
methods.cve-2021-33045 = true # CVE-2021-33045
methods.uau = true # Unauthenticated addUser
[image]
snapshot = true # Take snapshots
all = false # Take snapshots from all channels
cgi = true # Take snapshots with CGI
sdk = true # Take snapshots with SDK
rtsp = true # Take snapshots with RTSP
[brute] # Bruteforce configuration
type1.delay = 20 # Type 1 brute attempts delay in seconds
credentials = [
{ login = "admin", password = "admin" },
{ login = "admin", password = "admin123" },
{ login = "admin", password = "admin12345" },
{ login = "666666", password = "666666" },
{ login = "888888", password = "888888" },
] # Credentials list or '/path/to/wordlist' > login:password
[dummy] # Credentials for added dummy account
login = "p2pwn" # 5-32 alphanumeric characters
password = "p2password" # 8-32 alphanumeric characters
memo = "p2pwn" # Account note up to 32 characters
[overlay] # Custom overlay configuration
osd = false # Set OSD on pwned devices
channel = "p2pwn" # ChannelTitle (max 32 char)
custom = [
"p2pwned",
"device is vulnerable"
] # CustomTitle (up to 5 lines, max 22 char per line)
color.front = [255, 255, 255, 255] # OSD front color R G B A (0-255)
color.back = [0, 0, 0, 128] # OSD back color R G B A (0-255)
[nuke] # Experimental destructive options
delete = false # Delete all accounts except admin and dummy
video = 50 # Set all video settings to specified number (0-100)
box = false # Add box masks
coordinates.box = [
[3383, 2047, 4649, 6245],
[2620, 6145, 5362, 7411]
] # Box masks x1 y1 x2 y2 (up to 5 boxes)
disable = false # Disable P2P on the device when done
팁:
nurses - 값이 높을수록 S/N 검사(온라인/오프라인)가 빨라지지만 패킷이 더 많아짐maxrps - 동시 온라인/오프라인 검사 상한 (값이 높을수록 빠름)snapshot - 스냅샷을 촬영함 (비활성화하면 스캔 속도가 빨라질 수 있음)all - 첫 번째 채널만이 아니라 모든 채널에서 스냅샷을 촬영함protocol.cgi - CVE 검사 및 브루트포스 가능protocol.sdk - 브루트포스만 가능 (NVR을 스캔하지 않는 경우 비활성화하면 스캔 속도가 빨라짐)protocol.type1 - 브루트포스만 가능 (Type 1 기기를 스캔하지 않는 경우 비활성화하면 스캔 속도가 빨라짐)methods.cve-2021-33044 - 관리자 자격 증명을 추출하고 더미 계정을 추가함 (폴백)methods.cve-2021-33045 - 관리자 자격 증명을 추출하고 더미 계정을 추가함 (폴백)methods.uau - 더미 계정을 추가함type1.delay - Type 1 브루트포스 시도 지연 시간(초) (변경 비권장)channel - OSD 오버레이용 사용자 지정 채널 제목 (변경하지 않으려면 비워 둠)custom - 사용자 지정 OSD 오버레이 텍스트 (변경하지 않으려면 비워 둠)[nuke] - 실험적 파괴적 옵션, 사용 금지 (--nuke 플래그를 지정한 경우에만 작동)제작: badinteger [GPL v3.0 License]
특별 감사: THANKS.md
이 소프트웨어는 교육 및 승인된 테스트 목적으로만 사용해야 합니다.
작성자는 사용자의 행위 또는 소프트웨어로 인해 발생하는 오용 및 손해에 대해 책임지지 않습니다.