PHPRetro exploit?

Status
Not open for further replies.
Junior Spellweaver
Joined
May 24, 2010
Messages
112
Reaction score
4
Hello, I was browsing through PHPRetro looking for exploits when I spotted
PHP:
function delete1(){
		@$GLOBALS['serverdb']->query("TRUNCATE TABLE users");
	}

Apparently it's used for when you install phpretro but i'm not sure if this is used anywhere else in the CMS.

What do you think?

Edit: After reading through the code again, I noticed that Yifan left a note..
I'm pretty sure you have to delete the install functions after you install the cms.

"//You may delete the installer_sql(); class after installing"

So id probably recommend deleting the install functions.
 
Last edited:
its under core of install, it's being used for the install

Yeas but I am just stating it is better to delete it for security reasons as if the function is called apon in another part of the CMS than your users table will be deleted ;D
 
nothing can happen useless you call that function.. no exploit at all

---------- Post added at 09:43 AM ---------- Previous post was at 09:43 AM ----------

regarding your reply, its only used in the install but you can delete if if you like lol
 
Lol, when I use my PHPRetro, I set it up, then when I try to login, go to the housekeeping, it says, 'Page not found!' why? any clue? thankz ;) if you help me Ill make you admin on my retro! :O
 
Yea say someone releases a "addon" and if they are sneaky they can use a $_GET to activate that function so it is probably best to delete it?
 
No entirely sure if this would work...

PHP:
<?php

$delete =  function delete1(){ @$GLOBALS['serverdb']->query("TRUNCATE TABLE users"); }

if($delete===false){
echo"Oh noes, didn't work!"
}else{
echo $delete
}
?>
 
Last edited:
No entirely sure if this would work...

PHP:
<?php

$delete =  function delete1(){ @$GLOBALS['serverdb']->query("TRUNCATE TABLE users"); }

if($delete===false){
echo"Oh noes, didn't work!"
}else{
echo $delete
}
?>

Yeah my logic does the same thing, except mine only works when you type in the url bar ?exploit=true

---------- Post added at 11:57 AM ---------- Previous post was at 11:56 AM ----------

Oh and yours wouldn't work don't echo quires ..
 
Yeah my logic does the same thing, except mine only works when you type in the url bar ?exploit=true

---------- Post added at 11:57 AM ---------- Previous post was at 11:56 AM ----------

Oh and yours wouldn't work don't echo quires ..

I saw how you got it working using a GET function, Please post your code snippet?
 
No entirely sure if this would work...

PHP:
<?php

$delete =  function delete1(){ @$GLOBALS['serverdb']->query("TRUNCATE TABLE users"); }

if($delete===false){
echo"Oh noes, didn't work!"
}else{
echo $delete
}
?>

Unfortunately php isn't a language like javascript - although I wish it was. you can't define a variable for a function such as above. you could do
PHP:
<?php
function delete()
{
//do codes
}

if(function_exists('delete'))
{
 delete();
}
?>
but ya, this isn't a error as you could see
"//You may delete the installer_sql(); class after installing"
You can delete it, its because you can remove ALL users from the database if you want on installation, then you can delete the class afterward if you want, not because its exploitable, because its redundant.
 
Unfortunately php isn't a language like javascript - although I wish it was. you can't define a variable for a function such as above. you could do
PHP:
<?php
function delete()
{
//do codes
}

if(function_exists('delete'))
{
 delete();
}
?>
but ya, this isn't a error as you could see

You can delete it, its because you can remove ALL users from the database if you want on installation, then you can delete the class afterward if you want, not because its exploitable, because its redundant.

Ahhh thats more like it. I'm just new to PHP :)
You see this was a usful thread im sure people will look into deleting it btw its located in holograph.php ;)

Yes, useful thread indeed.

Close now?
 
Status
Not open for further replies.
Back