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

Initial support for LLMNR #339

Merged
merged 4 commits into from
Jun 3, 2024
Merged

Conversation

defensivedepth
Copy link
Contributor

Proposed changes

Adds support for Canary LLMNR. Uses Scapy to broadcast a LLMNR query for canary hostname. If it receives a LLMNR response, it confirms that it was for the canary hostname and then logs the event. The following is configurable:

  • LLMNR Port (TCP/5355 by default)
  • Canary LLMNR Hostame
  • How often to broadcast the LLMNR query (in seconds)
  • Splay time to add randomness to the broadcast (in seconds)

Sample log output, generated by using Responder to poison LLMNR request:

{"dst_host": "0.0.0.0", "dst_port": 5355, "local_time": "2024-01-20 21:41:58.716469", "local_time_adjusted": "2024-01-20 21:41:58.716499", "logdata": {"query_hostname": "DC03", "response": "DNS Ans \"10.0.0.22\" "}, "logtype": 19001, "node_id": "opencanary-1", "src_host": "192.168.16.27", "src_port": 5355, "utc_time": "2024-01-20 21:41:58.716495"}

Discussion: #335

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update

Checklist

I will add docs once it's confirmed that this PR will be accepted.

  • Lint and unit tests pass locally with my changes (if applicable)
  • I have run pre-commit (pre-commit in the repo)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Linked to the relevant github issue or github discussion

Further comments

N/A

@defensivedepth
Copy link
Contributor Author

Anything I can do to help move this along?

@theidiotyouyellat
Copy link

@jayjb any luck in getting this included?

@jayjb
Copy link
Contributor

jayjb commented May 10, 2024

Hi @defensivedepth, @theidiotyouyellat,

Sorry for the delay with this. We like the idea, we don't love the dependency on Scapy though (its quite a heavy dependency for what we using it for). Im trying to figure a way we can craft those Queries without it. If not, I'll likely accept this for now while we improve it.

@defensivedepth
Copy link
Contributor Author

@jayjb Thanks for the feedback. The Scapy dep is not new - the SNMP module already requires it. What specifically is the concern?

@mclmax
Copy link

mclmax commented May 17, 2024

hey @defensivedepth and @theidiotyouyellat, taking a look. hit you back shortly

Copy link

@mclmax mclmax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @defensivedepth, the code looks great! Sorry about the delay here getting our feedback. We'd love to have this in. I've just left a request for a small change to how we handle the import and we should be good to go!

bin/opencanary.tac Outdated Show resolved Hide resolved
@defensivedepth
Copy link
Contributor Author

I resolved the change request, thanks!

@mclmax
Copy link

mclmax commented Jun 3, 2024

awesome, thanks @defensivedepth! merged

@mclmax mclmax closed this Jun 3, 2024
@mclmax mclmax reopened this Jun 3, 2024
@mclmax mclmax merged commit 9bdcb45 into thinkst:master Jun 3, 2024
@mclmax
Copy link

mclmax commented Jun 3, 2024

Now it's merged ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants