<s>
Suhosin	B-Language
(	O
Korean	O
수호신	O
,	O
,	O
meaning	O
"	O
guardian	O
angel	O
"	O
)	O
is	O
an	O
open	B-Application
source	I-Application
patch	O
for	O
PHP	B-Application
and	O
also	O
a	O
PHP	B-Application
extension	O
,	O
written	O
by	O
the	O
German	O
company	O
.	O
</s>
<s>
"	O
The	O
goal	O
behind	O
Suhosin	B-Language
is	O
to	O
be	O
a	O
safety	O
net	O
that	O
protects	O
servers	O
from	O
insecure	O
PHP	B-Application
coding	O
practices.	O
"	O
</s>
<s>
Suhosin	B-Language
also	O
reduces	O
the	O
"	O
attackable	O
surface	O
"	O
that	O
PHP	B-Application
adds	O
to	O
a	O
Web	B-Application
Server	I-Application
through	O
function	O
whitelists	O
,	O
resource	O
limits	O
,	O
transparent	O
session	O
and	O
cookie	O
encryption	O
,	O
binary	O
content	O
filter	O
,	O
logging	O
and	O
various	O
other	O
protections	O
.	O
</s>
<s>
This	O
reduces	O
the	O
risk	O
of	O
deploying	O
previously	O
deemed	O
unsafe	O
PHP	B-Application
programs	O
and	O
protects	O
against	O
known	O
and	O
unknown	O
attacks	O
.	O
</s>
<s>
While	O
the	O
original	O
patch	O
included	O
several	O
low-level	O
memory-related	O
hardenings	O
,	O
those	O
features	O
are	O
n't	O
present	O
in	O
the	O
modules	O
,	O
but	O
most	O
of	O
them	O
have	O
been	O
upstreamed	O
into	O
PHP	B-Application
.	O
</s>
<s>
Inclusion	O
protection	O
:	O
Uploaded	O
and	O
remote	O
files	O
ca	O
n't	O
be	O
included	O
,	O
mitigating	O
arbitrary	B-Protocol
file	I-Protocol
inclusion	I-Protocol
attacks	I-Protocol
.	O
</s>
<s>
Disabling	O
common	O
code	O
execution	O
vectors	O
:	O
the	O
eval	O
keyword	O
is	O
n't	O
a	O
real	O
function	O
in	O
PHP	B-Application
,	O
thus	O
it	O
ca	O
n't	O
be	O
disabled	O
with	O
the	O
disable_function	O
directive	O
,	O
but	O
Suhosin	B-Language
added	O
this	O
possibility	O
,	O
and	O
also	O
allowing	O
to	O
disable	O
the	O
infamous	O
/e	O
operator	O
for	O
the	O
preg_replace	O
function	O
that	O
can	O
lead	O
to	O
arbitrary	O
code	O
execution	O
.	O
</s>
<s>
Protection	O
against	O
infinite	O
recursion	O
:	O
PHP	B-Application
has	O
a	O
documented	O
behavior	O
of	O
yielding	O
a	O
segmentation	B-Error_Name
fault	I-Error_Name
error	O
upon	O
infinite	O
recursion	O
.	O
</s>
<s>
Since	O
this	O
is	O
a	O
memory-safety	O
issue	O
,	O
Suhosin	B-Language
will	O
make	O
the	O
application	O
gracefully	O
exit	O
once	O
a	O
maximum	O
level	O
of	O
recursion	O
has	O
been	O
met	O
.	O
</s>
<s>
Granular	O
function	O
white/black	O
-list	O
:	O
the	O
disabled_function	O
directive	O
of	O
PHP	B-Application
is	O
n't	O
granular	O
at	O
all	O
,	O
Suhosin	B-Language
provides	O
a	O
white	O
and	O
black-list	O
mechanism	O
for	O
functions	O
,	O
on	O
a	O
per	O
virtual-host	O
and	O
folder	O
basis	O
.	O
</s>
<s>
Black-list	O
against	O
sensitive	O
variable	O
names	O
:	O
Suhosin	B-Language
will	O
drop	O
GET	O
,	O
POST	O
,	O
COOKIE	O
variables	O
with	O
global	O
reserved	O
variable	O
names	O
following	O
names	O
,	O
like	O
GLOBALS	O
,	O
_COOKIE	O
,	O
_ENV	O
,	O
_FILES	O
,	O
_GET	O
,	O
_POST	O
,…	O
</s>
<s>
File	O
upload	O
hardening	O
:	O
Suhosin	B-Language
supports	O
calling	O
scripts	O
upon	O
file-upload	O
,	O
allowing	O
things	O
like	O
automatic	O
anti-virus	B-Application
scanning	O
upon	O
upload	O
.	O
</s>
<s>
Custom	O
actions	O
upon	O
violation	O
:	O
blocking	O
violating	O
variables	O
,	O
send	O
a	O
specific	O
HTTP	B-Protocol
response	I-Protocol
code	I-Protocol
,	O
issue	O
a	O
redirection	O
or	O
even	O
execute	O
another	O
PHP	B-Application
script	I-Application
.	O
</s>
<s>
Extensive	O
logging	O
:	O
multiple	O
log	O
devices	O
,	O
logging	O
offending	O
filename	O
and	O
the	O
line	O
number	O
,	O
the	O
IP	O
address	O
of	O
the	O
attacker	O
,	O
even	O
behind	O
reverse	B-General_Concept
proxies	I-General_Concept
.	O
</s>
<s>
In	O
some	O
Linux	B-Application
distributions	I-Application
,	O
notably	O
Debian	O
in	O
versions	O
up	O
to	O
6.x	O
(	O
"	O
Squeeze	O
"	O
)	O
and	O
Gentoo	B-Application
Linux	I-Application
,	O
it	O
was	O
shipped	O
by	O
default	O
with	O
both	O
patch	O
and	O
extension	O
.	O
</s>
<s>
Suhosin	B-Language
was	O
removed	O
from	O
Debian	O
as	O
of	O
version	O
7	O
(	O
Wheezy	O
)	O
but	O
reappeared	O
in	O
the	O
current	O
development	O
branch	O
.	O
</s>
<s>
It	O
is	O
activated	O
by	O
default	O
in	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
Server	I-Operating_System
.	O
</s>
<s>
As	O
of	O
PHP	B-Application
5.4	O
,	O
openSUSE	B-Operating_System
dropped	O
the	O
Suhosin	B-Language
patch	O
,	O
but	O
maintains	O
a	O
port	O
of	O
the	O
Suhosin	B-Language
extension	O
.	O
</s>
<s>
FreeBSD	O
10.1	O
maintains	O
the	O
Suhosin	B-Language
extension	O
in	O
its	O
ports	O
collection	O
.	O
</s>
<s>
Suhosin	B-Language
was	O
first	O
released	O
in	O
2006	O
,	O
and	O
targeted	O
PHP	B-Application
5.2.0	O
.	O
</s>
<s>
This	O
led	O
some	O
distributions	O
to	O
consider	O
the	O
Suhosin	B-Language
project	O
dead	O
,	O
until	O
some	O
people	O
from	O
the	O
community	O
started	O
to	O
contribute	O
back	O
to	O
it	O
,	O
circa	O
2014	O
.	O
</s>
<s>
There	O
is	O
no	O
plan	O
to	O
upstream	O
features	O
into	O
PHP	B-Application
.	O
</s>
