diff --git a/SERVER.sh b/SERVER.sh
index a4e2a76..080ae11 100644
--- a/SERVER.sh
+++ b/SERVER.sh
@@ -43,6 +43,7 @@ sudo iptables -t nat -A POSTROUTING -o enp0s8 -j MASQUERADE
sudo iptables-save > /etc/sysconfig/iptables
sudo cp conf/httpd.conf /etc/httpd/httpd.conf
+sudo cp conf/modsecurity.conf /etc/httpd/conf/modsecurity.conf
# instalar juice-shop se nao existir
jspath="/var/juice-shop"
@@ -54,10 +55,6 @@ if [[ ! -f "$jspath/package.json" ]]; then
sudo chown -R $USER:$USER "$jspath"
fi
-# apache WAF (desativado por default)
-s stop httpd
-s disable httpd
-
# correr juice shop via npm
cd "$jspath"
npm start
\ No newline at end of file
diff --git a/conf/httpd.conf b/conf/httpd.conf
index 90eea2c..b21a807 100644
--- a/conf/httpd.conf
+++ b/conf/httpd.conf
@@ -4,8 +4,9 @@ User apache
Group apache
Include conf.modules.d/*.conf
-IncludeOptional modsecurity.d/*.conf
-IncludeOptional modsecurity.d/activated_rules/*.conf
+Include conf/modsecurity.conf
+# IncludeOptional modsecurity.d/*.conf
+# IncludeOptional modsecurity.d/activated_rules/*.conf
AllowOverride none
diff --git a/conf/modsecurity.conf b/conf/modsecurity.conf
new file mode 100644
index 0000000..8fd9074
--- /dev/null
+++ b/conf/modsecurity.conf
@@ -0,0 +1,23 @@
+SecRuleEngine On
+SecRequestBodyAccess On
+SecResponseBodyAccess Off
+SecDebugLog /var/log/modsecurity/debug.log
+SecDebugLogLevel 0
+SecAuditLogParts ABIJ
+SecAuditLogType Serial
+SecAuditLog /var/log/modsecurity/audit.log
+
+# SQL Injection protection
+SecRule ARGS "(?i)(union(\s+all)?\s+select|select\s+.*\s+from|insert\s+into|update\s+.*\s+set|delete\s+from|drop\s+table|or\s+1=1|--|#|/\*|\*/|\bexec\b|\bexecute\b)" "id:'950001',phase:2,deny,status:403,msg:'SQL Injection Attack Detected',log"
+
+# XSS / HTML Injection protection
+SecRule ARGS "(?i)