mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-15 01:17:36 +00:00
GitBook: [master] one page modified
This commit is contained in:
parent
01eced859f
commit
f2ef309097
1 changed files with 15 additions and 0 deletions
|
@ -127,6 +127,21 @@ When you have the **usernames** of teh users of the machine. Check the address:
|
|||
|
||||
\*\*\*\*[**LFI and RCE using php wrappers**](../../../pentesting-web/file-inclusion/)\*\*\*\*
|
||||
|
||||
### **password\_hash/**password\_verify
|
||||
|
||||
This functions are typically used in PHP to **generate hashes from passwords** and to to **check** if a password is correct compared with a hash.
|
||||
The supported algorithms are: `PASSWORD_DEFAULT` and `PASSWORD_BCRYPT` \(starts with `$2y$`\). Note that **PASSWORD\_DEFAULT is frequently the same as PASSWORD\_BCRYPT.** And currently, **PASSWORD\_BCRYPT** has a **size limitation in the input of 72bytes**. Therefore, when you try to hash something larger than 72bytes with this algorithm only the first 72B will be used:
|
||||
|
||||
```php
|
||||
$cont=71; echo password_verify(str_repeat("a",$cont), password_hash(str_repeat("a",$cont)."b", PASSW
|
||||
False
|
||||
|
||||
$cont=72; echo password_verify(str_repeat("a",$cont), password_hash(str_repeat("a",$cont)."b", PASSW
|
||||
True
|
||||
```
|
||||
|
||||
\*\*\*\*
|
||||
|
||||
## Code execution
|
||||
|
||||
**system\("ls"\);
|
||||
|
|
Loading…
Reference in a new issue