Device security - Hero, G2 Touch General

If keeping your Android free from software that spies on you and your data is important to you, you might want to consider an occasional check.
Get a terminal emulator from the market an load it on your phone.
Open the terminal app and become super user:
Code:
su
Then enter
Code:
netstat -taupe
What follows will be a list of open net connections with IP addresses, both local and foreign. Sometime the process controlling the connection is also given - but not always.
Look over the foreign addresses. Any you are suspicious or unsure of, you can check on your PC.
In Linux open a terminal; in Windoze run cmd -w from the start menu to get a terminal window. Then issue a whois [IP ADDRESS] command. For example...
Code:
whois 209.85.229.102
The result will show information about the host for that IP address - in this example it turns out to be Google... probably one of the good guys... (but until the net neutrality issue is sorted the jury is still out).
So if you find a link to some unknown host belonging to a Internet Provider, in, say Brazil or China, that really has no business being connected to your phone, you may want to think about removing the app that added it, or asking its developer some serious questions.
It might be an idea to run this kind of check fairly often and especially after loading hacks of proprietary applications.

Related

Set Wi-Fi Identity

Ok might be being a bit think here, but how can (or is it possible) to set the WiFi identity of the phone?
When I look at my router the laptops all are listed with "name" and MAC and then IP number apart from the Hero, which just has a blank space where the "name" should be.
So can this be fixed?
A bit of background which you might already know. DHCP is used to initialise the network interface & involves a conversation between the router running a dhcp server & your device, the client. On Android, the dhcp client is dhcpcd.
You want to set the hostname used by your wifi interface prior to dhcpcd doing its stuff. This can either be done from an init script via the hostname <name> command (which by default is probably using the name localhost) or by passing the -h <name> command line option to the invocation of dhcpcd.
By default dhcpcd will use the hostname (though if it's blank or localhost, it is obviously ignored, probably by dhcpcd rather than by the dhcp server), but the -h option will override this.
This name is passed to the dhcp server early on in the conversation.
Incidentally, the same protocol allows the dhcp server to tell the device what name to use. You might be able to configure your router to assign a name based on mac address. Usually if the dhcp server does this, dhcpcd will ignore it, the exception being if the existing hostname is localhost or blank, which does seem to be the case here.
So, how to configure this? Afraid it depends on your ROM. You need to look through /init.rc & any associated initialisation configuration. See if you can find where/if hostname is defined & where dhcpcd's commandline is specified. I don't like editing files in the boot partition directly, so personally I'd see if I can find some init script onto which I could tack an overriding hostname command. Of course this relies on it being invoked after any existing hostname command & before dhcpcd is started. You might need to experiment a bit.
Oh bugger there was me hoping it was as easy as "naming the computer" like you do in Windoze, I know I know that lots of complicated thing happen for you in the background but I dont fancy hacking around in anywhere to fix/sort this, it's not that important anyway
Lol, I know what you mean. Sometimes I start to look into something which I think will probably have a simple solution & then an hour later with twenty new tabs open in my browser I find myself thinking maybe I'll let someone else have a go at this
In this case, the best place to address it would be in kitchen of the ROM builder. You could ask whoever's responsible for the ROM you use to make it easier to configure the hostname. Failing that, they might at least be able to give you the location of an existing file which you can change. If you give it a shot, do post back. Someone else with the same question is bound to stumble into this thread eventually.

gtablet Device name on the network

Does anyone know how to change the device name on the gtablet? I now have the ablilty to hook me gtablet up to my corporate network, so I went into the DHCP server to make a reservation for the device the name that it displays is andoid_XXXXXXXXXXXXXXXXX.mydomain.com replace the X with Hex numbers and letters. I would like to change the name on the device so that other admins know what the device is and don't delete if from the reservation pool.
i was thinking
IpadCrusher.mydomin.com
I too would like to know how to change the hostname (device name).
Viper Tablet
greyspacealien said:
Does anyone know how to change the device name on the gtablet? I now have the ablilty to hook me gtablet up to my corporate network, so I went into the DHCP server to make a reservation for the device the name that it displays is andoid_XXXXXXXXXXXXXXXXX.mydomain.com replace the X with Hex numbers and letters. I would like to change the name on the device so that other admins know what the device is and don't delete if from the reservation pool.
i was thinking
IpadCrusher.mydomin.com
Click to expand...
Click to collapse
I still like Viper Tablet for the Viewsonic VEGAn build when ever it goes final!
I would also like to know. I keep getting hassled by my Network Admins because every time I load a new ROM, the "xxxxx" changes and it looks like a new device. Same thing happens with my HTC Incredible Phone.
I'm jealous because I can't even logon to my works corporate network. Device keeps failing to assign an i.p address.
I get connected via wifi if I assign a static address, but android doesn't support http proxy or something, so the username/logon screen never comes up
greyspacealien said:
Does anyone know how to change the device name on the gtablet? I now have the ablilty to hook me gtablet up to my corporate network, so I went into the DHCP server to make a reservation for the device the name that it displays is andoid_XXXXXXXXXXXXXXXXX.mydomain.com replace the X with Hex numbers and letters. I would like to change the name on the device so that other admins know what the device is and don't delete if from the reservation pool.
i was thinking
IpadCrusher.mydomin.com
Click to expand...
Click to collapse
If you are rooted and have a robust busybox installed, after reboot you could execute the following command:
busybox hostname YourDevice
You could setup a gscript script and run it before you turn on your wifi or download autostart and have your script run automatically after a reboot.
Your network admins actually allow this thing on your corporate network?? Oh my.
In Linux, the computer name is stored in the /etc/hosts file. You might try editing your hosts file and put in:
127.0.0.2 name.site name
NMCBR600 said:
In Linux, the computer name is stored in the /etc/hosts file. You might try editing your hosts file and put in:
127.0.0.2 name.site name
Click to expand...
Click to collapse
If you get a fixed IP address or one with reservation each time you connect to your wifi router, this may work.
I have a home built dd-wrt wireless distribution system at home and was playing with the hosts file to see how my wds interpreted hosts file and it didn't work but that is just my homegrown system. my 2wire router didn't interpret it either (gave the random android_xxxxxxxxxxx device name.
Of course, you could just give them the MAC address of your wireless card which you can get by doing #busybox ifconfig in a terminal session and tell them the name you want and they can create an Arec in the dns names.
roebeet said:
Your network admins actually allow this thing on your corporate network?? Oh my.
Click to expand...
Click to collapse
Actually, no. However, connecting to MS Exchange with Sync logs the Device ID into Exchange. So, each time I load a different ROM, I log a new ID. Drives them nuts.
I did some research today though and found an app called Android ID Changerthat will allow me to see my DeviceID and modify it. I reinstalled my orginal ROM, recorded the ID, reloaded Vegan and changed the ID to the original device information. Works very well.
I found this post in another forum that may work for you:
http://forum.xda-developers.com/showpost.php?p=9560696&postcount=1
Please note that if you do use setprop you would have to reset it after each reboot. I think adding a correlating line in build.prop (if one exists) would be a better alternative. Otherwise, they discuss unpacking/repacking the boot.img to make it permanent.
roebeet said:
Your network admins actually allow this thing on your corporate network?? Oh my.
Click to expand...
Click to collapse
I am one of the net admins
I wouldn't say its on the corprate network, its on the corprate wireless network, I can get to the web and the intranet but that is about it we have it pretty locked down. I have it teathered to my phone most of the day. Its fun to take it to a meeting and have all of the iPad users say is that the new iPad I just laugh and think YOU WISH.
Roebeet I know I have talked about this before with you, I like you would like to get my usb air card working on this bad boy that would solve all fo my connections issues. Im not the smartest guy with linux but I could spend some time if I could find some info about it.
I had found this site a while ago but could not get the drivers to install I'm sure its because we don't have source code.
http://sierrawireless.custhelp.com/...ting-system-?-(-v.1.7.34)#Driver_Installation

[IDEA/POLL] Use C2DM app for remote phone access

These apps allow you to remotely access your phone from a web browser. However, they all run a web server on the phone, and I cannot connect to any of the over 3g (Verizon).
LazyDroid Web Desktop
Remote Desktop
Remote Web Desktop
I want to move the web server off phone, and (hopefully) onto private sites.google.com site. App Engine might be necessary, but I'm hoping this could be done solely in JS.
The hosting site would provide the UI, and interact with the phone using C2DM (the magic that powers Chrome2Phone, GMail, and installing apps from the web Market).
The UI is pretty obvious. It just needs a whiz to create HTML, Javascript, etc.
The C2DM backend is a still a bit mystifying to me... and searching for c2dm and javascript does not yield any obvious working implementations. But it seems plausible. Push a command to the phone, phone returns/uploads data to website, and UI updates.
Then there is the Android end. Well, there are the 3 projects above, Tasker for a quasi-hackish approach, and RPC (promising, but it seems like a WIP).
Thoughts? Volunteers? Geniuses?
Ooo... 2 birds with one stone!
This would also kill 2 birds with one stone.
No more typing in dynamic IP addresses! You get to use DNS to handle the connections. Bookmark your site in your desktop browser (it is always the same!). And set a preference in the Android app.
On lazydroid i've in planning some kind of trick that will let you connect behind firewall ... similar to a vpn...
CloudsITA said:
On lazydroid i've in planning some kind of trick that will let you connect behind firewall ... similar to a vpn...
Click to expand...
Click to collapse
I tried it again last week, and it is still unsuccessful. Webkey is currently the only application that I can successfully use to reach my phone.
Now, I could be wrong, but I believe all of these apps run a web server on the phone. I get a lovely, private 10.x.x.x IP address, which I can't reverse the route to. I have tried and failed to get DynDNS to work.
I have been looking into a solution since my original post. I have not had any time to do code squat, but I have loosely figured out all of the parts.
The big architectural difference I have been seeking is removing the server from the phone. I am not an Android expert, but I don't believe it even requires a running service. (Thank you, C2DM.)
With the app-webservice separation, you can work a "protocol" that reduces the overall bandwidth used... and thus improve battery life. Put all the "hard work" on a webserver, and (things get fuzzy here) possibly push it off onto the client browser (JS).
C2DM Browser Links
I could probably make something like WebKey but with C2DM and some more features. If you want you can give suggestions and I'll start making on saturday (after my exams). It would probably be possible in javascript for the actual sending from server and php just for logging in to your google account. The phone would just be registered on the server and no services (just as you wanted )
nebkat said:
I could probably make something like WebKey but with C2DM and some more features. If you want you can give suggestions and I'll start making on saturday (after my exams). It would probably be possible in javascript for the actual sending from server and php just for logging in to your google account. The phone would just be registered on the server and no services (just as you wanted )
Click to expand...
Click to collapse
I am not sure "more features" is necessarily the direction I'm headed. I am focused on making a "seamless" experience (i.e. less separation of phone and computer).
I was headed to App Engine (Python bias + easy Google integration). I have a project created. I haven't pulled together the various examples to make the core, but it seems <naive>simple</naive>. Stir in some templates, CSS, a sprinkling of JS, and voila!
The big "tricky" part that I can't convert from f***ing magic to a clear approach is the data link in the server. I want to avoid any storage to a Google disk, or otherwise, even temporarily. No stored data = easy privacy policy.
nebkat, if you're really chomping at the bit to code, here's my Android client concept.
- C2DM is a wake-up call. (cheat an borrow ChromeToPhone's ID to begin with)
- Connect to web server, send "I'm here," and wait for further instructions (Channels API/Comet/AJAX/.........)
- make the command set extensible
- each command is blockable in the client. (Permission control is set on the phone, not remotely.)
- After N minutes of no activity, send a "good bye," disconnect from the server, and fade into the background.
Don't worry, I'm very experienced with the server side stuff and I know exactly what you want. The only information stored on the sever side would be google account, the device c2dm registration id and some logging features just for statistics. A password could be set on the phone that would be sha512 hashed on the ajax request and would be sent to the phone. Even if a hacker found the hash, it would be useless without being logged in to the persons google account or knowing the server side auth token.
For now i'll just make the reciever, processor and command output and later on the extra security and ui stuff. It will work exactly the same way as Chrome2Phone except it will have server side php and the different commands. The connection from pc to phone will be something like this.
user command -> ajax request -> php c2dm request -> phone
phone -> php server http request -> controller page status
BTW I'm saving up for a Nexus S, how much would people pay for this type of app? There would definitely be a free version, but I just need to get the Nexus S because I have a Galaxy Spica now and it isn't the best for app development. I'm new to how stuff at xda works, would a donate version get me enoguh for the Nexus?
nebkat said:
Don't worry, ... <snip> ... auth token.
Click to expand...
Click to collapse
Alrighty then. I'm feeling like I can stop contemplating implementing this.
BTW I'm saving up for a Nexus S, how much would people pay for this type of app? There would definitely be a free version, but I just need to get the Nexus S because I have a Galaxy Spica now and it isn't the best for app development. I'm new to how stuff at xda works, would a donate version get me enoguh for the Nexus?
Click to expand...
Click to collapse
Since I was learning the ins and outs of App Engine, I read their quota rules and realized if this were popular it would require funding. I don't know where you are going to your web server, but I assume you'll have to pay someone to keep it running. But I had thought about $$$ already.
"Give away the razor, and sell them the blades."
Make the app free, no feature restrictions.
You get your money through various "membership" levels on the server. (See the account levels at fastmail.fm for an example.) So, you can use the app for free, but you only get, say, 2-3 MB of traffic per day, and only X sessions per day. Need more? See the pricing chart.
user command -> ajax request -> php c2dm request -> phone
phone -> php server http request -> controller page status
Click to expand...
Click to collapse
user command -> php server http request -> phone
phone -> php server http request -> controller page status
user command -> php server http request -> phone
lather, rinse, repeat.
C2DM is not deterministic, and acts up in low signal conditions. So, I made a decision to only use C2DM to initiate a session. Once both ends are connected to the server, everything goes over HTTP.
Oh.... and not that we need another Lookout/Phone Finder, but a shared-secret SMS code for the case where "they" have shut down the data connection.
I have my own server nebkat.com and there is nothing on it anyway.
The only other way to make "push" requests to the phone is with WebSockets. It would probably be better than c2dm because we have full control over what gets sent (google limits some requests). The advantage of WebSockets is that they send no header information which means that we could send our messages in 20 to 30 bytes.
I'll look into more detail on friday.
With web sockets won't you need to ensure the phone has a routable, external IP address? I know, for one, t-mobile does not expose an external IP address for their phones. Unless, of course, if the phone is connected over WiFi. C2DM works great for me (I have used a couple of apps with it and it is really useful).
MrGibbage said:
With web sockets won't you need to ensure the phone has a routable, external IP address? I know, for one, t-mobile does not expose an external IP address for their phones. Unless, of course, if the phone is connected over WiFi. C2DM works great for me (I have used a couple of apps with it and it is really useful).
Click to expand...
Click to collapse
No, WS is server initiated and the ip address' shouldn't make a difference.
MrGibbage said:
With web sockets won't you need to ensure the phone has a routable, external IP address? I know, for one, t-mobile does not expose an external IP address for their phones. Unless, of course, if the phone is connected over WiFi. C2DM works great for me (I have used a couple of apps with it and it is really useful).
Click to expand...
Click to collapse
You need an valid external IP address if you are attempting to initiate contact with your phone, which is why the 4-5 apps I've mentioned do not work on carriers like t-mo and verizon.
But the phone can establish a connection, and the carrier NATs (or whatever) will handle the routing for outgoing and incoming data.
I think the right questions are: Will Verizon/T-Mo allow the ports and protocol for WebSockets? Do Android and desktop browsers implement the draft API correctly and consistently?
I like C2DM. I works well when you have a good connection. But there are 3 issues with it.
1) The message size limit is 1024 bytes. Not ideal for file transfers.
2) In a poor signal areas, since the service retries sending messages, you will get delayed and/or duplicate messages. I work in a large "concrete" building, so I get this behavior often enough that I don't want to rely on it.
3) I believe there is a limit on the number of messages you can send. So, hunting around the filesystem could hit this limit (but unlikely in reality... I hope.)
It would be interesting to see exactly how those apps handle all of the data. Do they only use C2DM, or do they hand over to another protocol?
Ok my exams are over and I am starting with it. I'll give updates on this thread

[GUIDE] AR.Drone running on my Samsung Galaxy S2

Credits: I cannot take credit for the steps here. This is basically a version specifically for the SGS2 cobbled together by me after reading Shellware's excellent guide here: http://www.shellware.com/BlogEngine...ually-Infrastructure-Enable-Your-ARDrone.aspx. I bought their App to say thanks.
Note: The first time you run this it will seem like you are spending a long time to get it going. After you have done it once, it really takes only a few minutes to repeat. Also, Shellware have scripts that can be semi-permanently added to your AR.Drone to skip out the "laptop bit" but you may invalidate your warranty. See Shellware's site for more information about those.
Stage 1: First off, gather up everything you need:
Samsung Galaxy S2 (duh!)
AR.Drone (double duh!)
A telnet client program:
For the purpose of this guide, we will be using a free Windows tool called PuTTY. You can download it from here: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe. However, feel free to use any telnet client.
Most versions of Windows have one built in. In Windows 7, it is not installed by default so you need to add it manually using "Control Panel" > "Programs" > "Programs and Features" > "Turn Windows features on or off" > "Telnet Client".
A laptop with wi-fi on it
An AR.Drone client program from the Android Marketplace. ARDrone Demo (free by MeanyDev) and AR.Pro (Shell M. Shrader £3.09) have been tested.
NB: I don't think the SGS2 needs to be rooted - so no warranty issues. Mine is rooted, but only because I was trying to get adhocs working - which I couldn't!
NB2: The AR.Drone will not lose it's warranty as the changes you make are temporary.
Stage 2: Preparing your phone:
On your SGS2, go into "Settings", and then "Wireless and network"
Make sure Flight Mode is not turned on!
Scroll down to "Tethering and portable hotspot"
Select "Portable Wi-Fi hotspot settings"
Tick the box against "Portable Wi-Fi hotspot" and answer "Yes" to the prompt to "Disconnect Wi-Fi for using portable Wi-Fi hotspot". I guess you will only see this prompt if wireless is already turned on...
You should get a blue Wi-Fi Hotspot logo on the notification bar across the top.
Select "Configure portable Wi-Fi hotspot"
Give the hotspot a name, e.g., "GALAXY_HOTSPOT"
Set the Security to "Open"
Select "Save"
Stage 3: Fire up your laptop:
On your laptop, look for available wi-fi networks
Select and connect to your phone's hotspot - which should appear as "GALAXY_HOTSPOT" (or whatever you called yours)
**************************************
These next steps probably only need to be ran once as they are unlikely to change. I've tried it a few times and get the same results. I guess the chances are you will find the same address that I found.
**************************************
Once your laptop is connected to your phone's hotspot, you just need to double-check the IP address of your phone. To do this, open a command prompt by pressing the Windows key + R, or by clicking on the start button (or orb as it is now called), and selecting "Run...".
Enter "cmd" and press enter. A command prompt will open.
At the command prompt, type in "ipconfig" and press enter.
Look for the line that says "Default Gateway" under the heading of your wireless network adapter. You are looking for the default gateway of your current wireless connection - it should be something like this: 192.168.43.1. Make a note.
Stage 4: Laptop, say hello to AR.Drone:
Power up your AR.Drone. Waiting for the green lights to come on.
On your laptop, run your telnet program. In our example we are using PuTTY.
In PuTTY, select Telnet and enter the following IP address: 192.168.1.1 (this is the default IP address of the AR.Drone).
Click "Open" in PuTTY to reveal the telnet prompt.
**************************************
Your laptop is now talking to your AR.Drone!
**************************************
Copy and paste the following line into the telnet prompt. PLEASE NOTE: this is all one line - if your browser has wrapped it - be careful to select everything - the line starts with "killall" and ends with "up":
Code:
killall udhcpd ; iwconfig ath0 mode managed essid [COLOR=RoyalBlue][B]GALAXY_HOTSPOT[/B][/COLOR] ; ifconfig ath0 [B][COLOR=SeaGreen]192.168.43.[COLOR=Red]2[/COLOR][/COLOR][/B] netmask 255.255.255.0 up
**************************************
*IMPORTANT* before you press Enter on the keyboard, double check the IP address is correct and hotspot name is correct. In this example, the hotspot was called GALAXY_HOTSPOT. The last part of the IP address should be one number up from the IP address you noted down earler. If you noted 192.168.43.1, then on the telnet command line it should say 192.168.43.2. See how the "1" on the end is now a "2"? Don't miss this step out!
**************************************
Press Enter on the keyboard to run the command.
Your laptop will lose connection with your AR.Drone at this point because you have just told your AR.Drone to connect to your phone instead of your laptop! The session on your laptop might hang. Just close it down.
You are now finished with your laptop.
Stage 5: AR.Drone, say hello to your new best friend:
On your SGS2, fire up your AR.Drone client program and go into the settings to specify the IP address you entered on the telnet command line. In this case we used 192.168.43.2.
Hey presto your AR.Drone client should now work and away you go!
Be safe and have fun!
Let me know if this works for you!
Very nice!
Shell
It would be much nicer and easier if adhoc would work correctly on the sgs II. You may not void your system warranty but changing the drone fw in this manner voids the drone warranty according to them.
You are not altering the firmware. You are using tools provided within the host OS to implement a transient change. There are examples similar to this provided within the Parrot SDK. They can't release code samples exploiting functions then tell devs not to use them.
Apply my infrastructure mode patch and ship your drone to Parrot with it still installed.... That'll void your warranty. Reality is 95% of the time Parrot doesn't dig that deep and blindly reflashes over it.
We could also just as easily argue that the drone needs to support infrastructure networks.
Read the following and the consider it at the heart of the community supporting the AR.Drone on Android: "You don't truly own something until you've voided its warranty."
A warranty is getting voided in either case... you just need to come to terms with which device you want to target....
If you are not comfortable with these risks then this platform probably isn't the right one for you. Drop me a line providing the basic payment details you used when purchasing AR.Pro and I'll promptly issue a refund.
Sent from my GT-I9000 using Tapatalk
Hacked supplicant confirmed as functional on rooted stock S2
http://forum.xda-developers.com/showthread.php?t=1058319
Sent from my GT-I9000 using Tapatalk
I was successful using this guide with my galaxy s2, my ARdrone and an app called 'AR.Pro'.
The Drone settings are back to standard after pressing reset (and probably after power loss as well).
Thanks for posting the guide.
EDIT: I did not patch my drone, that's the reason the changes were non-permanent i think.

MAC Address Spoofing

Being overly paranoid I'm always trying to make it harder for companies to track my device. Anyway, my most recent discovery is spoofing the MAC Address on my 3T so that wifi companies can't track it.
*** This requires root ***
I have it working in Marshmallow 6.0.1 (not tried it in Nougat)
Only attempt this if you understand MAC Addresses and be sure to note down your original/official MAC Address. Open /persist/wlan_mac.bin and take a copy of the contents before attempting the below.
Some background reading if you're not familiar with MAC Addresses.
Code:
ifconfig wlan0
will tell you all you need to know about the current state of your wireless adapter
The first command generates a MAC Address. I've hardcoded the first 6 characters of mine and randomly generate the remaining 6. It should generate a perfectly valid address but please post if it doesn't (or you have a better bash line).
The second sed command is to replace the MAC Address in the persisted wlan file. It's this command that needs to run as root.
You should be able to run these in something like Termux (make sure you're running as root by running "su" first). I actually run them using Tasker as "Code/Run Shell" commands.
Finally you need to enable then disable Airplane Mode for the change to take affect.
Here are the commands:
Code:
MAC=C0EEFB$(od -txC -An -N3 /dev/random| tr -d ' ')
Code:
sed -i "/Intf0MacAddress=/c\Intf0MacAddress=${MAC}" /persist/wlan_mac.bin
Code:
settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true
Code:
settings put global airplane_mode_on 0; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false
Code:
ifconfig wlan0 | grep HWaddr
Why don't you write a shell script that saves the old mac address to a text file and then create the new one. And each time the user executes the shell script to spoof the mac address it appends to the existing log file in a new line the old mac address before changed again. That was if you ever need to revert it, you can look at the log file.
BTW, thanks for the share!
bealer said:
Being overly paranoid I'm always trying to make it harder for companies to track my device. Anyway, my most recent discovery is spoofing the MAC Address on my 3T so that wifi companies can't track it.
Click to expand...
Click to collapse
Can't we just use this?
https://play.google.com/store/apps/details?id=eu.chainfire.pryfi
knpk13 said:
Can't we just use this?
https://play.google.com/store/apps/details?id=eu.chainfire.pryfi
Click to expand...
Click to collapse
I dont think that it will work since our devices are F2FS i saw this on reddit the other day.
using a custom mac address
Newbie here. Just wondering how I could use a specific mac address instead of a random generated number.
Thanks in advance.
m0d hipp¥ said:
Why don't you write a shell script that saves the old mac address to a text file and then create the new one. And each time the user executes the shell script to spoof the mac address it appends to the existing log file in a new line the old mac address before changed again. That was if you ever need to revert it, you can look at the log file.
Click to expand...
Click to collapse
Yeah definitely things to improve,automating storing the original being one of them. I'll maybe follow up with that.
I didn't want to mask the main two commands too much with others around them. There are a few (older) ways to do this but this was the only way I could get it to work. And it's not a complete app/solution, more teaching a man to fish sort of thing.
knpk13 said:
Can't we just use this?
https://play.google.com/store/apps/details?id=eu.chainfire.pryfi
Click to expand...
Click to collapse
You can although
a) OP3T isn't listed as a supported device, I didn't try it
b) You can't automate it with that app very easily. Mine changes via Tasker state/events every day so I don't need to bother doing it myself.
gxyf106 said:
Newbie here. Just wondering how I could use a specific mac address instead of a random generated number.
Click to expand...
Click to collapse
Easiest way is just to change the first command and hardcode the MAC you want, ie
Code:
MAC=C0EEFB998877
Termux says
Sh: MAC: Not Found after running second command. Any idea what went wrong?
gxyf106 said:
Termux says
Sh: MAC: Not Found after running second command. Any idea what went wrong?
Click to expand...
Click to collapse
Ah oops, that's an error in me typing it out. The 2nd command should contain:
Code:
${MAC}
The brackets were causing it to try and evaluate MAC as a command (rather than a variable). I'll update the OP.
I can confirm this works. many thanks!!
Android is using randomized MAC adress when searching for wifi networks, this is not needed.
Michalko5896 said:
Android is using randomized MAC adress when searching for wifi networks, this is not needed.
Click to expand...
Click to collapse
As of 6.0 it was my understanding that Android uses a generated MAC for scanning/probing networks. But when actually making a connection, the real MAC is used (so as not to cause network issues). So this post is still relevant. I'm generating a new MAC every day or two as I use a number of public open wifi connections.
Also working on my hostname being random, and trying to stop all traffic on an open wifi network until my vpn is up.
Some might argue it's OTT, but I'd say it's just good practise (certainly the last point).
bealer said:
As of 6.0 it was my understanding that Android uses a generated MAC for scanning/probing networks. But when actually making a connection, the real MAC is used (so as not to cause network issues). So this post is still relevant. I'm generating a new MAC every day or two as I use a number of public open wifi connections.
Also working on my hostname being random, and trying to stop all traffic on an open wifi network until my vpn is up.
Some might argue it's OTT, but I'd say it's just good practise (certainly the last point).
Click to expand...
Click to collapse
Well, if you are concerned about your safety, don't connect to any Wi-Fi / BT devices that you don't trust.
Michalko5896 said:
Well, if you are concerned about your safety, don't connect to any Wi-Fi / BT devices that you don't trust.
Click to expand...
Click to collapse
The MAC address spoofing is more about privacy in terms of trying to be anonymous, making it *harder* to track where I connect etc...
Trust is a slightly more complex, non-binary issue.
bealer said:
The MAC address spoofing is more about privacy in terms of trying to be anonymous, making it *harder* to track where I connect etc...
Trust is a slightly more complex, non-binary issue.
Click to expand...
Click to collapse
MAC aadress is only used in local network, it does not go further than the very network you are connected to. What kind of advantage does MAC spoofing give you?
There's still your device ID, browser information and other stuff, that can actually reach the service you are connecting to.
Someguyfromhell said:
MAC aadress is only used in local network, it does not go further than the very network you are connected to. What kind of advantage does MAC spoofing give you?
There's still your device ID, browser information and other stuff, that can actually reach the service you are connecting to.
Click to expand...
Click to collapse
It stops wifi services tracking my phone. For example I use the wifi on the London Underground. Every time I connect to their wifi they'd know exactly where, when, how long, possibly my DNS requests just based on my MAC. It's all information that can be used for profiling or sold on (if that was part of the terms). They still may not known who I am exactly, but I'd rather they weren't able to identify/target me if it meant simply randomising my MAC. As mentioned Android already does this when scanning for networks.
Device Id isn't given, unless you mean hostname (which can be randomised too). If you're using HTTPS based websites then all browser traffic is encrypted via SSL. If you're not, then yeah it's possible to packet sniff your traffic (which is illegal), see what you're browsing, what your browser is, even part (but not all I believe) of your MAC etc...
Try Pry-Fi
Chainfire already has Pry-Fi for that. It has worked flawlessly for me.
first of all thank you for the commands but somehow this does not work with my Oneplus 3 (without T) on Sultans CM13. The address does not change after entering the commands, the commands do not show any error message.
Any advice?
Furthermore Pry-Fi seems to be able to change the MAC but it crashes sometimes and it seems to loose my saved WiFis. Furthermore i am not able to connect to my home AP after changing the MAC with Pry Fi. :-/
Someguyfromhell said:
MAC aadress is only used in local network, it does not go further than the very network you are connected to. What kind of advantage does MAC spoofing give you?
There's still your device ID, browser information and other stuff, that can actually reach the service you are connecting to.
Click to expand...
Click to collapse
Many public, free hotspots that require accepting terms on "walled garden" page today are tracking MAC address, DHCP-assigned IP address, and DHCP lease and active session time stamps. Example hotspots include Starbucks, hotels, etc. These hotspot network operator have logs to trace IPs back to MACs at a specific point in time until the logs are disposed.

Categories

Resources