<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.theiphonewiki.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bellis1000</id>
	<title>The iPhone Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.theiphonewiki.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bellis1000"/>
	<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/wiki/Special:Contributions/Bellis1000"/>
	<updated>2026-08-06T14:07:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.14</generator>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=Hgsp4_patch&amp;diff=68490</id>
		<title>Hgsp4 patch</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=Hgsp4_patch&amp;diff=68490"/>
		<updated>2018-03-31T19:11:27Z</updated>

		<summary type="html">&lt;p&gt;Bellis1000: /* hgsp4 enabled jailbreaks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:hgsp4 patch}}&lt;br /&gt;
A '''hgsp4 patch''' (or '''host_get_special_port(4) patch''') is a kernel patch that enables any executable running as root to access the kernel task by calling '''host_get_special_port''' for host special port '''4''' (hence the name). This host special port is usually unused, and the kernel task port must be “mounted” there by an exploit.&amp;lt;ref&amp;gt;https://bazad.github.io/2017/09/live-kernel-introspection-ios/&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://github.com/iabem97/hermes/blob/master/hermes/disable_protections.c&amp;lt;/ref&amp;gt; It is thus recommended that host special port 4 be used solely for the kernel task port.&amp;lt;ref&amp;gt;http://www.newosxbook.com/forum/viewtopic.php?f=8&amp;amp;t=16641&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The hgsp4 route is equivalent to the [[tfp0]] route, and tools that rely on tfp0 can be recompiled to use hgsp4 instead.&amp;lt;ref&amp;gt;[https://twitter.com/panguteam/status/708330906084216833 @PanguTeam: For security researchers, calling host_get_special_port with 4 on jailbroken devices will give u kernel task port just like task_for_pid(0)]&amp;lt;/ref&amp;gt; In a tweet, tihmstar confirmed that this applies to [[kloader]] too.&amp;lt;ref&amp;gt;[https://twitter.com/tihmstar/status/945613035489644544 @tihmstar: kloader works fine with h3lix :) Thanks to @nyan_satan for sending me a compiled version which uses hgsp(4)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example code ==&lt;br /&gt;
The following example C program calls &amp;lt;code&amp;gt;host_get_special_port&amp;lt;/code&amp;gt; and, on success, returns a positive integer that can be checked using &amp;lt;code&amp;gt;echo $?&amp;lt;/code&amp;gt; in bash after running the test program:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;mach/mach.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
     mach_port_t kernel_task = 0;&lt;br /&gt;
     if (!host_get_special_port(mach_host_self(), HOST_LOCAL_NODE, 4, &amp;amp;kernel_task)) return -1;&lt;br /&gt;
     return kernel_task;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
-1 is returned on error. 0 is returned if no hgsp4 patch is enabled.&lt;br /&gt;
&lt;br /&gt;
== hgsp4 enabled jailbreaks ==&lt;br /&gt;
Jailbreaks known to enable hgsp4 include:&lt;br /&gt;
* [[Pangu9]] (9.1) on 64-bit&lt;br /&gt;
* [[Yalu#yalu_.2B_mach_portal_.2810.1-10.1.1.29|yalu+mach_portal]] (10.0-10.1.1) on 64-bit&lt;br /&gt;
* [[h3lix]] (10.0–10.3.3) on 32-bit&lt;br /&gt;
* [[Electra]] (11.0-11.1.2) on 64-bit&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[tfp0 patch]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Kernel Patches]]&lt;/div&gt;</summary>
		<author><name>Bellis1000</name></author>
		
	</entry>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=Hgsp4_patch&amp;diff=68489</id>
		<title>Hgsp4 patch</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=Hgsp4_patch&amp;diff=68489"/>
		<updated>2018-03-31T18:47:42Z</updated>

		<summary type="html">&lt;p&gt;Bellis1000: /* hgsp4 enabled jailbreaks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:hgsp4 patch}}&lt;br /&gt;
A '''hgsp4 patch''' (or '''host_get_special_port(4) patch''') is a kernel patch that enables any executable running as root to access the kernel task by calling '''host_get_special_port''' for host special port '''4''' (hence the name). This host special port is usually unused, and the kernel task port must be “mounted” there by an exploit.&amp;lt;ref&amp;gt;https://bazad.github.io/2017/09/live-kernel-introspection-ios/&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://github.com/iabem97/hermes/blob/master/hermes/disable_protections.c&amp;lt;/ref&amp;gt; It is thus recommended that host special port 4 be used solely for the kernel task port.&amp;lt;ref&amp;gt;http://www.newosxbook.com/forum/viewtopic.php?f=8&amp;amp;t=16641&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The hgsp4 route is equivalent to the [[tfp0]] route, and tools that rely on tfp0 can be recompiled to use hgsp4 instead.&amp;lt;ref&amp;gt;[https://twitter.com/panguteam/status/708330906084216833 @PanguTeam: For security researchers, calling host_get_special_port with 4 on jailbroken devices will give u kernel task port just like task_for_pid(0)]&amp;lt;/ref&amp;gt; In a tweet, tihmstar confirmed that this applies to [[kloader]] too.&amp;lt;ref&amp;gt;[https://twitter.com/tihmstar/status/945613035489644544 @tihmstar: kloader works fine with h3lix :) Thanks to @nyan_satan for sending me a compiled version which uses hgsp(4)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example code ==&lt;br /&gt;
The following example C program calls &amp;lt;code&amp;gt;host_get_special_port&amp;lt;/code&amp;gt; and, on success, returns a positive integer that can be checked using &amp;lt;code&amp;gt;echo $?&amp;lt;/code&amp;gt; in bash after running the test program:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;mach/mach.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
     mach_port_t kernel_task = 0;&lt;br /&gt;
     if (!host_get_special_port(mach_host_self(), HOST_LOCAL_NODE, 4, &amp;amp;kernel_task)) return -1;&lt;br /&gt;
     return kernel_task;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
-1 is returned on error. 0 is returned if no hgsp4 patch is enabled.&lt;br /&gt;
&lt;br /&gt;
== hgsp4 enabled jailbreaks ==&lt;br /&gt;
Jailbreaks known to enable hgsp4 include:&lt;br /&gt;
* [[Yalu#yalu_.2B_mach_portal_.2810.1-10.1.1.29|yalu+mach_portal]] (10.0-10.1.1) on 64-bit&lt;br /&gt;
* [[h3lix]] (10.0–10.3.3) on 32-bit&lt;br /&gt;
* [[Electra]] (11.0-11.1.2) on 64-bit&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[tfp0 patch]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Kernel Patches]]&lt;/div&gt;</summary>
		<author><name>Bellis1000</name></author>
		
	</entry>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=Hgsp4_patch&amp;diff=68488</id>
		<title>Hgsp4 patch</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=Hgsp4_patch&amp;diff=68488"/>
		<updated>2018-03-31T18:47:28Z</updated>

		<summary type="html">&lt;p&gt;Bellis1000: /* hgsp4 enabled jailbreaks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:hgsp4 patch}}&lt;br /&gt;
A '''hgsp4 patch''' (or '''host_get_special_port(4) patch''') is a kernel patch that enables any executable running as root to access the kernel task by calling '''host_get_special_port''' for host special port '''4''' (hence the name). This host special port is usually unused, and the kernel task port must be “mounted” there by an exploit.&amp;lt;ref&amp;gt;https://bazad.github.io/2017/09/live-kernel-introspection-ios/&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://github.com/iabem97/hermes/blob/master/hermes/disable_protections.c&amp;lt;/ref&amp;gt; It is thus recommended that host special port 4 be used solely for the kernel task port.&amp;lt;ref&amp;gt;http://www.newosxbook.com/forum/viewtopic.php?f=8&amp;amp;t=16641&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The hgsp4 route is equivalent to the [[tfp0]] route, and tools that rely on tfp0 can be recompiled to use hgsp4 instead.&amp;lt;ref&amp;gt;[https://twitter.com/panguteam/status/708330906084216833 @PanguTeam: For security researchers, calling host_get_special_port with 4 on jailbroken devices will give u kernel task port just like task_for_pid(0)]&amp;lt;/ref&amp;gt; In a tweet, tihmstar confirmed that this applies to [[kloader]] too.&amp;lt;ref&amp;gt;[https://twitter.com/tihmstar/status/945613035489644544 @tihmstar: kloader works fine with h3lix :) Thanks to @nyan_satan for sending me a compiled version which uses hgsp(4)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example code ==&lt;br /&gt;
The following example C program calls &amp;lt;code&amp;gt;host_get_special_port&amp;lt;/code&amp;gt; and, on success, returns a positive integer that can be checked using &amp;lt;code&amp;gt;echo $?&amp;lt;/code&amp;gt; in bash after running the test program:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;mach/mach.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main(void) {&lt;br /&gt;
     mach_port_t kernel_task = 0;&lt;br /&gt;
     if (!host_get_special_port(mach_host_self(), HOST_LOCAL_NODE, 4, &amp;amp;kernel_task)) return -1;&lt;br /&gt;
     return kernel_task;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
-1 is returned on error. 0 is returned if no hgsp4 patch is enabled.&lt;br /&gt;
&lt;br /&gt;
== hgsp4 enabled jailbreaks ==&lt;br /&gt;
Jailbreaks known to enable hgsp4 include:&lt;br /&gt;
* [[Yalu#yalu_.2B_mach_portal_.2810.1-10.1.1.29|yalu+mach_portal]] (10.0-10.1.1) on 64-bit&lt;br /&gt;
* [[h3lix]] (10.0–10.3.3) on 32-bit&lt;br /&gt;
* [[Electra]] (11.0 - 11.1.2) on 64-bit&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[tfp0 patch]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Kernel Patches]]&lt;/div&gt;</summary>
		<author><name>Bellis1000</name></author>
		
	</entry>
</feed>