Obfuscate more Apple strings

This commit is contained in:
Jackson Coxson
2025-07-14 15:29:18 -06:00
parent 4b9d8a8fc7
commit f0c93e321e
7 changed files with 21 additions and 17 deletions

View File

@@ -67,7 +67,7 @@ pub trait IdeviceService: Sized {
#[cfg(feature = "rsd")] #[cfg(feature = "rsd")]
pub trait RsdService: Sized { pub trait RsdService: Sized {
fn rsd_service_name() -> &'static str; fn rsd_service_name() -> std::borrow::Cow<'static, str>;
fn from_stream( fn from_stream(
stream: Self::Stream, stream: Self::Stream,
) -> impl std::future::Future<Output = Result<Self, IdeviceError>> + Send; ) -> impl std::future::Future<Output = Result<Self, IdeviceError>> + Send;

View File

@@ -162,7 +162,9 @@ pub async fn flush_reports(
.start_session(&provider.get_pairing_file().await?) .start_session(&provider.get_pairing_file().await?)
.await?; .await?;
let (port, ssl) = lockdown.start_service("com.apple.crashreportmover").await?; let (port, ssl) = lockdown
.start_service(obf!("com.apple.crashreportmover"))
.await?;
let mut idevice = provider.connect(port).await?; let mut idevice = provider.connect(port).await?;
if ssl { if ssl {

View File

@@ -8,11 +8,11 @@ use log::debug;
use std::fmt::Write; use std::fmt::Write;
use tokio::io::{AsyncReadExt, AsyncWriteExt}; use tokio::io::{AsyncReadExt, AsyncWriteExt};
use crate::{IdeviceError, ReadWrite, RsdService}; use crate::{obf, IdeviceError, ReadWrite, RsdService};
impl<R: ReadWrite> RsdService for DebugProxyClient<R> { impl<R: ReadWrite> RsdService for DebugProxyClient<R> {
fn rsd_service_name() -> &'static str { fn rsd_service_name() -> std::borrow::Cow<'static, str> {
"com.apple.internal.dt.remote.debugproxy" obf!("com.apple.internal.dt.remote.debugproxy")
} }
async fn from_stream(stream: R) -> Result<Self, IdeviceError> { async fn from_stream(stream: R) -> Result<Self, IdeviceError> {

View File

@@ -41,11 +41,9 @@ use crate::{
message::AuxValue, message::AuxValue,
remote_server::{Channel, RemoteServerClient}, remote_server::{Channel, RemoteServerClient},
}, },
IdeviceError, ReadWrite, obf, IdeviceError, ReadWrite,
}; };
const IDENTIFIER: &str = "com.apple.instruments.server.services.LocationSimulation";
/// A client for the location simulation service /// A client for the location simulation service
pub struct LocationSimulationClient<'a, R: ReadWrite> { pub struct LocationSimulationClient<'a, R: ReadWrite> {
/// The underlying channel used for communication /// The underlying channel used for communication
@@ -61,7 +59,11 @@ impl<'a, R: ReadWrite> LocationSimulationClient<'a, R> {
/// # Returns /// # Returns
/// The client on success, IdeviceError on failure /// The client on success, IdeviceError on failure
pub async fn new(client: &'a mut RemoteServerClient<R>) -> Result<Self, IdeviceError> { pub async fn new(client: &'a mut RemoteServerClient<R>) -> Result<Self, IdeviceError> {
let channel = client.make_channel(IDENTIFIER).await?; // Drop `&mut client` before continuing let channel = client
.make_channel(obf!(
"com.apple.instruments.server.services.LocationSimulation"
))
.await?; // Drop `&mut client` before continuing
Ok(Self { channel }) Ok(Self { channel })
} }

View File

@@ -1,6 +1,6 @@
// Jackson Coxson // Jackson Coxson
use crate::{IdeviceError, ReadWrite, RsdService}; use crate::{obf, IdeviceError, ReadWrite, RsdService};
#[cfg(feature = "location_simulation")] #[cfg(feature = "location_simulation")]
pub mod location_simulation; pub mod location_simulation;
@@ -9,8 +9,8 @@ pub mod process_control;
pub mod remote_server; pub mod remote_server;
impl<R: ReadWrite> RsdService for remote_server::RemoteServerClient<R> { impl<R: ReadWrite> RsdService for remote_server::RemoteServerClient<R> {
fn rsd_service_name() -> &'static str { fn rsd_service_name() -> std::borrow::Cow<'static, str> {
"com.apple.instruments.dtservicehub" obf!("com.apple.instruments.dtservicehub")
} }
async fn from_stream(stream: R) -> Result<Self, IdeviceError> { async fn from_stream(stream: R) -> Result<Self, IdeviceError> {

View File

@@ -37,12 +37,10 @@
use log::warn; use log::warn;
use plist::{Dictionary, Value}; use plist::{Dictionary, Value};
use crate::{dvt::message::AuxValue, IdeviceError, ReadWrite}; use crate::{dvt::message::AuxValue, obf, IdeviceError, ReadWrite};
use super::remote_server::{Channel, RemoteServerClient}; use super::remote_server::{Channel, RemoteServerClient};
const IDENTIFIER: &str = "com.apple.instruments.server.services.processcontrol";
/// Client for process control operations on iOS devices /// Client for process control operations on iOS devices
/// ///
/// Provides methods for launching, killing, and managing processes through the /// Provides methods for launching, killing, and managing processes through the
@@ -65,7 +63,9 @@ impl<'a, R: ReadWrite> ProcessControlClient<'a, R> {
/// # Errors /// # Errors
/// * Propagates errors from channel creation /// * Propagates errors from channel creation
pub async fn new(client: &'a mut RemoteServerClient<R>) -> Result<Self, IdeviceError> { pub async fn new(client: &'a mut RemoteServerClient<R>) -> Result<Self, IdeviceError> {
let channel = client.make_channel(IDENTIFIER).await?; // Drop `&mut client` before continuing let channel = client
.make_channel(obf!("com.apple.instruments.server.services.processcontrol"))
.await?; // Drop `&mut client` before continuing
Ok(Self { channel }) Ok(Self { channel })
} }

View File

@@ -164,7 +164,7 @@ impl RsdHandshake {
S: ReadWrite, S: ReadWrite,
{ {
let service_name = T::rsd_service_name(); let service_name = T::rsd_service_name();
let service = match self.services.get(service_name) { let service = match self.services.get(&service_name.to_string()) {
Some(s) => s, Some(s) => s,
None => { None => {
return Err(IdeviceError::ServiceNotFound); return Err(IdeviceError::ServiceNotFound);