Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db_nmap service state doesn't update when services no longer running #11909

Open
1 of 4 tasks
jfennell-techempower opened this issue May 31, 2019 · 2 comments
Open
1 of 4 tasks

Comments

@jfennell-techempower
Copy link

Steps to reproduce

How'd you do it?

  1. Run db_nmap -A -sV <host> against a host that has open ssh server running, with no firewall enabled.
  2. Run services , look for the ssh service on that host, and confirm that the state is 'open'.
  3. Disable ssh by running sudo service ssh stop on the host machine, then run db_nmap -A -sV <host> again. The output indicates that port 22 is closed.
  4. Run services again, and this time confirm that the state of the service on port 22 is still open.

Expected behavior

  • I would expect that services previously identified are updated when db_nmap reports that its associated port is closed. Particularly that the state column changes from 'open' to 'closed'.

This is the behavior if you specify just one port using -p, after disabling ssh. The state changes to closed.
db_nmap -A -sV -p22 <host>

  • I would also expect that the info field for that service would also be cleared, as there is no longer a service listening on that port, though I recognize this is not the current behavior when running db_nmap -A -sV -p22 <host>.

Current behavior

What happens instead?
The state of port 22, as indicated by running services, is still 'open', even though the output of db_nmap indicates it is closed.

System stuff

Metasploit version

Framework: 5.0.25-dev-
Console : 5.0.25-dev-

I installed Metasploit with:

OS

Ubuntu 18.04

What OS are you running Metasploit on?
Ubuntu 18.04

@busterb
Copy link
Member

busterb commented Jun 10, 2019

Sounds reasonable, got a diff? I also added this as something to look at more closely in the future

@github-actions
Copy link

Hi!

This issue has been left open with no activity for a while now.

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

@github-actions github-actions bot added the Stale Marks an issue as stale, to be closed if no action is taken label Nov 13, 2020
@github-actions github-actions bot removed the Stale Marks an issue as stale, to be closed if no action is taken label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants