aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move index.php file to public directory.mainHarald Eilertsen2024-07-072-2/+12
| | | | | | | | | | This allows us to set doculemt root to the public directory, so that there's less chance for shady actors to access the actual modules of the system directly. Just to be on the safe side, I added a new index.php file in the root of the project, to return a forbidden status in case of a misconfigured server.
* Switch to useing XMLReader to parse XML payloads.Harald Eilertsen2024-07-073-27/+77
| | | | | | | | | | | | | | XMLParser would expand entities by default, which could make us susceptible both to XXE attacks, and the billion laughs attack. By default XMLReader does _not_ expand entities, so it's a safer choice. This also changes the XmlRpcMethod::parse() function to throw a runtime exception if the XML payload could not be parsed, and to return null if the payload does not contain a valid <methodName> element. In cases where we're unable to parse the payload as a valid XML-RPC request, we fall back to saving the full request info as before.
* Also include originating IP address and timestamp in creds list.Harald Eilertsen2024-07-061-3/+3
|
* Refactoring, make function to save credentials.Harald Eilertsen2024-07-061-4/+9
|
* Process XML-RPC requests separately.Harald Eilertsen2024-07-062-0/+17
| | | | | | | | | | | If the XML-RPC method is wp.getUsersBlogs, we just save submitted credentials and otherwise ignore the request. We get a lot of these, and they're not really that interesting, so we don't need to save the full payload. But let's keep the credentials, so that we can build a list of passwords and user names. Other requests will be saved in full as before.
* Add class for representing XML-RPC payloads.Harald Eilertsen2024-07-062-0/+101
|
* Whitespace only.Harald Eilertsen2024-07-061-11/+11
|
* Add Composer, phpunit, phpcs and editorconfigHarald Eilertsen2024-07-058-1/+1849
|
* Rename trap-post-payload.php and call it from index.php.Harald Eilertsen2024-07-042-1/+4
|
* Add license information with REUSEHarald Eilertsen2024-07-048-0/+393
|
* Initial primitive honeypotHarald Eilertsen2024-07-044-0/+19