Results 1 to 2 of 2
Discuss [1.1.4] How to become root inside a native application? at the General - Hackint0sh.org; Hi all, this is my first pot and I hope to contribute to other pots ...
  1. #1
    Newbie Array

    Join Date
    Jul 2008
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default [1.1.4] How to become root inside a native application?

    Hi all,
    this is my first pot and I hope to contribute to other pots from now on...

    My question is: does anyone know how to become root inside a native application?
    By default, native applications are executed by the mobile user. In my application, I need to execute some system commands (with the "system('command');" call) which need root privileges.
    Since "sudo" does not exist, and since "su" does not work, the only way I found to become root is by typing "ssh root@localhost". The problem is that in this way, we need to introduce the root password in an interactive way and so, not possible inside the source code of my application, i.e. system(ssh root@localhost 'command'); will not work since we can not introduce the root password.

    Then I tried several solutions:
    1. Configuring the ssh server with public/private keys in order to be able to log as root without password. This solution does not work with the ssh server of the bsd subsystem!

    2. Setting the UID and GID of the mobile user to 0 (like root user) in the passwd and master.passwd files of the iphone file system. The bsd subsystem crashes!

    3. Creating a shell script (with the password inside the script in clear text) to do the ssh login automtically, and then executing it from my application with the system command instead of executing the ssh login directly from my application. The problem is that the only way I know to do this script is using the "expect" interpreter not available in the bsd subsystem!

    4. chmod ugo+s 'command'. It does not work!

    Please, does anybody know a solution to my problem?
    Thank you very much!



  2. #2
    Former Bender
    Guest

    Default

    Use these commands to set SUID Root level to your app.

    Code:
    chmod -R 755 /Applications/yourapp.app/
    chmod 6755 /Applications/yourapp.app/yourapp
    chown -R root:admin /Applications/yourapp.app/

 

 

Similar Threads

  1. [WeiSMS] Yet another native SMS application is available
    By acdc in forum Free Toolchain Software (Cydia App's)
    Replies: 136
    Last Post: 03-21-2008, 06:25 PM
  2. [App] Native Chess Application available
    By iPizza in forum Free Toolchain Software (Cydia App's)
    Replies: 19
    Last Post: 01-23-2008, 05:51 PM
  3. Native sip application for ipod touch coming 1/1/8
    By skippy911 in forum Free Toolchain Software (Cydia App's)
    Replies: 0
    Last Post: 12-18-2007, 08:28 PM
  4. New Software: Mobile Holy Quran for iPhone Native Application
    By zoosware in forum Free Toolchain Software (Cydia App's)
    Replies: 23
    Last Post: 11-01-2007, 03:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 11:16 PM.
twitter, follow us!