Android Question How to hide IP address from my apk?

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I tried virustotal.com to scan my apk. This apk is a jRDC application.

After the scan result finished, under Behaviour Tab, on section IP Traffic, there are a list of IP addresses that my apk used.

These IP's addresses was not encryped. Is there a way to hide/encrypt these IP's addresses?
 

JohnC

Expert
Licensed User
Longtime User
If the scanner detected the IP addresses as plain text in your apk, then you should be able to use simple text encryption to convert the plain text IP addresses into encrypted characters instead of numeric IP strings.

But, if the scanner got those IP addresses by actually monitoring the live connections your app made to somewhere on the internet, then there is nothing you can do about that.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Thanks for your reply, will try to encrypt the ip in my app and try to submit it again to virustotal.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
You may also need to protect those endpoints with a password or API key and then make a connection to them using something like SSL to prevent man-in-the-middle snooping of the password or API key.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
You may also need to protect those endpoints with a password or API key and then make a connection to them using something like SSL to prevent man-in-the-middle snooping of the password or API key.
Care to tell me how to protect the end point with password?
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
If one of the endpoints are a web service, you can add a password parameter to it.

But if the endpoint is only the jRDC, then this thread might help:

 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
These IP's addresses was not encryped. Is there a way to hide/encrypt these IP's addresses?
Yes*

* - obfuscated

 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Yes*

* - obfuscated

I have already done that, this is the code on Main Activity
B4X:
Sub Process_Globals
    Public ConnSvr as String = "http:xxx.xxx.xxx.xxx:1000/rdc"
End Sub

But the IP address still visible.
Am I doing wrong here?

I am only submitted (online) my apk to virustotal.com, not run the app and let them scan it while the apk runs.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Have you compiled in obfuscated mode? The ip address will not appear as a string. You can see it in the generated java code.
Yes it is in obfuscated mode.

Here is the screen shot result after the scan
 

Attachments

  • ss.png
    ss.png
    64.2 KB · Views: 130
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
I use search function in B4A, that link was not found elsewhere, it was only in the Process Global Sub.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
<project folder>\Objects\src
Not found.

I deleted all comments that containts IP address, compiled again and submitted again to virustotal.com and it worked. No IP visible after the scan.

Made some changes, compiled and submitted again, after the scan, IP detected again.
Realy confused.
 
Upvote 0
Top