UDP port scanner is missing SNMP ports
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- networking, security
Hướng nghiên cứu
Bắt đầu trong build.rs và kiểm tra việc giải mã payload được probe SNMP đi kèm sử dụng, sau đó chạy các lệnh snmpget và RustScan được cung cấp đối với demo.pysnmp.com. Xác minh rằng văn bản literal, các chuỗi escape và các chuỗi được đặt trong dấu ngoặc kép liền kề được giải mã như mô tả, đồng thời cổng UDP 161 được phát hiện cùng với dịch vụ SNMP công khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Rustscan cannot find an open SNMP port, while it can be found using NMAP and snmpget.
To Reproduce
-
Confirm that the public SNMP test service responds using SNMPv1 and community
public:snmpget -v1 -c public -t 3 -r 1 \ demo.pysnmp.com 1.3.6.1.2.1.1.1.0Observed:
SNMPv2-MIB::sysDescr.0 = STRING: #SNMP Agent on .NET Standard -
Scan UDP port 161 using Nmap:
sudo nmap -sU -Pn -n -p 161 --reason \ --max-retries 1 --host-timeout 20s demo.pysnmp.comObserved with Nmap 7.95:
PORT STATE SERVICE REASON 161/udp open snmp udp-response ttl 63 -
Scan the same port using an affected RustScan build:
rustscan --no-config --udp -a demo.pysnmp.com -p 161 \ --timeout 3000 --tries 2 --scripts none --accessibleObserved with the affected RustScan 2.4.1 lab build:
Looks like I didn't find any open ports for 128.203.82.143.
Expected behavior
RustScan should generate a valid SNMP payload containing the community string public and detect UDP port 161 when the agent responds.
More generally, payload decoding should preserve literal text, decode escape sequences, and concatenate quoted strings without adding separator whitespace.
Screenshots
Not applicable;
Desktop (please complete the following information):
- OS: Linux/aarch64 for the containerized comparison; macOS/Apple Silicon for an additional host check.
- Browser: Not applicable.
- Version: RustScan 2.4.1 in downstream lab builds; installed host RustScan 2.3.0 also missed the port.
- Nmap: 7.95 for the comparison.
Smartphone (please complete the following information):
- Device: Not applicable.
- OS: Not applicable.
- Browser: Not applicable.
- Version: Not applicable.
Additional context
According to our friend 🤖
The missing detection appears to be caused by a malformed SNMP payload. The server does not respond to that payload, so RustScan reports no open ports.
The parser in build.rs keeps only ASCII hexadecimal digits:
if char == '\' && payload.chars().nth(idx + 1) == Some('x') {
continue;
} else if char.is_ascii_hexdigit() {
tmp_str.push(char);
// Converts each pair of retained hex digits into a byte.
}
However, the bundled SNMP probe contains the literal community string public. The parser retains only b and c, converting the six-character string into the single byte 0xbc.
This produces a 28-byte probe instead of the expected 33 bytes, while its BER header still declares 31 bytes after the two-byte header.
A local build with corrected payload decoding detected port 161 on the same server. The faulty parser is also present in upstream master at the time of reporting.
Other probes containing literal text, including NetBIOS, LDAP, SSDP, memcached, and service location, may be affected as well.
- Ngôn ngữ chính
- Rust
- Star
- 20.6k
- Fork
- 1.4k
- Merge trung bình
- 3 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bee-san/RustScan
-
X86 64 Windows - virus detectedĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
bee-san/RustScan#937 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Question: Proxies not supported?Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
bee-san/RustScan#825 · 7 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
bee-san/RustScan#822 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
bee-san/RustScan#795 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Support for port range input like `1-22,661-669,8888` for both CLI and library usageCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
bee-san/RustScan#780 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của bee-san/RustScan
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
bherbruck/solvecraft#2167 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bitcoindevkit/bdk-cli#357 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Wavvon/Wavvon-clients#136 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GUI:纯报告任务验收后误显示“已合并”Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
vorton-lang/Lobotomy#95 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
AimesSoft/NipaPlay-Reload#1022 ·
Maintainer thường phản hồi trong vòng 1 ngày