Thireus' Bl0g

Tag: hosts

Untrusted Hosts Blocker – Block Ads, Spies, Tracking and Untrusted Hosts on iPhone/iPad/iPod Touch

by on Feb.27, 2012, under  iOS,  JailBr3ak. 55,946 views

Thireus Repository

Today I released a FireWall package on Thireus Cydia Repository… Untrusted Hosts Blocker

Do you know that iOS applications can track you and steal data from your device? These information are transmitted behind your back to online hosts. Now say STOP to ads, spies, tracking and untrusted hosts on your JailBroken iPhone/iPad/iPod Touch. Have a quick look here.

Update: 1.5.1 update is out! Hosts are now redirected to 0.0.0.0 which is more efficient than 127.0.0.1. (Thanks to zeflash for the report ;-) )

Update: 1.6 update is out! winhelp2002 list updated + hosts from user requests + special list from Nervous94 (blocking various Cydia ads).

Description

Block more than 16,000 blacklisted hosts! This is not just a classic adblocker but a powerful FireWall for confidentiality and security purpose. This package will add all blacklisted hosts to your /etc/hosts file. If you are unhappy with this hack, you can uninstall this package, all installed entries will be automatically removed.

Untrusted Hosts Blocker

If you want to add more hosts or delete some, feel free to contact me.

How do I install this package?

Add Thireus Repository http://repo.thireus.com/ to Cydia and install the package named “Untrusted Hosts Blocker“.

Is it safe?

Hosts entries have been validated by myself. Most of these hosts are from the work of winhelp2002 and 0th3lo, some blacklisted hosts are from me. The provided hosts modifications have been used by myself for years on my iPhone 3GS and MacOS X. Most of the blacklisted hosts have been manually tracked and classified as untrusted or dangerous.

All entries redirect the traffic to 127.0.0.1 0.0.0.0, there is only one exception (74.208.10.249 gs.apple.com).

I took the time to monitor common iOS apps (about 30) to check if more hosts must be added and if the current FireWall rules do not affect the functioning of applications. Then, I packaged everything for you :-)

You are free to uninstall this package. Uninstallation can take up to 3 minutes and remove all added entries to restore your hosts file ;-)

Why should I install it?

This FireWall is designed to block all hosts classified as untrusted or dangerous.

Some information an App Store application can steal:

  • Mobile phone number
  • App ID
  • UDID
  • iPhone model
  • Firmware
  • Text Messages
  • All Incoming & Outgoing Call Logs
  • Pictures
  • GPS Location (Tracking)
  • Contacts
  • etc.

These information are transmitted online (during the use of the application), for advertising, to track you or to do nasty things behind your back.

The purpose of ‘Untrusted Hosts Blocker‘ is to block most of the hosts that request these information and provide an adblocker for your iDevice.

For your security and confidentiality I recommend you to install this package.

Incoming search terms:

6 Comments :, , , , , , , , , , , , , , , , , , , , , , , , , , , , more...

Common iOS JailBreak Issues – Restoration Fails or Hangs, Location Service causing Signal and WiFi Loss, Fix Push Notifications, Fix GPS, Downgrade BaseBand 06.15.00 to 05.13.04

by on Feb.22, 2012, under  iOS,  JailBr3ak. 22,356 views

Fix iOS 5 Issue

JailBreaking is easy, but you can face many issues before and after the process. Let’s see how to fix some of them…

It was friday night :-) , I was playing with my old iOS 5.0.1 JailBroken 3GS device, and did something nasty installing bad Cydia packages. My iPhone  never booted up again after this. It was totally down, frozen on the Apple boot logo. Backups were too old, this time I knew I had to make a fresh new install of my iDevice :-( .

This article will not describe how to jailbreak your iPhone. iClarified has very nice and easy tutorials for beginners to JailBreak iDevices. This article can help you to fix the following issues:

  • Restoration fails on iTunes before starting anything on your iDevice.
  • Restoration hangs on iTunes at 99% of the restoration process.
  • Activating iOS location service causes dropped signal and WiFi loss.
  • No Push notifications.
  • Downgrade BaseBand 06.15.00 to 05.13.04

So, let me present your here some big issues I faced during the iOS 5.0.1 JailBreak process using redsn0w on MacOS 10.7.2 for my iPhone 3GS (iPad baseband 06.15.00). Most of them are easy to solve, but good solutions are hard to find on the Internet. I found some using my own brain and others after seeking for a while on various JailBreak forums.

Issue #1 (Before JailBreak, solved): Restoration fails on iTunes before starting anything on your iDevice.

This issue is most of the cases related to your network configuration. Apple needs to check, before any restoration process, if the firmware (.ipsw) you uses is valid. If your FireWall blocks these requests, the restoration process cannot begin.

Restoration fails before starting, why ?

The easiest solution is thus to temporarily deactivate your FireWalls and rename your hosts file.

sudo mv /etc/hosts /etc/hosts.jailbreak.bak

After JailBreak, do not forget to reactivate your FireWalls and move back your hosts file.

sudo mv /etc/hosts.jailbreak.bak /etc/hosts

If  you do want to keep your FireWall and hosts file in place, just check that “gs.apple.com” is not blocked.

Issue #2 (Before JailBreak, solved): Restoration hangs on iTunes at 99% of the restoration process.

This is due to an USB communication issue. iTunes is waiting for your iDevice to be plugged on your Mac. But this never happens because your iDevice is already plugged in and waits for iTunes next instructions.

There are many solutions to fix it using softwares. The easiest and fastest I’ve found is to launch DiskAid. This software will catch your iDevice USB communication, and give it back to iTunes quickly. So iTunes will display a “Connection Failed” error but will retry and send final instructions on your iDevice.

Watch this video if you are unsure what to do:

You cannot simply unplug and plug again your iDevice. This will cause your iPhone to be stuck and you will need to restore it once again.

Issue #3 (After JailBreak, solved): Activating iOS location service causes dropped signal and WiFi loss.

This issue is due to a bad hacktivation. You will need to deactivate and re-activate your iDevice using SAM.

  1. First turn off location service.
  2. Use Cydia to install SAM even if you have activated with official SIM card. SAM is available on the Cydia repository http://repo.bingner.com.
  3. De-activate your iDevice with SAM.
  4. Re-run redsn0w with nothing checked (meaning uncheck Cydia installation checkbox). redsn0w will hacktivate and apply the fix during hacktivation.
  5. Go back to SAM after your iDevice booted up. Press “Revert Lockdownd to Stock”.
  6. Re-activate your iDevice with iTunes and official SIM or reactivate with SAM.
  7. Turn on location service, and check if the issue is gone (i.e. use Map for 30 seconds with location activated).

SAM tool

If it fails, do not hesitate to reboot your iDevice and repeat these steps till your iDevice is correctly activated. It took me maybe 3 or 4 activations via iTunes to finally have my iPhone activated and working correctly with location service.

Issue #4 (After JailBreak, solved): No Push notifications.

To fix push notifications, you have some packages on Cydia. This issue is also related to bad certificates received during the activation process.

If you want to know if Push is working, there is a simple free application on the App Store called iPusher.

iPusher Application

You can either fix Push notifications using the right Cydia Packages (type “fix push” in Cydia). Or use SAM once more :-) (better)

  1. Use Cydia to install SAM even if you have activated with official SIM card. SAM is available on the Cydia repository http://repo.bingner.com.
  2. Open SAM. Press “Revert Lockdownd to Stock”.
  3. Press the “De-activate (clear Push)” button with SAM.
  4. Re-activate your iDevice with iTunes and official SIM or reactivate with SAM.

Note:  There is a very great and illustrated tutorial to fix it using SAM on addictivetips.

You may also need to remove then reinstall all your applications which use Push notifications :-(

Issue #5 (After JailBreak, solved): Twitter Notifications not working.

FaceBook notifications are working great after applying “Issue #4” fix. But Twitter is totally quite :-( . I’m still investigating… but it is maybe due to the low activity of my Twitter account :-p

Edit: Twitter Push notifications are working when someone mentions you in a tweet.

Issue #6 (iOS 5.0.1 only, solved): PAC proxy ignored by Safari.

Under iOS 5.0.1 only, Safari totally ignores locally stored .pac proxy configuration. :-(

This is a new new restriction also available on Safari 5.1 under MacOS.

Two solutions:

  • You either, run a local server on your iDevice so that you can access your proxy configuration via http://localhost:7276/myproxy.pac (127.0.0.1 will not work, prefer using localhost hostname). Configure your network to use this URL instead of the local file:///private/var/mobile/pacdir/myproxy.pac adress you used to have into the “Auto Configuration” field of your network proxy settings.
  • Or you can host your file on an Internet server. If some people are in need, I can host .pac files. Just ask.

I don’t know yet which one is best. I think it is better to keep everything on the device.

Here is a quick Perl http proxy script (based on sburke black hole http server) that let you access your local myproxy.pac via http://localhost:7276/*:
#!/usr/bin/perl
# Time-stamp: "2005-08-19 01:17:45 ADT"
#
# desc{    pac http proxy server    }    sburke@cpan.org
#

use strict;
use IO::Socket qw(:DEFAULT :crlf);
use constant MY_PORT => 7276;
use constant DEBUG => 1;

my $pac_file_type = 'application/x-ns-proxy-autoconfig';
my $pac_file = "myproxy.pac";

my $no_bytes = (stat ($pac_file))[7];

print $pac_file;

{
    if(open(IN, "<$pac_file")) {
	local $/;
	$pac_file = join '',
	  "HTTP/1.1 200 OK", CRLF, "Content-Length: ", $no_bytes, CRLF,
	  "Content-Type: ", $pac_file_type, CRLF, CRLF,
	  <IN>;
	close(IN);
    }
}
#-----------------------------------------------------------------------------

my $quit = 0;
$SIG{'INT'} = sub {$quit = 1};

my $sock = IO::Socket::INET->new(
  Listen => 20,        LocalPort => shift(@ARGV)|| MY_PORT,
  Timeout => 60 * 60,  Reuse => 1,
) or die "Can't create listening socket: $!\n";

DEBUG and warn "Waiting for connections...\n";

my($session, $peer, $port);
while(!$quit) {
  next unless my $session = $sock->accept;
  if(DEBUG) {
    $peer = gethostbyaddr($session->peeraddr, AF_INET) || $session->peerhost;
    $port = $session->peerport;
    warn "Connection from [$peer\n,$port] at ", scalar(localtime), "\n";
  }

  #select($session);
  #++$|;
  #select(STDOUT);

  print $session $pac_file;
  close($session);
  DEBUG and print " (Closed)\n";
}

DEBUG and print STDERR "Byebye\n";
close($sock);
exit 0;

I keep you in touch on this thread How To Get Socks Proxy + SSH Tunneling To Work On A Jailbroken iPhone/iPod Touch/iPad. I’ll package everything and try to make things easier to use and configure.

Issue #7 (BB 06.15.00 only, solved): GPS Fix, Signal Issues Fix.

This solution is for iPhone 3 and 3GS users who upgraded their baseband to the iPad BaseBand 06.15.00 (in order to unlock their iPhone with ultrasn0w). Unfortunately, upgrading to the 06.15.00 breaks the iPhone’s GPS feature and is the source of many signal issues.

Fortunately MuscleNerd released a solution which is integrated in redsn0w now. iPhone users can now downgrade from 06.15 to 05.13.04. The 05.13.04 BaseBand version is unlockable with ultrasn0w ;-) .

https://twitter.com/MuscleNerd/status/214626056211140609

The full tutorial to downgrade from 06.15 is available on iClarified.

Final thoughts…

Thanks to anyone who worked hard on these fixes. A big thank to the Dev-Team for their tools and efforts on JailBreak.

My JailBroken and unlocked iPhone 3GS is now fully functional. I hope I helped some of you :-)

Do not hesitate to post comments for any questions or suggestions.
Maybe you have a better way to fix an issue, or you can suggest me an unmentioned issue.

Incoming search terms:

1 Comment :, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , more...

Tip – Quick Method To Scan Hosts Using ping

by on Nov.02, 2011, under Hack1ng, Netw0rk. 1,765 views

Assuming the router you’re connected to does not filter any IPv4 broadcasts, you can easily use ping to perform a quick scan of your network.

For example, if your network is 192.168.1.0/24:

ping 192.168.1.255

Will give you something like:

Thireus:~ thireus$ ping 192.168.1.255
 PING 192.168.1.255 (192.168.1.255): 56 data bytes
 64 bytes from 192.168.1.102: icmp_seq=0 ttl=64 time=0.087 ms
 64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.553 ms (DUP!)
 64 bytes from 192.168.1.152: icmp_seq=0 ttl=64 time=124.870 ms (DUP!)
 64 bytes from 192.168.1.102: icmp_seq=1 ttl=64 time=0.065 ms
 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.454 ms (DUP!)
 64 bytes from 192.168.1.152: icmp_seq=1 ttl=64 time=39.073 ms (DUP!)

Then arp will list you all MAC adresses associated to the IP that replied:

Thireus:~ thireus$ arp -a
 ? (192.168.1.1) at 0:14:8d:41:87:1a on en0 ifscope [ethernet]
 ? (192.168.1.102) at e3:7a:2b:79:55:11 on en0 ifscope [ethernet]
 ? (192.168.1.152) at e1:15:d6:55:34:12 on en0 ifscope [ethernet]
 ? (192.168.1.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]

Note: On Linux platform the -b option is required to perform a broadcast ping.

Incoming search terms:

Comments Off :, , , , , , more...

Thireus on Twitter