mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Apply suggestions from doc review
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5e060fa6a8
commit
fb5e13b456
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user