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")]
pub trait RsdService: Sized {
fn rsd_service_name() -> &'static str;
fn rsd_service_name() -> std::borrow::Cow<'static, str>;
fn from_stream(
stream: Self::Stream,
) -> 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?)
.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?;
if ssl {

View File

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

View File

@@ -41,11 +41,9 @@ use crate::{
message::AuxValue,
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
pub struct LocationSimulationClient<'a, R: ReadWrite> {
/// The underlying channel used for communication
@@ -61,7 +59,11 @@ impl<'a, R: ReadWrite> LocationSimulationClient<'a, R> {
/// # Returns
/// The client on success, IdeviceError on failure
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 })
}

View File

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

View File

@@ -37,12 +37,10 @@
use log::warn;
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};
const IDENTIFIER: &str = "com.apple.instruments.server.services.processcontrol";
/// Client for process control operations on iOS devices
///
/// Provides methods for launching, killing, and managing processes through the
@@ -65,7 +63,9 @@ impl<'a, R: ReadWrite> ProcessControlClient<'a, R> {
/// # Errors
/// * Propagates errors from channel creation
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 })
}

View File

@@ -164,7 +164,7 @@ impl RsdHandshake {
S: ReadWrite,
{
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,
None => {
return Err(IdeviceError::ServiceNotFound);