{"id":3234,"date":"2021-07-06T22:26:17","date_gmt":"2021-07-07T03:26:17","guid":{"rendered":"https:\/\/truxgoservers.com\/blog\/?p=3234"},"modified":"2021-07-06T22:26:19","modified_gmt":"2021-07-07T03:26:19","slug":"xss-attacks-a-fairly-common-threat","status":"publish","type":"post","link":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/","title":{"rendered":"XSS Attacks &#8211; A fairly common threat"},"content":{"rendered":"\n<p>XSS occurs when an attacker is able to inject a script, usually Javascript, into the output of a web application so that it runs in the client&#8217;s browser. The attacks are mainly caused by incorrectly validating user data, and are usually injected through a web form or through an altered link. In fact, these are one of the most frequent vulnerabilities in web applications. According to the OWASP Top 10, this vulnerability is found in around two-thirds (2\/3) of all applications. XSS attacks are a type of injection in which an attacker manages to execute code in the browsers of users accessing a legitimate website.<\/p>\n\n\n\n<p>The criticality of these vulnerabilities depends on the type of XSS and the information stored on the web page. We can generally talk about 3 types of XSS Attacks:<\/p>\n\n\n\n<p><strong><em>\u25b8XSS Mirrored<\/em><\/strong><\/p>\n\n\n\n<p>The application uses raw data, supplied by a user and encoded as part of the output HTML or JavaScript. An example of this type of XSS could be, if when entering JavaScript code in the search engine of a page.<\/p>\n\n\n\n<p><strong><em>\u25b8XSS Stored<\/em><\/strong><\/p>\n\n\n\n<p>The application stores data provided by the user without validating or sanitizing, which are later viewed by another user or an administrator.<\/p>\n\n\n\n<p><strong><em>\u25b8DOM-based XSS<\/em><\/strong><\/p>\n\n\n\n<p>The application processes user-controllable data in an insecure way. Similar to Reflected XSS, an example of this attack would be if we write JavaScript code in the URL and the web has a script that adds the URL without sanitizing as part of the HTML.<\/p>\n\n\n\n<p>As easy as an attacker can attack an unprotected website against Cross-Site Scripting attacks, a developer can defend against them. Prevention must always be taken into account even before writing the code itself.<\/p>\n\n\n\n<p>The most basic rule or policy to always keep in mind is simple: NEVER trust data that comes from users or any other external source. Any data must be validated or escaped for its output. The measures to be taken can be divided into three: data validation, data sanitization and output escaping.<\/p>\n\n\n\n<p>More reads:<br><a href=\"https:\/\/truxgoservers.com\/blog\/cyber-attack-on-jbs-giant-meat-company-on-the-aim\/\">Cyber attack on JBS \u2013 Giant meat company on the aim<\/a><br><a href=\"https:\/\/truxgoservers.com\/blog\/rowhammer-threat-attacks-ram-and-gpu\/\">RowHammer Threat Attacks Ram and GPU<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>XSS occurs when an attacker is able to inject a script, usually Javascript, into the output of a web application so that it runs in the client&#8217;s browser. The attacks are mainly caused by incorrectly validating user data, and are usually injected through a web form or through an altered link. In fact, these are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3235,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[36],"class_list":["post-3234","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity","tag-cybersecurity"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>XSS Attacks - A fairly common threat - Truxgo Server Blog<\/title>\n<meta name=\"description\" content=\"Today we will see how they work and what to do against XSS attacks, being one of the most common threats that we can find......\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"XSS Attacks - A fairly common threat - Truxgo Server Blog\" \/>\n<meta property=\"og:description\" content=\"Today we will see how they work and what to do against XSS attacks, being one of the most common threats that we can find......\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/\" \/>\n<meta property=\"og:site_name\" content=\"Truxgo Server Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-07T03:26:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-07T03:26:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2021\/07\/XXS.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1323\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Truxgo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Truxgo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/\"},\"author\":{\"name\":\"Truxgo\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#\\\/schema\\\/person\\\/8b409c26449db6aa09724b45331e333e\"},\"headline\":\"XSS Attacks &#8211; A fairly common threat\",\"datePublished\":\"2021-07-07T03:26:17+00:00\",\"dateModified\":\"2021-07-07T03:26:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/\"},\"wordCount\":355,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/XXS.jpg\",\"keywords\":[\"Cybersecurity\"],\"articleSection\":[\"Cybersecurity\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/\",\"name\":\"XSS Attacks - A fairly common threat - Truxgo Server Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/XXS.jpg\",\"datePublished\":\"2021-07-07T03:26:17+00:00\",\"dateModified\":\"2021-07-07T03:26:19+00:00\",\"description\":\"Today we will see how they work and what to do against XSS attacks, being one of the most common threats that we can find......\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/XXS.jpg\",\"contentUrl\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/XXS.jpg\",\"width\":2560,\"height\":1323},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/xss-attacks-a-fairly-common-threat\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"XSS Attacks &#8211; A fairly common threat\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/\",\"name\":\"Truxgo Server Blog\",\"description\":\"Cloud Server and Hosting Tutorials.\",\"publisher\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#organization\",\"name\":\"Truxgo Server Blog\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/cropped-truxgo-logo-blanco.png\",\"contentUrl\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/cropped-truxgo-logo-blanco.png\",\"width\":1250,\"height\":278,\"caption\":\"Truxgo Server Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/#\\\/schema\\\/person\\\/8b409c26449db6aa09724b45331e333e\",\"name\":\"Truxgo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g\",\"caption\":\"Truxgo\"},\"sameAs\":[\"https:\\\/\\\/truxgoservers.com\\\/blog\"],\"url\":\"https:\\\/\\\/truxgoservers.com\\\/blog\\\/author\\\/truxgo\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"XSS Attacks - A fairly common threat - Truxgo Server Blog","description":"Today we will see how they work and what to do against XSS attacks, being one of the most common threats that we can find......","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/","og_locale":"es_MX","og_type":"article","og_title":"XSS Attacks - A fairly common threat - Truxgo Server Blog","og_description":"Today we will see how they work and what to do against XSS attacks, being one of the most common threats that we can find......","og_url":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/","og_site_name":"Truxgo Server Blog","article_published_time":"2021-07-07T03:26:17+00:00","article_modified_time":"2021-07-07T03:26:19+00:00","og_image":[{"width":2560,"height":1323,"url":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2021\/07\/XXS.jpg","type":"image\/jpeg"}],"author":"Truxgo","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Truxgo","Tiempo de lectura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/#article","isPartOf":{"@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/"},"author":{"name":"Truxgo","@id":"https:\/\/truxgoservers.com\/blog\/#\/schema\/person\/8b409c26449db6aa09724b45331e333e"},"headline":"XSS Attacks &#8211; A fairly common threat","datePublished":"2021-07-07T03:26:17+00:00","dateModified":"2021-07-07T03:26:19+00:00","mainEntityOfPage":{"@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/"},"wordCount":355,"commentCount":0,"publisher":{"@id":"https:\/\/truxgoservers.com\/blog\/#organization"},"image":{"@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/#primaryimage"},"thumbnailUrl":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2021\/07\/XXS.jpg","keywords":["Cybersecurity"],"articleSection":["Cybersecurity"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/","url":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/","name":"XSS Attacks - A fairly common threat - Truxgo Server Blog","isPartOf":{"@id":"https:\/\/truxgoservers.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/#primaryimage"},"image":{"@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/#primaryimage"},"thumbnailUrl":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2021\/07\/XXS.jpg","datePublished":"2021-07-07T03:26:17+00:00","dateModified":"2021-07-07T03:26:19+00:00","description":"Today we will see how they work and what to do against XSS attacks, being one of the most common threats that we can find......","breadcrumb":{"@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/#primaryimage","url":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2021\/07\/XXS.jpg","contentUrl":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2021\/07\/XXS.jpg","width":2560,"height":1323},{"@type":"BreadcrumbList","@id":"https:\/\/truxgoservers.com\/blog\/xss-attacks-a-fairly-common-threat\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truxgoservers.com\/blog\/"},{"@type":"ListItem","position":2,"name":"XSS Attacks &#8211; A fairly common threat"}]},{"@type":"WebSite","@id":"https:\/\/truxgoservers.com\/blog\/#website","url":"https:\/\/truxgoservers.com\/blog\/","name":"Truxgo Server Blog","description":"Cloud Server and Hosting Tutorials.","publisher":{"@id":"https:\/\/truxgoservers.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truxgoservers.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/truxgoservers.com\/blog\/#organization","name":"Truxgo Server Blog","url":"https:\/\/truxgoservers.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/truxgoservers.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/08\/cropped-truxgo-logo-blanco.png","contentUrl":"https:\/\/truxgoservers.com\/blog\/wp-content\/uploads\/2020\/08\/cropped-truxgo-logo-blanco.png","width":1250,"height":278,"caption":"Truxgo Server Blog"},"image":{"@id":"https:\/\/truxgoservers.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/truxgoservers.com\/blog\/#\/schema\/person\/8b409c26449db6aa09724b45331e333e","name":"Truxgo","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/52691a61c58e68677ed4860007c1bb03b14eabe7350747ab3fad3e17825b4b96?s=96&d=mm&r=g","caption":"Truxgo"},"sameAs":["https:\/\/truxgoservers.com\/blog"],"url":"https:\/\/truxgoservers.com\/blog\/author\/truxgo\/"}]}},"_links":{"self":[{"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/posts\/3234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/comments?post=3234"}],"version-history":[{"count":3,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/posts\/3234\/revisions"}],"predecessor-version":[{"id":3247,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/posts\/3234\/revisions\/3247"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/media\/3235"}],"wp:attachment":[{"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/media?parent=3234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/categories?post=3234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truxgoservers.com\/blog\/wp-json\/wp\/v2\/tags?post=3234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}