I’ve read an article which describes how to simulate the close ports as open in Linux by eBPF. That is, an outside port scanner, malicious actor, will get tricked to observe that some ports, or all of them, are open, whereas in reality they’ll be closed.

How could this be useful for the owner of a server? Wouldn’t it be better to pretend otherwise: open port -> closed?

16 points

pseudo honeypot ip blocker. you could auto drop traffic from people sniffin where/when they should not be

permalink
report
reply
6 points

Would it even need to pretend it is open? If it can fake a port being open then it can tell when a close port is being pinged. So can outright block connections from those IPs without ever pretending it is open?

permalink
report
parent
reply
2 points

sure, if you want to be that black and white about it… but with this you maybe could glean more information about the attempt and have more granular logic.

permalink
report
parent
reply
1 point
*

What extra information could you gather? Note I assume we are talking about a fake open port here, not an active service listening on a port that can communicate with the attacker. That could be done without eBPF though - so what advantage would eBPF have here?

And I assume this is more on the level of responding to pings than creating full connections? At which point you are only dealing with a single packet from the sender. So what value does responding give you here?

permalink
report
parent
reply
4 points

Presumably, OP doesn’t know the concept of a honeypot, so: https://en.wikipedia.org/wiki/Honeypot_(computing)

Basically, it’s a decoy system, which an attacker will likely target.

permalink
report
parent
reply
2 points

You can’t pretend an open port is closed, because an open port is really just a service that’s listening. You can’t pretend-close it and still have that service work. The only thing you can do is firewalling off the entire service, but presumably, any competent distro will firewall off all services by default and any service listening publicly is doing so for a good reason.

I guess it comes down to whether they feel like it’s worth obfuscating port scan data. If you deploy that across all of your network then you make things just a little bit more annoying for attackers. It’s a tiny bit of obfuscation that doesn’t really matter, but I guess plenty of security teams need every win they can get, as management is always demanding that you do more even after you’ve done everything that’s actually useful.

permalink
report
reply
1 point
*

You can’t pretend-close it and still have that service work.

indeed, a service on a port would no longer properly work. However, pretending that an open port is closed is possible the same way when pretending that’s open

permalink
report
parent
reply
1 point

Maybe what you’re referring to is along the lines of a port being open but the software on the other side of it not sending acknowledging responses?

permalink
report
parent
reply
2 points

Can you please kindly link to that article, if it’s publicly available?

permalink
report
reply
-6 points

No!

permalink
report
parent
reply
1 point

Alternatively, just open all the ports?

permalink
report
parent
reply
1 point

My ports are always open for you, my son. And doors, and windows.

permalink
report
parent
reply
1 point

Possibly to confuse os detection. Not sure if it would be sufficient though.

permalink
report
reply
1 point

Or slow down a complete scan, it would take a long time to scan all likely ports on a machine stealthily, and be quite obvious if that machine is set up as a honeypot.

permalink
report
parent
reply
0 points

Maybe a port that is actually open doesn’t look as interesting

permalink
report
reply
1 point

how so?

permalink
report
parent
reply
4 points

From an attacker perspective you would do a quick scan to find open ports, then focus on those ports with more expensive/slower scans to find out what is running on those ports. If everything reports open then what ports do you focus on first? So not so much that actually open ports are less interesting, but that actually open ports are harder to find among all the ports.

permalink
report
parent
reply
-1 points
*

Do you youself understand what you’re talking about?

then focus on those ports with more expensive/slower scans to find out what is running on those ports.

What do you mean by “focus on those ports”? What are “more expensive/slower scans”?

If everything reports open

not every port gets reported to be open but only some of them

what ports do you focus on first?

me? or an attacker? he could work with any ports he wishes

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.8K

    Monthly active users

  • 800

    Posts

  • 6.5K

    Comments