Hi,
Need your recommendation on how to block this. Just making sure that this is not configuration issue.
Environment:
For both login and register function, if we were injecting malicious payload, they will be blocked. no issue here. refer screenshots.
login and register
blocked
attack-log
For upload function, Anti-Virus works well. Test upload an eicar.zip file was blocked.
However, for WebShell upload like oneliner or c99, these files was not block.
response-success
return 200
Same file was blocked if not using JSON upload.
blocked
So far i notice that file uploads rule, it ask for json setting. However for WebShell detection, no such thing.
json setting
Any thought on this?
Thanks and regards,
Muhaimi
Interesting that the WebShell payloads bypass detection when wrapped in JSON have you tried adding custom signatures or content inspection rules specific to encoded file bodies within JSON?
I did try using custom signature to capture the base64 encoded JSON POST request. However, this will also block every file upload using the same method. The reason is this custom capture do not scan for AV or compare the md5 of the webshell against the known list like File Security and WebShell Detection.
What language is the webshell again php?
Useful link:
Web Shell Detection | FortiWeb 7.6.4 | Fortinet Document Library
Also see maybe enable or disable json parameter support Validating parameters (“input rules”) | FortiWeb 7.6.4 | Fortinet Document Library as maybe Fortiweb trying to work with json body as parameters causes issue.
User | Count |
---|---|
2534 | |
1351 | |
795 | |
641 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.