-
Notifications
You must be signed in to change notification settings - Fork 176
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
Conversation
There was a problem hiding this 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.
Thank you, I added some code for error handling. |
c pushers.Channel | ||
} | ||
|
||
func (s *cwmpService) CanHandle(payload []byte) bool { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
services/cwmp-tr069.go
Outdated
"github.com/honeytrap/honeytrap/event" | ||
"github.com/honeytrap/honeytrap/pushers" | ||
) | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I added it.
Fixes #196.
I tested the service with this payload (from this article).