## 5 Evaluation
### Case Two: RSAAuth System  
The RSAAuth system, developed by us, provides user authentication from server to client. In the RSAAuth system, the client encrypts the user password with an RSA public key of the server, and then encodes it with Base64 to generate the sequence related to the password sent to the server. The server decodes the received sequence and then decrypts the decoded sequence with its RSA private key of the server. In the RSAAuth system, client-side implementation mainly contains DBAccess.java and UserBean.java file. Server-side implementation mainly contains MsgPjava file. We extracted the UserBean.java file from client-side implementations. Then, we generated dependencies of cryptographic functions based on extracted implementations, which were used to locate message tokens and reconstruct outputs of traced cryptographic functions. Meanwhile, we intercepted net-traces with Burp suite and parsed them to generate message tokens. Next, we located message tokens and reconstructed outputs using out-of-the-box re-execution. After that, we used the reconstructed outputs to replace located message tokens to generate constructed request messages. Finally, we intercepted and parsed response messages to generate the server model of security protocols to evaluate the security of RSAAuth. We found that RSAAuth is vulnerable to password brute force attack. The details of the procedure are as follows: the dependencies among cryptographic functions were generated (Figure 31) based on the UserBean.java file extracted from the client-side implementation. In Figure 31, \"_Jit0_\" is the encrypted object. Firstly, \"_Jit0_\" was encrypted through _Cipher.init ()_ and _cipher.doFinal ()_ to generate the ciphertext\"_[B@276 fa677\"_. Then, ciphertext was encoded with Base64 to generate the output \"_JV1 OivWWYW_****. The dependencies were mainly used to locate message tokens and reconstruct outputs of traced cryptographic functions. In order to get net-traces, firstly, registered user account information was used to log on the system. Then, communication messages were intercepted by Burp suite. The intercepted request and response messages are shown in Figures 32 and 33, respectively. Figure 30: Generated model of the QQ mail system server-side. Figure 31: Dependencies of cryptographic functions in RSAAuth client-side implementations. POST /tomcattest/LoginAction.jspHTTP/1.1  
Host: localhost:8081  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64;  
x64; rv:58.0) Gecko/20100101 Firefox/58.0  
Accept:  
text/html,application/xhtml+xml,application/xml;q=0  
.9,*/*/;q=0.8  
Accept-Language:  
zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3  
,en;q=0.2  
Referer:  
http://localhost:8081/tomcattest/Login.jsp  
Content-Type: application/x-www-form-urlencoded  
Content-Length: 195  
Cosokie:  
JSESSIONID=DCA35B91586E0705E17 BEB1B950 CF296C  
Connection: close  
Upgrade-Insecure-Requests: 1  
username=1 jt1@password=mNPQSULEpu4 Qdt1 pB@tTJxqZyTok  
12 hjh2 mF79 Dh1 GLw0 oHQSMUMhI243r2 BsJm/1p0z9 EiHbbcui  
1 LXw2 TRDV0X3 drscxMdxHRqL1 EpeH++4 JrUbJbfkbcaqeuWhcvm  
Id{VPkem02 ic7 VSoQkNFKKHKA4 ZEjjvrkrDm+UfbFd20=  
HTTP/1.1 200 OK  
Server: Apache-Coyote/1.1  
Content-Type: text/html;charset=utf-8  
Date: Wed, 21 Feb 2018 10:34:32 GMT  
Connection: close  
Content-Length: 58  
Figure 32: Request message. Figure 33: Response message. The value of the password was the message token that was replaced according to Figure 32. We reconstructed outputs of traced cryptographic functions using SPIA to replace the located message token. An example of the output is shown in Figure 35.  
We replaced the located token with the reconstructed output to generate the constructed request message (Figure 36). The server generated and sent a response message (Figure 37) to the client after the constructed request message was sent to the server. Figure 34: Result of token location. Figure 35: Reconstructed output of traced cryptographic functions. Figure 36: Constructed request message. The response message in Figure 37 was parsed by SPIA.