journal article·2025-02-27Open access

CraftFuzz: Generating Precise Requests for PHP Web Vulnerability Validation

Jiazhen Zhao, Kailong Zhu, Guozheng Yang, Yifan Zhang, Yuliang Lu

Applied Sciences· Volume 15· Issue 5

Abstract

Web applications have become a crucial part of modern society’s infrastructure, and vulnerabilities in them can lead to significant social and economic losses. Static analysis remains the predominant approach for vulnerability detection, due to its extensive coverage. However, its high false positive rate demands significant expert effort to confirm the actual presence of vulnerabilities. In contrast, dynamic analysis can generate accurate vulnerability reports. Nevertheless, existing fuzzers are often constrained in their methodologies, making it challenging to effectively explore deeper code regions where vulnerabilities are more likely to reside. To address these limitations, we propose CraftFuzz, a directed fuzzing approach that combines static and dynamic analysis. It aims to bypass extensive ineffective path exploration and generate precise requests for validating PHP web vulnerabilities. CraftFuzz adopts a multi-stage refinement-solving strategy, including static extraction of path constraints and routing rules for entry URL generation, solving path constraints through fuzzing and parameter mutation, and payload construction based on various reflection strategies to effectively handle data constraints. Ultimately, CraftFuzz ensures that fuzzing requests accurately reach the target sink and successfully trigger vulnerabilities. The experimental results demonstrated that CraftFuzz could solve each entry URL and path constraint within 6 s and 20 s, respectively, achieving a 97.1% success rate in entry URL generation and a 95% success rate in path constraint solving. For known vulnerability verification, CraftFuzz validated 88.88% of vulnerabilities, outperforming state-of-the-art fuzzers by 32.28%.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Web Application Security Vulnerabilities · Software Testing and Debugging Techniques · Software Reliability and Analysis Research

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

College of Electronic Engineering, National University of Defense Technology, Hefei 230037, China

Anhui Province Key Laboratory of Cyberspace Security Situation Awareness and Evaluation, Hefei 230037, China

Funding

National Key R&D Program of China · NSFC

References (57)

Show source-provided references
1. (2024, November 15). Imaginarycloud. Available online: https://www.imaginarycloud.com/blog/10-types-of-web-applications-and-how-you-can-use-them.
2. (2024, November 15). Techtarget. Available online: https://www.techtarget.com/searchsoftwarequality/definition/Web-application-Web-app.
3. Augov (2024, November 30). Cyber Threat, Available online: https://www.cyber.gov.au/about-us/view-all-content/reports-and-statistics/annual-cyber-threat-report-2023-2024.
4. Crowdstrike (2024, November 15). Threat Report. Available online: https://www.crowdstrike.com/en-us/global-threat-report/.
5. Surveys, W.T. (2024, November 15). Usage Statistics of PHP for Websites. Available online: https://w3techs.com/technologies/details/pl-php.
6. Foundation, T.O. (2024, November 15). SQL Injection. Available online: https://owasp.org/www-community/attacks/SQL_Injection/.
7. Wikipedia (2024, November 15). Code Execution. Available online: https://en.wikipedia.org/wiki/Arbitrary_code_execution.
8. Foundation, T.O. (2024, November 15). Cross Site Scripting. Available online: https://owasp.org/www-community/attacks/xss.
9. Jiazhen, Z., Kailong, Z., Lu, Y., Hui, H., and Yuliang, L. (2024). Yama: Precise Opcode-based Data Flow Analysis for Detecting PHP Applications Vulnerabilities. arXiv.
10. Eriksson, B., Pellegrino, G., and Sabelfeld, A. (2021, January 24–27). Black widow: Blackbox data-driven web scanning. Proceedings of the 2021 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA.10.1109/SP40001.2021.00022 ↗
11. Al Wahaibi, S., Foley, M., and Maffeis, S. (2023, January 9–11). SQIRL:Grey-Box Detection of SQL Injection Vulnerabilities Using Reinforcement Learning. Proceedings of the 32nd USENIX Security Symposium (USENIX Security 23), Anaheim, CA, USA.
12. Drakonakis, K., Ioannidis, S., and Polakis, J. (March, January 27). Rescan: A middleware framework for realistic and robust black-box web application scanning. Proceedings of the Network and Distributed System Security (NDSS) Symposium, San Diego, CA, USA.
13. Trickel, E., Pagani, F., Zhu, C., Dresel, L., Vigna, G., Kruegel, C., Wang, R., Bao, T., Shoshitaishvili, Y., and Doupé, A. (2023, January 21–25). Toss a fault to your witcher: Applying grey-box coverage-guided mutational fuzzing to detect sql and command injection vulnerabilities. Proceedings of the 2023 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA.10.1109/SP46215.2023.10179317 ↗
14. Alhuzali, A., Gjomemo, R., Eshete, B., and Venkatakrishnan, V. (2018, January 15–17). NAVEX: Precise and scalable exploit generation for dynamic web applications. Proceedings of the 27th USENIX Security Symposium (USENIX Security 18), Baltimore, MD, USA.
15. Güler, E., Schumilo, S., Schloegel, M., Bars, N., Görz, P., Xu, X., Kaygusuz, C., and Holz, T. (2024, January 14–16). Atropos: Effective fuzzing of web applications for server-side vulnerabilities. Proceedings of the USENIX Security Symposium, Philadelphia, PA, USA.
16. van Rooij, O., Charalambous, M.A., Kaizer, D., Papaevripides, M., and Athanasopoulos, E. (2021, January 4–8). webfuzz: Grey-box fuzzing for web applications. Proceedings of the Computer Security–ESORICS 2021: 26th European Symposium on Research in Computer Security, Darmstadt, Germany. Proceedings, Part I 26.10.1007/978-3-030-88418-5_8 ↗
17. Neef, S., Kleissner, L., and Seifert, J.P. (2024, January 1–5). What all the phuzz is about: A coverage-guided fuzzer for finding vulnerabilities in php web applications. Proceedings of the 19th ACM Asia Conference on Computer and Communications Security, Singapore.10.1145/3634737.3661137 ↗
18. Wang, C., Meng, W., Luo, C., and Li, P. (2025, January 12–15). Predator: Directed Web Application Fuzzing for Efficient Vulnerability Validation. Proceedings of the 2025 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA.
19. An empirical study of the reliability of UNIX utilities10.1145/96267.96279 ↗
20. Doupé, A., Cavedon, L., Kruegel, C., and Vigna, G. (2012, January 8–10). Enemy of the state: A state-aware black-box web vulnerability scanner. Proceedings of the 21st USENIX Security Symposium (USENIX Security 12), Bellevue, WA, USA.
21. Duchene, F., Rawat, S., Richier, J.L., and Groz, R. (2014, January 3–5). KameleonFuzz: Evolutionary fuzzing for black-box XSS detection. Proceedings of the 4th ACM Conference on Data and Application Security and Privacy, San Antonio, TX, USA.10.1145/2557547.2557550 ↗
22. Meng, R., Pîrlea, G., Roychoudhury, A., and Sergey, I. (2023, January 26–30). Greybox fuzzing of distributed systems. Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, Copenhagen, Denmark.10.1145/3576915.3623097 ↗
23. Böhme, M., Pham, V.T., Nguyen, M.D., and Roychoudhury, A. (2017–3, January 30). Directed greybox fuzzing. Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, Dallas, TX, USA.10.1145/3133956.3134020 ↗
24. Zhao, J., Lu, Y., Zhu, K., Chen, Z., and Huang, H. (2022). Cefuzz: An directed fuzzing framework for php rce vulnerability. Electronics, 11.10.3390/electronics11050758 ↗
25. Wikipedia (2024, November 15). List of HTTP Status Codes. Available online: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes.
26. Xdebug (2024, November 15). Xdebug Trace. Available online: https://xdebug.org/docs/trace.
27. Xdebug (2024, November 15). Xdebug-get-Code-Coverage. Available online: https://xdebug.org/docs/all_functions#xdebug_get_code_coverage.
28. Php (2024, November 15). Auto-Prepend-File. Available online: https://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file.
29. van Rooij, O. (2024, November 15). Webfuzz. Available online: https://bitbucket.org/srecgrp/webfuzz-fuzzer.
30. Foundation, T.O. (2024, November 15). Path Traversal. Available online: https://owasp.org/www-community/attacks/Path_Traversal.
31. Portswigger (2024, November 15). Insecure Deserialization. Available online: https://portswigger.net/web-security/deserialization.
32. Portswigger (2024, November 15). Open Redirection. Available online: https://portswigger.net/kb/issues/00500100_open-redirection-reflected.
33. Xmendez (2024, November 15). Wfuzz. Available online: https://github.com/xmendez/wfuzz.
34. Sefcom (2024, November 15). Microtests. Available online: https://github.com/sefcom/Witcher-experiment/tree/main/early_experiments/microtests/code/hospital.
35. Foundation, T.O. (2024, November 15). Unrestricted File Upload. Available online: https://owasp.org/www-community/vulnerabilities/Unrestricted_File_Upload.
36. Wikipedia (2024, November 15). File Inclusion. Available online: https://en.wikipedia.org/wiki/File_inclusion_vulnerability.
37. Backes, M., Rieck, K., Skoruppa, M., Stock, B., and Yamaguchi, F. (2017, January 26–28). Efficient and flexible discovery of php application vulnerabilities. Proceedings of the 2017 IEEE European Symposium on Security and Privacy (EuroS&P), Paris, France.10.1109/EuroSP.2017.14 ↗
38. Jovanovic, N., Kruegel, C., and Kirda, E. (2006, January 21–24). Pixy: A static analysis tool for detecting Web application vulnerabilities. Proceedings of the 2006 IEEE Symposium on Security and Privacy (S&P’06), Berkeley/Oakland, CA, USA.10.1109/SP.2006.29 ↗
39. Dahse, J., and Holz, T. (2014, January 3–26). Simulation of Built-in PHP Features for Precise Static Code Analysis. Proceedings of the NDSS, Citeseer, San Diego, CA, USA.10.14722/ndss.2014.23262 ↗
40. Su, H., Li, F., Xu, L., Hu, W., Sun, Y., Sun, Q., Chao, H., and Huo, W. (2023, January 17–21). Splendor: Static detection of stored xss in modern web applications. Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, Seattle, WA, USA.10.1145/3597926.3598116 ↗
41. Al-Kassar, F., Compagna, L., and Balzarotti, D. (2023, January 9–11). WHIP: Improving Static Vulnerability Detection in Web Application by Forcing tools to Collaborate. Proceedings of the 32nd USENIX Security Symposium (USENIX Security 23), Anaheim, CA, USA.
42. Luo, C., Li, P., and Meng, W. (2022, January 7–11). Tchecker: Precise static inter-procedural analysis for detecting taint-style vulnerabilities in php applications. Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security, Los Angeles, CA, USA.10.1145/3548606.3559391 ↗
43. Huang, J., Li, Y., Zhang, J., and Dai, R. (2019, January 24–27). UChecker: Automatically detecting php-based unrestricted file upload vulnerabilities. Proceedings of the 2019 49th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), Portland, OR, USA.10.1109/DSN.2019.00064 ↗
44. PortSwigger (2025, February 17). Burp Suite. Application Security Testing., Available online: https://portswigger.net/burp.
45. Acunetix (2025, February 17). Acunetix Web Vulnerability Scanner. Available online: https://www.acunetix.com/.
46. HCL (2025, February 17). HCL AppScan. Available online: https://www.hcl-software.com/appscan.
47. OWASP (2025, February 17). OWASP Zap. Available online: https://www.zaproxy.org/.
48. Chang, Z. (2022, January 11–13). A survey of modern crawler methods. Proceedings of the 6th International Conference on Control Engineering and Artificial Intelligence, Virtual Event, Japan.10.1145/3522749.3523076 ↗
49. Stafeev, A., and Pellegrino, G. (2024, January 14–16). SoK: State of the Krawlers–Evaluating the Effectiveness of Crawling Algorithms for Web Security Measurements. Proceedings of the 33rd USENIX Security Symposium (USENIX Security 24), Philadelphia, PA, USA.
50. Foley, M., and Maffeis, S. (2022, January 9–11). HAXSS: Hierarchical reinforcement learning for XSS payload generation. Proceedings of the 2022 IEEE International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom), Wuhan, China.10.1109/TrustCom56396.2022.00031 ↗
51. A Word Embedding Based Approach for Focused Web Crawling Using the Recurrent Neural Network
52. Dharmaadi, I.P.A., Athanasopoulos, E., and Turkmen, F. (2025). Fuzzing frameworks for server-side web applications: A survey. Int. J. Inf. Secur., 24.10.1007/s10207-024-00979-w ↗
53. Hassanshahi, B., Lee, H., and Krishnan, P. (2022, January 15–18). Gelato: Feedback-driven and guided security analysis of client-side web applications. Proceedings of the 2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), Honolulu, HI, USA.10.1109/SANER53432.2022.00079 ↗
54. Effective and scalable black-box fuzzing approach for modern web applications
55. Yang, W., Wang, E., Gui, Z., Zhou, Y., Wang, B., and Xie, W. (2025). An MLLM-Assisted Web Crawler Approach for Web Application Fuzzing. Appl. Sci., 15.10.3390/app15020962 ↗
56. Li, P., and Zhang, M. (2024, January 14–18). Fuzzcache: Optimizing web application fuzzing through software-based data cache. Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, Salt Lake City, UT, USA.10.1145/3658644.3670278 ↗
57. Yuan, Y., Lu, Y., Zhu, K., Huang, H., Chen, Y., and Zhang, Y. (2024). sqlFuzz: Directed Fuzzing for SQL Injection Vulnerability. Electronics, 13.10.3390/electronics13152946 ↗