You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: addOns/help/src/main/javahelp/contents/start/features/api.html
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,41 @@ <H1>API</H1>
28
28
Future versions of ZAP will increase the functionality available via the APi.
29
29
</p>
30
30
31
+
<H2><aname="filexfer">File Transfer</a></H2>
32
+
33
+
Many API endpoints allow you to load or save files to and from the file system.
34
+
<p>
35
+
The core API also supports uploading and downloading files, but this is disabled by default as a security measure.
36
+
If an attacker is able to access the ZAP API then with this feature enabled they would be able to upload their own script to
37
+
ZAP and then run it. ZAP scripts run with the same permissions as ZAP and so this is full remote code execution access.
38
+
<p>
39
+
To enable file transfer you will need to have an API key set and to enable it via the
40
+
<ahref="../../ui/dialogs/options/api.html#filexferenabled">Options API screen</a>.
41
+
You can also enable file transfers via the command line as explained in the help for that screen.
42
+
<p>
43
+
With file transfer enabled you will be able to upload text files to the
44
+
<ahref="../../ui/dialogs/options/api.html#xferdir">Transfer Directory</a> using the 'fileUpload' 'other' endpoint
45
+
and download them from there using the 'fileDownload' 'other' endpoint.
46
+
You can specify subdirectories (e.g. "subdir/myfile") but any attempt to upload or download a file to or from another directory
47
+
(e.g. using "../../") will be rejected.
48
+
The 'fileUpload' endpoint only accepts POST requests and you should use an encoding of either "multipart/form-data" or "application/x-www-form-urlencoded".
49
+
The web UI allows you to select and upload local files.
0 commit comments