From the WebUI it is possible to (once logged in) upload DataPackages directly to the server so that it is possible to download the zipped files on the EUD in the field.
The route /DataPackageTable takes an argument ?filename= which is not sanitized for either the Path or the Filename outside of the UI, which creates the issues that you can place any file, anywhere on the system. Albeit going this route will add some junk XML data into the end of the file, this making it extremely hard to achieve code execution through Python or Flask Templating.
This was achieved using a transparent proxy to catch and modify the webrequest, but can also be achieved using something like Curl
Proof Of Concept
Request through Burpsuite:
File on system:
(Note that the webserver is at that moment run as root, Not Recommended)
User Interface Datapackage
From the WebUI it is possible to (once logged in) upload DataPackages directly to the server so that it is possible to download the zipped files on the EUD in the field. The route
/DataPackageTable
takes an argument?filename=
which is not sanitized for either the Path or the Filename outside of the UI, which creates the issues that you can place any file, anywhere on the system. Albeit going this route will add some junk XML data into the end of the file, this making it extremely hard to achieve code execution through Python or Flask Templating. This was achieved using a transparent proxy to catch and modify the webrequest, but can also be achieved using something like CurlProof Of Concept
Request through Burpsuite:
![arbitrary-file-write_webui_request](https://user-images.githubusercontent.com/14073684/154238935-a361ecba-296b-4585-9f94-a661c68e897b.jpg)
File on system:
![arbitrary-file-write_webui_tmp-file](https://user-images.githubusercontent.com/14073684/154238973-2c4ef8c6-3163-4f7a-a0fa-b824c625eb9c.jpg)
(Note that the webserver is at that moment run as root, Not Recommended)
Bash equivalent PoC: