SShortSingh.
Back to feed

Why scope checks should parse targets into networks instead of comparing strings

0
·3 views

On authorized penetration tests, signed scopes are typically short lists of CIDR blocks, while the targets testers type are often informal, such as copied dash ranges, wildcards, or stale hostnames. String comparisons or notes in a report can let these out-of-scope inputs slip through. The author proposes a standard-library Python check that stores scope only as CIDRs, defaults to private address space, and parses every target into a network before comparing it. Ambiguous or unparseable inputs are denied, and the check runs at every action so hosts added mid-engagement cannot bypass it. The approach does not determine what a client actually authorized, and hostname and IPv6 range handling remain open questions.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Police Shut Down LabHost, a Phishing Service Sold on Monthly Subscriptions

Police shut down LabHost in April 2024, a phishing platform that rented out fake bank and delivery company websites for an average of $249 a month. Subscribers could choose from more than 170 fraudulent sites, and a built-in tool captured two-factor authentication codes in real time. The service reportedly had about 10,000 users and at least 40,000 phishing domains. Because the fake sites were designed to look convincing, a polished message impersonating a bank is not proof it is genuine. Experts advise avoiding links in unexpected texts and instead opening the official app or calling the number on the back of a card.

0
ProgrammingDEV Community ·

Spring Boot JSON Logging: Making ELK Logs Filterable by Field

A payment callback fails intermittently, and ops cannot locate the order in Kibana, forcing a manual search through hundreds of thousands of plain-text lines. The core issue is that plain-text log lines carry no discrete fields, so the search engine cannot isolate values such as an order ID. The article explains that MDC values only become true fields when logs are emitted as JSON, not when they are merely spliced into a text pattern. It argues that Logstash grok parsing is brittle and CPU-costly, and that hand-built JSON breaks on quotes, newlines, and stack traces. Spring Boot's built-in structured logging offers three JSON formats, ECS, GELF, and Logstash, requiring no third-party dependencies.

0
ProgrammingDEV Community ·

Google Disrupts IPIDEA Proxy Network Using Hijacked Home Internet Connections

Some apps pay users to share their home internet bandwidth, and some free apps do so without clear consent. Such setups turn a home connection into an exit point for other people's traffic, including that of criminals. In January 2026, Google disrupted a network called IPIDEA, which it said was used by more than 550 threat groups in a single week. Google reported that its action removed millions of devices from the network. Because the traffic originates from genuine residential connections, blocking VPNs does not prevent the activity, and the source is hard to detect.

0
ProgrammingDEV Community ·

Poisoned agent-framework PyPI releases stole credentials via Python startup hooks

Two malicious versions of Microsoft's agent-framework package, 1.26.1 and 1.26.2, were published to PyPI on November 17, 2026, and quarantined within about an hour. The malware used .pth files in site-packages, which run whenever the Python interpreter starts, so it executed even without importing the package. It harvested environment variables, credential files, and freshly minted cloud and CI identity tokens, then sent them to an external webhook. Investigators believe the attacker obtained a valid publishing credential for Microsoft's release pipeline, though the wheel was repacked locally before upload. Users who installed either version should check their installed version, pin to 1.26.0, and rotate all credentials visible to affected environments.