Installing Malicious Programs

Hack Wars encourages the player to program their own scripts to use against opponents. Some of these scripts may be used maliciously for financial gain. One approach is to install a malicious application over an opponent’s Banking application.

Banking:
Creating a malicious deposit or withdraw script can redirect the funds of an opponent’s money transfer. A malicious deposit could redirect money to your bank account instead of your opponent’s; a malicious withdrawal redirects the opponent’s money to your petty cash.
The following sample program redirects 5% of an opponent’s Bank deposits to your Bank. Functional withdrawal and transfer scripts lower the risk of detection of your malicious installation:

In deposit:


float amount=getAmount();
float giveAmount=amount*0.95;
float stealAmount=amount*0.05;
string yourIP="xxx.xxx.x.xxx";
lowerDeposit(yourIP,stealAmount);
lowerDeposit(getSourceIP(),giveAmount); 

In withdraw:


withdraw(getSourceIP(),getAmount()); 

In transfer:


lowerTransfer(getTargetIP(),getAmount()); 


FTP:
A malicious FTP program could be used to steal files as an opponent attempts to upload the file to their Public FTP or Shop FTP directories. If written intelligently, this could be a way to acquire valuable files.

The following sample program steals a secret image from an opponent when they attempt to upload it to either the Public or Shop FTP:

In put:


if(equal(getFileType(),"image")){
  put(getMaliciousIP());//You set this when you select 
                        //the script as one of your attack parameters.
}else{
  put(getTargetIP());
} 

In get:



if(equal(getFileType(),"image")){
  put(getMaliciousIP());//You set this when you select 
                        //the script as one of your attack parameters.
}else{
  put(getTargetIP());
}