osy / Jitterbug

Launch JIT enabled iOS app with a second iOS device
Apache License 2.0
1.05k stars 84 forks source link

[Feature Request] use upnp for jit enabling #43

Open Spidy123222 opened 2 years ago

Spidy123222 commented 2 years ago

I've found a program that uses the jitterbug pair file system and utilizes upnp to sign altstore to the idevice. I am wondering if this can be utilized for non-paid developers to do on-device debugger attaching via libimobiledevice library jitterbug uses.

the only problem with this is that upnp is not the same on all routers and some routers have it disabled. For example, mine allows upnp but only permanent upnp requests and this repo uses timed upnp. from what I hear tho is you can set the time limit to 0 and it would work.

repo in question that could be utilized maybe: https://github.com/NyaMisty/AltServer-Linux

osy commented 2 years ago

The point of Jitterbug is if you don’t have access to a PC or Mac. If you do, you should use AltStore or AltJIT.

lonkelle commented 2 years ago

@osy I believe @Spidy123222 is suggesting using this technique so that Jitterbug only requires a UPNP enabled router (no Mac / windows / linux / altserver at all) and the iPhone is connected to it for it to enable AltJIT. Unless I'm misunderstanding something?

Spidy123222 commented 2 years ago

The point of Jitterbug is if you don’t have access to a PC or Mac. If you do, you should use AltStore or AltJIT.

Thing is this can be utilized in other networks not in your home network is what im saying. Also, not everyone has a pc on all the time and AltJIT is not reliable on windows at all at the moment (especially since Apple mobile device service dies within 10 minutes of activation or use). I've also encountered people where they use a friend's computer to install said jitterbug and then go home to use the app. From what i look up upnp doesn't require a paid developer account could be wrong though. It is essentially jitterbug vpn without the vpn and using upnp.

lonkelle commented 2 years ago

@osy I actually wrote a little bit about this back in July here on the AltStore Roadmap: https://trello.com/c/LrsvqUfo/183-feature-implement-upnp-support-directly-in-altstore-to-bypass-lockdownd-and-install-w-o-altserver

osy commented 2 years ago

Is this what you're proposing?

  1. Use UPnP to map port 62078 on your iOS device to the router (say it's 192.168.100.99)
  2. Now try to connect to your router's WAN (public) IP from your iOS device (e.x: 192.168.100.99 <-> 87.65.43.21)
  3. 87.65.43.21 reaches your router whose NAT entry for port 62078 is 192.168.100.99
  4. You've now "looped back" to your own device's lockdownd using your router's NAT.
osy commented 2 years ago

This is only useful if you have UPnP enabled. It's my understanding the most routers have it disabled by default now so I'm not sure how many people will get use out of it.

Spidy123222 commented 2 years ago

Is this what you're proposing?

  1. Use UPnP to map port 62078 on your iOS device to the router (say it's 192.168.100.99)
  2. Now try to connect to your router's WAN (public) IP from your iOS device (e.x: 192.168.100.99 <-> 87.65.43.21)
  3. 87.65.43.21 reaches your router whose NAT entry for port 62078 is 192.168.100.99
  4. You've now "looped back" to your own device's lockdownd using your router's NAT.

that is pretty much what i was saying. some new routers have it disabled by default on some but pre-existing ones dont. It is really dependent on what the router settings are but is an option for non-paid developers if possible. UPnP port mapping is still enabled by default in new devices. Gaming consoles still use UPnP to host games if they rely on it that way but less often. For security reasons it is still recommended disabling upnp but isnt required.

https://www.howtogeek.com/122487/htg-explains-is-upnp-a-security-risk/ https://www.upguard.com/blog/what-is-upnp

Spidy123222 commented 2 years ago

using UPnP you would need to compensate for different types of UPnP routers use like permanent UPnP and would need to remove the port map when done. Temporary/timed is simple enough though from what I know since it removes itself. Likely this would be best as a option to use.

lonkelle commented 2 years ago

This is only useful if you have UPnP enabled. It's my understanding the most routers have it disabled by default now so I'm not sure how many people will get use out of it.

@osy The most popular purchased router the Archer A7 has it on by default. But even if it's off by default, don't you see value in allowing your users to activate JIT with only a single device simply by toggling "UPNP On" in their router (once, set it and forget it)? Because it's proven, it works (as a PoC at least, you're one of the few with the skills to make it more than a "proof of concept" tho).