Because PhpNuke will filter GET request for some symbols, it will be wise to use POST
request for exploiting.
Remark 1 - this XSS case is by standard classification sql injection bug,
but because the script will display mysql errors for any user (not only for admin), we can "convert"
the sql injection to xss.
Remark 2 - when MySql version 4.1 will be widely used in future, then many "not so useful" sql injections,
including this one, can be used with full power - because of the "subselects" feature, not available in
current MySql versions. Why? Because if we can inject malicious code to sql sentence after "ORDER BY" or
after "LIMIT", then in current MySql versions, all we can do, is to fail the sql request. No UNION-s etc.
But in version 4.1 we can have something like this - "ORDER BY desc ASC LIMIT (SELECT pwd FROM
nuke_authors)...".
Sql injection
Not useful at all in this case, because we must have superadmin rights, but anyway - this bug needs to be
fixed...
{"id": "SECURITYVULNS:DOC:5904", "bulletinFamily": "software", "title": "[waraxe-2004-SA#007 - XSS and SQL injection bugs in 4nguestbook module for PhpNuke]", "description": "\r\n\r\n\r\n\r\n{================================================================================}\r\n{ [waraxe-2004-SA#007] }\r\n{================================================================================}\r\n{ }\r\n{ [ XSS and SQL injection bugs in 4nguestbook module for PhpNuke ] }\r\n{ }\r\n{================================================================================}\r\n \r\nAuthor: Janek Vind "waraxe"\r\nDate: 15. March 2004\r\nLocation: Estonia, Tartu\r\n\r\n\r\n\r\nAffected software description:\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n>From developer's infofile:\r\n\r\n4nGuestbook Version 0.92 (German & English & Finnish) for phpNUKE Version 6.5 - 6.9 (www.phpnuke.org)\r\nBy WarpSpeed (Marco Wiesler) (warpspeed@4thDimension.de) @ Sep/2oo3\r\nhttp://www.warp-speed.de @ 4thDimension.de Networking\r\n\r\nWith this addon/module for phpNUKE you can offer a comfortable guestbook\r\nto your users.\r\n\r\n- Admin: Edit, delete and managing the guestbook entrys\r\n- Admin: Generell Settings from Addon/Module\r\n- Admin: Settings: Allow NB-Code, HTML or Smilies ...\r\n- Admin: Settings: Only Members can post...\r\n- Preview of entry\r\n- Show IP or ID from poster (only for Admin)\r\n- Full Multilanguage support\r\n- And mutch more...\r\n\r\n\r\n\r\nVulnerabilities:\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n1. Cross-Site scripting aka XSS\r\n\r\nExample:\r\n\r\n\r\nhttp://localhost/nuke71/modules.php?name=4nGuestbook&entry=x[xss%20code%20here]\r\n\r\nBecause PhpNuke will filter GET request for some symbols, it will be wise to use POST\r\nrequest for exploiting.\r\n\r\nRemark 1 - this XSS case is by standard classification sql injection bug,\r\nbut because the script will display mysql errors for any user (not only for admin), we can "convert"\r\nthe sql injection to xss.\r\n\r\nRemark 2 - when MySql version 4.1 will be widely used in future, then many "not so useful" sql injections,\r\nincluding this one, can be used with full power - because of the "subselects" feature, not available in\r\ncurrent MySql versions. Why? Because if we can inject malicious code to sql sentence after "ORDER BY" or\r\nafter "LIMIT", then in current MySql versions, all we can do, is to fail the sql request. No UNION-s etc.\r\nBut in version 4.1 we can have something like this - "ORDER BY desc ASC LIMIT (SELECT pwd FROM\r\nnuke_authors)...".\r\n\r\n\r\n\r\n2. Sql injection \r\n\r\nNot useful at all in this case, because we must have superadmin rights, but anyway - this bug needs to be\r\nfixed...\r\n\r\nExample:\r\n\r\nhttp://localhost/nuke71/admin.php?op=NukebookEditEntry&nbid=-2%20UNION%20SELECT%20null%20/*\r\n\r\nand we have sql error:\r\n\r\nMySQL Error : Query Error\r\nError Number: 1222 The used SELECT statements have a different number of columns\r\n\r\n\r\n\r\n\r\n\r\nGreetings:\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n Greets to ulljobu, djzone, raider and to all IT freaks in Estonia!\r\n\r\n\r\n\r\nContact:\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n come2waraxe@yahoo.com\r\n Janek Vind "waraxe"\r\n\r\n---------------------------------- [ EOF ] ------------------------------------", "published": "2004-03-16T00:00:00", "modified": "2004-03-16T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "href": "https://vulners.com/securityvulns/SECURITYVULNS:DOC:5904", "reporter": "Securityvulns", "references": [], "cvelist": [], "type": "securityvulns", "lastseen": "2018-08-31T11:10:09", "edition": 1, "viewCount": 17, "enchantments": {"score": {"value": 1.8, "vector": "NONE", "modified": "2018-08-31T11:10:09", "rev": 2}, "dependencies": {"references": [{"type": "threatpost", "idList": ["THREATPOST:F3563336B135A1D7C1251AE54FDC6286"]}, {"type": "nessus", "idList": ["EULEROS_SA-2020-1318.NASL", "EULEROS_SA-2020-1323.NASL", "EULEROS_SA-2020-1314.NASL", "DEBIAN_DLA-2164.NASL", "FREEBSD_PKG_40194E1C6D8911EA808280EE73419AF3.NASL", "EULEROS_SA-2020-1299.NASL"]}, {"type": "openvas", "idList": ["OPENVAS:1361412562311220201314", "OPENVAS:1361412562311220201299", "OPENVAS:1361412562311220201323", "OPENVAS:1361412562311220201318", "OPENVAS:1361412562310892164"]}, {"type": "debian", "idList": ["DEBIAN:DLA-2164-1:52F3C"]}, {"type": "zdt", "idList": ["1337DAY-ID-34153", "1337DAY-ID-34159", "1337DAY-ID-34134"]}, {"type": "wpvulndb", "idList": ["WPVDB-ID:10149"]}, {"type": "kitploit", "idList": ["KITPLOIT:1907207623071471216"]}, {"type": "mssecure", "idList": ["MSSECURE:057ED5C1C386380F0F149DBAC7F1F6EF"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:156729"]}], "modified": "2018-08-31T11:10:09", "rev": 2}, "vulnersScore": 1.8}, "affectedSoftware": []}
{"rst": [{"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **104[.]236.13.168** in [RST Threat Feed](https://www.rstcloud.net/profeed) with score **10**.\n First seen: 2020-12-26T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **generic**.\nASN 14061: (First IP 104.236.0.0, Last IP 104.236.255.255).\nASN Name \"DIGITALOCEANASN\" and Organisation \"DigitalOcean LLC\".\nThis IP is a part of \"**digitalocean**\" address pools.\nASN hosts 3198609 domains.\nGEO IP information: City \"Clifton\", Country \"United States\".\nIOC could be a **False Positive** (Cloud provider IP).\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2020-12-26T00:00:00", "id": "RST:E795446B-5904-3EAC-9B6A-FE96E711F3D8", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: 104.236.13.168", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **198[.]23.173.157** in [RST Threat Feed](https://www.rstcloud.net/profeed) with score **22**.\n First seen: 2020-12-22T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **generic**.\nASN 36352: (First IP 198.23.164.0, Last IP 198.23.217.255).\nASN Name \"ASCOLOCROSSING\" and Organisation \"ColoCrossing\".\nASN hosts 231013 domains.\nGEO IP information: City \"\", Country \"United States\".\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2020-12-22T00:00:00", "id": "RST:034B1ED9-5904-383D-BF4D-BFC406B79FB2", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: 198.23.173.157", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **201[.]209.134.221** in [RST Threat Feed](https://www.rstcloud.net/profeed) with score **23**.\n First seen: 2020-12-24T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **generic**.\nASN 8048: (First IP 201.208.192.0, Last IP 201.211.255.255).\nASN Name \"CANTV\" and Organisation \"Servicios Venezuela\".\nASN hosts 6156 domains.\nGEO IP information: City \"Caracas\", Country \"Venezuela\".\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2020-12-24T00:00:00", "id": "RST:D8371A6B-5904-33E8-89F0-B89098E7CCED", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: 201.209.134.221", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **https://onedrive[.]live.com/download?cid=5012a067b5dec1df&resid=5012a067b5dec1df%21306&authkey=ahpivoukyerzcjy** in [RST Threat Feed](https://rstcloud.net/profeed) with score **57**.\n First seen: 2021-01-05T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **malware**.\nIt was found that the IOC is used by: **cloudeye**.\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2021-01-05T00:00:00", "id": "RST:7FDD0E14-5904-36F0-9CEB-D41568DBDFF7", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: https://onedrive.live.com/download?cid=5012a067b5dec1df&resid=5012a067b5dec1df%21306&authkey=ahpivoukyerzcjy", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-13T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **27[.]223.10.162** in [RST Threat Feed](https://www.rstcloud.net/profeed) with score **20**.\n First seen: 2020-04-09T03:00:00, Last seen: 2021-01-13T03:00:00.\n IOC tags: **generic**.\nASN 4837: (First IP 27.192.0.0, Last IP 27.223.255.255).\nASN Name \"CHINA169BACKBONE\" and Organisation \"CNCGROUP China169 Backbone\".\nASN hosts 537984 domains.\nGEO IP information: City \"Qingdao\", Country \"China\".\nIOC could be a **False Positive** (May be a Cloud provider IP).\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2020-04-09T00:00:00", "id": "RST:696B0D11-5904-3FBD-A57B-9F31FFDAAA63", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: 27.223.10.162", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **3h5r94d5[.]co** in [RST Threat Feed](https://rstcloud.net/profeed) with score **2**.\n First seen: 2019-12-15T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **spam**.\nDomain has DNS A records: 23[.]60.91.225,23.200.237.225\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2019-12-15T00:00:00", "id": "RST:5A3F6674-5904-3CF7-8578-52A99435AEB1", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: 3h5r94d5.co", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **3878896c72ed218[.]com** in [RST Threat Feed](https://rstcloud.net/profeed) with score **10**.\n First seen: 2020-12-22T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **generic**.\nIOC could be a **False Positive** (Domain not resolved. Whois records not found).\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2020-12-22T00:00:00", "id": "RST:9E703E57-5904-3366-AB2A-56038AD6D743", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: 3878896c72ed218.com", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **odhedvtjqvdorjb[.]xyz** in [RST Threat Feed](https://rstcloud.net/profeed) with score **10**.\n First seen: 2019-12-17T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **generic**.\nIOC could be a **False Positive** (Domain not resolved. Whois records not found).\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2019-12-17T00:00:00", "id": "RST:FB4D379D-5904-3115-BDB2-9A7420F0B08F", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: odhedvtjqvdorjb.xyz", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **116[.]202.0.237** in [RST Threat Feed](https://www.rstcloud.net/profeed) with score **10**.\n First seen: 2020-12-22T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **generic**.\nASN 24940: (First IP 116.202.0.0, Last IP 116.203.255.255).\nASN Name \"HETZNERAS\" and Organisation \"\".\nThis IP is a part of \"**hetzner**\" address pools.\nASN hosts 5118196 domains.\nGEO IP information: City \"\", Country \"Germany\".\nIOC could be a **False Positive** (Cloud provider IP).\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2020-12-22T00:00:00", "id": "RST:5D3064E1-5904-317C-A419-F7E9C3340D73", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: 116.202.0.237", "type": "rst", "cvss": {}}, {"lastseen": "2021-01-14T00:00:00", "bulletinFamily": "ioc", "cvelist": [], "description": "Found **bkfxsuf[.]tk** in [RST Threat Feed](https://rstcloud.net/profeed) with score **2**.\n First seen: 2019-12-15T03:00:00, Last seen: 2021-01-14T03:00:00.\n IOC tags: **spam**.\nDomain has DNS A records: 195[.]20.43.143\n[https://rstcloud.net/](https://rstcloud.net/)", "edition": 1, "modified": "2019-12-15T00:00:00", "id": "RST:060A6D95-5904-3A40-8237-D2C4380E07E7", "href": "", "published": "2021-01-15T00:00:00", "title": "RST Threat feed. IOC: bkfxsuf.tk", "type": "rst", "cvss": {}}]}