Installing libinjection & libpcre

Coraza requires two C libraries in order to work, libinjection is used to perform @isSQLi and @isXSS, and libpcre is used to perform @rx.

Future versions of Coraza won´t require these dependencies, in order to replace libpcre with golang´s RE2 compiler, rules using pcre compatible expresions must migrate to RE2 standard. Libinjection is being replaced by a golang port, follow the development in this repository.

Install libpcre


apt install -y libpcre++-dev


yum install pcre-devel

Install libinjection

git clone && cd libinjection
gcc -std=c99 -Wall -Werror -fpic -c src/libinjection_sqli.c -o libinjection_sqli.o 
gcc -std=c99 -Wall -Werror -fpic -c src/libinjection_xss.c -o libinjection_xss.o
gcc -std=c99 -Wall -Werror -fpic -c src/libinjection_html5.c -o libinjection_html5.o
gcc -dynamiclib -shared -o libinjection_sqli.o libinjection_xss.o libinjection_html5.o
cp *.so /usr/local/lib
cp *.o /usr/local/lib
cp src/*.h /usr/local/include/
chmod 444 /usr/local/include/libinjection*

Edit this page on GitHub