79
submitted 1 week ago* (last edited 6 days ago) by umutcamliyurt@lemmy.world to c/cybersecurity@sh.itjust.works

Source code and details: https://github.com/umutcamliyurt/PortTripper

How it works

On startup PortTripper:

  1. Scans the configured port range and builds a whitelist of ports already in use by real services (first run only).
  2. Draws a cryptographically random sample of up to -maxports ports from the range, excluding whitelisted ports. Using crypto/rand for selection means the open set is unpredictable to an attacker even if they know the configured range.
  3. Binds TCP and UDP listeners on every chosen port.
  4. On TCP: accepts connections, holds them open for a configurable duration, then drops them, wasting the scanner's threads and file descriptors.
  5. On UDP: reads and discards datagrams without replying, so ports appear open|filtered to scanners rather than closed.

All real service ports are untouched because they are already bound before PortTripper starts, and the auto-generated whitelist tells PortTripper to skip them.

you are viewing a single comment's thread
view the rest of the comments
[-] ryannathans@aussie.zone 1 points 6 days ago
[-] Cyber@feddit.uk 1 points 6 days ago* (last edited 6 days ago)

It is.

I think my wording wasn't the best... I was implying that I preferred a compiled application over something interpreted to address the points.

[-] atzanteol@sh.itjust.works 1 points 6 days ago

There's nothing wrong with interpreted languages. And go is in fact compiled so...

[-] Cyber@feddit.uk 1 points 6 days ago

I agree with both of your statements.

For security applications, I prefer a compiled application as it's more difficult to alter in situ.

this post was submitted on 30 May 2026
79 points (100.0% liked)

Cybersecurity

10055 readers
41 users here now

c/cybersecurity is a community centered on the cybersecurity and information security profession. You can come here to discuss news, post something interesting, or just chat with others.

THE RULES

Instance Rules

Community Rules

If you ask someone to hack your "friends" socials you're just going to get banned so don't do that.

Learn about hacking

Hack the Box

Try Hack Me

Pico Capture the flag

Other security-related communities !databreaches@lemmy.zip !netsec@lemmy.world !securitynews@infosec.pub !cybersecurity@infosec.pub !pulse_of_truth@infosec.pub

Notable mention to !cybersecuritymemes@lemmy.world

founded 3 years ago
MODERATORS