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

services: add CWMP/TR-069 #281

Merged
merged 5 commits into from
Apr 28, 2018
Merged

services: add CWMP/TR-069 #281

merged 5 commits into from
Apr 28, 2018

Conversation

CapacitorSet
Copy link
Contributor

@CapacitorSet CapacitorSet commented Apr 16, 2018

Fixes #196.

I tested the service with this payload (from this article).

Copy link
Collaborator

@sammynx sammynx left a comment

Choose a reason for hiding this comment

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

When I use a payload with invalid xml there is no logging of the attempt. Maybe we should also log those ?

Also when I run this with the xml payload where I deleted the body it panics.

@CapacitorSet
Copy link
Contributor Author

Thank you, I added some code for error handling.

c pushers.Channel
}

func (s *cwmpService) CanHandle(payload []byte) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add here some more unique features to distinguish normal http, ethereum and this protocol. Check for the paths eg.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not much can be done for checking the paths, I'm afraid - GET requests might be indistinguishable from plain HTTP stuff. However, I improved the POST checking so that it checks for < (hinting at XML), SOAP/soap and xml.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not that familiair with the specifics, but there isn't a specific targetted path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not familiar with the protocol either, but it seems that it doesn't have a specific path.

Quick example: the linked Wireshark capture uses /UD/act?1, this article uses /cwmpWeb/CPEMgt, this guide uses /acs.

"github.com/honeytrap/honeytrap/event"
"github.com/honeytrap/honeytrap/pushers"
)

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a configuration example? One that we can include (generate eventually) to the Honeytrap docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This service currently doesn't use configuration options, so a configuration example would be trivial - something like

[service.cwmp]
type="cwmp"
port="tcp/3890"

Should I add it anyway?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, that would be great. This will be use latter to use generate docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I added it.

@nl5887 nl5887 merged commit 239f27a into honeytrap:master Apr 28, 2018
@CapacitorSet CapacitorSet deleted the tr069 branch April 28, 2018 13:51
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.

None yet

3 participants