├── .gitignore
├── Project_Report.pdf
├── Readme.txt
├── System Security Project Presentation.pptx
└── waf
├── Makefile
├── WAF_Page_File
├── WAF_Param_File
├── admin_config
├── anomaly_detection_phase.c
├── build.sh
├── mod_waf.c
├── mod_waf.h
├── mod_waf.la
├── mod_waf.lo
├── modules.mk
├── signatures
├── waf_detection_mode.c
├── waf_file_operations.h
├── waf_generate_profile.c
├── waf_parse_signature.c
└── waf_train_mode.c
/.gitignore:
--------------------------------------------------------------------------------
1 | # Object files
2 | *.o
3 | *.ko
4 | *.obj
5 | *.elf
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Libraries
12 | *.lib
13 | *.a
14 | *.la
15 | *.lo
16 |
17 | # Shared objects (inc. Windows DLLs)
18 | *.dll
19 | *.so
20 | *.so.*
21 | *.dylib
22 |
23 | # Executables
24 | *.exe
25 | *.out
26 | *.app
27 | *.i*86
28 | *.x86_64
29 | *.hex
30 |
31 | # Debug files
32 | *.dSYM/
33 | *.su
34 |
--------------------------------------------------------------------------------
/Project_Report.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sudeshnapal12/Web-Application-Firewall/9b7317592341cce6e0898a6186f023ed75cf7ad3/Project_Report.pdf
--------------------------------------------------------------------------------
/Readme.txt:
--------------------------------------------------------------------------------
1 |
2 | Web Application Firewall
3 | Introduction
4 | ---------------------------------------------------------------
5 |
6 | A Web Application Firewall (WAF) is an HTTP application firewall,
7 | which sits in front of the application server and monitors all the
8 | incoming traffic. The WAF has been implemented as an Apache Module.
9 |
10 |
11 | Execution steps
12 | ---------------------------------------------------------------
13 |
14 | -Load the module in the Apache server using the command
15 | $ make all reload
16 |
17 | -Change directory path to point to the module's folder in the script build.sh
18 |
19 | -Set the module's handler in etc/apache2/apache2.conf
20 | -"waf" is the name of the module.
21 |
22 | SetHandler waf
23 |
24 |
25 | -Run the following command to build the module.
26 | $./build.sh
27 |
28 | -To test the module on the local machine, open browser and type:
29 | localhost/
30 |
31 | Design
32 | ---------------------------------------------------------------
33 | The WAF is implemented as an Apache module for Apache HTTP server.
34 | The WAF filters out malicious requests in two phases, signature
35 | checks for known attacks and anomaly detection for unknown attacks.
36 |
37 | Signature:
38 | The known attack formats are defined in the signatures file. The WAF
39 | checks the request for malicious attacks based on the signatures and
40 | guards against them. New signatures can be added in the file.
41 |
42 | Anomaly Detection:
43 | For never seen before attacks, we first collect information about
44 | legitimate traffic and then later based on the collected information,
45 | requests which look vastly different from the legitimate requests
46 | are discarded.
47 |
48 | Implementation
49 | ---------------------------------------------------------------
50 | The signatures are defined in a file in an encoded format which are
51 | used by the WAF to check for attacks.
52 | For anomaly detection, the collected information about legitimate traffic
53 | stored in file system. The data stored in files is encrypted so as to
54 | avoid misuse of the data from the adversaries.
55 |
56 | Contributors
57 | ---------------------------------------------------------------
58 | Amogh Avadhani
59 | Ankit Agrahari
60 | Prachi Poddar
61 | Sudeshna Pal
62 |
63 | Passcode : CSE509PROJECT
64 |
65 | -------------------Copyright 2016, All rights reserved----------------------------
66 |
--------------------------------------------------------------------------------
/System Security Project Presentation.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sudeshnapal12/Web-Application-Firewall/9b7317592341cce6e0898a6186f023ed75cf7ad3/System Security Project Presentation.pptx
--------------------------------------------------------------------------------
/waf/Makefile:
--------------------------------------------------------------------------------
1 | ##
2 | ## Makefile -- Build procedure for sample waf Apache module
3 | ## Autogenerated via ``apxs -n waf -g''.
4 | ##
5 |
6 | builddir=.
7 | top_srcdir=/usr/share/apache2
8 | top_builddir=/usr/share/apache2
9 | include /usr/share/apache2/build/special.mk
10 |
11 | # the used tools
12 | APACHECTL=apachectl
13 |
14 | # additional defines, includes and libraries
15 | #DEFS=-Dmy_define=my_value
16 | #INCLUDES=-Imy/include/dir
17 | #LIBS=-Lmy/lib/dir -lmylib
18 |
19 | # the default target
20 | all: local-shared-build
21 |
22 | # install the shared object file into Apache
23 | install: install-modules-yes
24 |
25 | # cleanup
26 | clean:
27 | -rm -f mod_waf.o mod_waf.lo mod_waf.slo mod_waf.la
28 |
29 | # simple test
30 | test: reload
31 | lynx -mime_header http://localhost/waf
32 |
33 | # install and activate shared object by reloading Apache to
34 | # force a reload of the shared object file
35 | reload: install restart
36 |
37 | # the general Apache start/restart/stop
38 | # procedures
39 | start:
40 | $(APACHECTL) start
41 | restart:
42 | $(APACHECTL) restart
43 | stop:
44 | $(APACHECTL) stop
45 |
46 |
--------------------------------------------------------------------------------
/waf/WAF_Page_File:
--------------------------------------------------------------------------------
1 | 6 &