3 ms·
It seems like what it actually "learned" is no better than banning some keywords, for example: >>> p=lambda x:lgs.predict(vectorizer.transform([x])) >>> p(
by rfoo 9y ago
It seems like what it actually "learned" is no better than banning some keywords, for example:
>>> p=lambda x:lgs.predict(vectorizer.transform([x]))
>>> p("/product.php?name=etc")
array([1])
>>> p("/login.php?name=rfoo&pass=hehe")
array([1])
>>> p("/download.php?file=/root/.bashrc")
array([0])
>>> p("/example/test/q=" + lorem + "<script>alert(1)</script>") # len(lorem) = 4488
array([0])
(FYI 1 means malicious and 0 means clean)
- Faizann20 9y agoIf you have a look at the data, there is a wide variety of malicious commands that it can detect.