Apply suggestions from doc review

Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
Erik Krogh Kristensen
2020-06-16 23:45:45 +02:00
committed by GitHub
parent 5e060fa6a8
commit fb5e13b456

View File

@@ -6,28 +6,28 @@
<p>
Downloading executeables or other sensitive files over an unencrypted connection
can leave a server open to man-in-the-middle attacks (MITM).
Such a man-in-the-middle attack can allow an attacker to insert arbitary content
into the downloaded file, and in the worst case allow the attacker to execute
arbitary code on the vulnerable system.
Such an attack can allow an attacker to insert arbitrary content
into the downloaded file, and in the worst case, allow the attacker to execute
arbitrary code on the vulnerable system.
</p>
</overview>
<recommendation>
<p>
Use a secure transfer protocol when downloading executeables or other sensitive files.
Use a secure transfer protocol when downloading executables or other sensitive files.
</p>
</recommendation>
<example>
<p>
In this example a server downloads a shell script from a remote URL using the <code>node-fetch</code>
In this example, a server downloads a shell script from a remote URL using the <code>node-fetch</code>
library, and then executes this shell script.
</p>
<sample src="examples/insecure-download.js" />
<p>
The HTTP protocol is vulnerable to MITM, and thus an attacker could potentially replace the downloaded
shell script with arbitary code, which allows the attacker complete control over the attacked system.
shell script with arbitrary code, which gives the attacker complete control over the system.
</p>
<p>
The issue has been fixed in the below example by replacing the HTTP protocol with the HTTPS protocol.
The issue has been fixed in the example below by replacing the HTTP protocol with the HTTPS protocol.
</p>
<sample src="examples/insecure-download.js" />
</example>