forked from Annihil/mod_defender
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from VultureProject/devel
Master bug fix on POST data retrieving
- Loading branch information
Showing
18 changed files
with
1,369 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,45 @@ | ||
language: cpp | ||
sudo: required | ||
|
||
os: linux | ||
dist: trusty | ||
sudo: required | ||
|
||
language: cpp | ||
compiler: gcc | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- apache2 | ||
- apache2-dev | ||
- g++-5 | ||
- gcc-5 | ||
- g++-6 | ||
- gcc-6 | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
|
||
before_install: | ||
|
||
install: | ||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90 | ||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90 | ||
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90 | ||
|
||
matrix: | ||
allow_failures: | ||
exclude: | ||
- compiler: "gcc" | ||
|
||
before_script: | ||
- sudo mkdir /etc/defender/ | ||
- > | ||
sudo wget -O /etc/defender/core.rules | ||
https://raw.githubusercontent.com/nbs-system/naxsi/master/naxsi_config/naxsi_core.rules | ||
- sudo sed -i "s/select|union|update|delete|insert|table|from|ascii|hex|unhex|drop/\\\b(select|union|update|delete|insert|table|from|ascii|hex|unhex|drop)\\\b/" /etc/defender/core.rules | ||
- > | ||
printf | ||
"LoadModule defender_module /usr/lib/apache2/modules/mod_defender.so | ||
<IfModule defender_module> | ||
Include /etc/defender/core.rules | ||
</IfModule>" | sudo tee /etc/apache2/mods-available/defender.load | ||
- sudo apachectl -v | ||
- sudo apachectl -M | ||
- sudo a2enmod defender | ||
- sudo service apache2 stop | ||
- > | ||
printf | ||
"<VirtualHost *:80> | ||
LogLevel notice | ||
ErrorLog \${APACHE_LOG_DIR}/error.log | ||
AllowEncodedSlashes On | ||
<Location /> | ||
<IfModule defender_module> | ||
Defender On | ||
MatchLog \${APACHE_LOG_DIR}/defender_match.log | ||
JSONMatchLog \${APACHE_LOG_DIR}/defender_json_match.log | ||
RequestBodyLimit 8388608 | ||
LearningMode Off | ||
ExtensiveLog Off | ||
LibinjectionSQL Off | ||
LibinjectionXSS Off | ||
CheckRule \"\$SQL >= 8\" BLOCK | ||
CheckRule \"\$RFI >= 8\" BLOCK | ||
CheckRule \"\$TRAVERSAL >= 4\" BLOCK | ||
CheckRule \"\$EVADE >= 4\" BLOCK | ||
CheckRule \"\$XSS >= 8\" BLOCK | ||
CheckRule \"\$UPLOAD >= 8\" BLOCK | ||
</IfModule> | ||
</Location> | ||
</VirtualHost>" | sudo tee /etc/apache2/sites-available/000-default.conf | ||
include: | ||
- os: linux | ||
compiler: "gcc" | ||
env: RUN="basic.sh" | ||
|
||
- os: linux | ||
compiler: "gcc" | ||
env: RUN="https.sh" | ||
|
||
script: | ||
- cmake -H. -Bbuild | ||
- cmake --build build | ||
- sudo cp build/mod_defender.so /usr/lib/apache2/modules/ | ||
- sudo service apache2 start | ||
- cd tests/ | ||
- bash core.sh localhost | ||
- bash internal.sh localhost | ||
- /bin/bash ./tests/travis/do_run.sh | ||
|
||
after_script: | ||
- sudo cat /var/log/apache2/error.log | ||
- sudo cat /var/log/apache2/defender_match.log | ||
- sudo head /var/log/apache2/defender_json_match.log | ||
# - sudo cat /var/log/apache2/defender_match.log | ||
- sudo cat /var/log/apache2/defender_json_match.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.