[DEV] BACKTRACK 5 on SGS2 (chroot) [UPDATED: 12/July/2011]

Search This thread

tutchthesky7

Senior Member
Feb 24, 2011
200
39
i love when the stupid person that MADE the whole thing leaves out a crucial step....

3. Download this version of busybox for temp use and put it in the following directory shown below (you may need Root Explorer to change permissions to create the directory tree and upload the file):

busybox ( http://dl.dropbox.com/u/14664837/busybox )

/data/local/tmp/bt/busybox

NOTE: /data/local/ should already be there as well as tmp. You will have to create the "bt" folder in that tree. You must have the directory tree and file shown exactally as shown: /data/local/tmp/bt/busybox . If you don't, you can't complain to me why you are getting errors.

---------- Post added at 04:38 AM ---------- Previous post was at 04:00 AM ----------

it seems like no matter what i do , i get the problem after :
sh installbt.sh " /data/local/tmp/bt/busybox : not found.....

im not sure why, i copied all the files ino the bt folder and the data folder where they need to go.. can someone help... keyword HELP.. dont tell me i shouldnt be doing this if i cant figure it out... cause theres atleast 20 people on this thread that have the same issue and noones helped them
 
Last edited by a moderator:

curioct

Senior Member
Jan 12, 2011
280
41
I can confirm that the zip file does not work on CWM. I'm Latest Hydrogen and Siyah Kernel, (Yes i've read the OP), and yes again. I've placed them manually

EDIT: Hydrogen ROM + Siyah Kernel (Samsung Galaxy S2), Works like a charm. good work guys. Would be happy if someone could provide more details about USB OTG with Wireless dongle enabling packet injecting and monitoring mode.

As far as i am aware no one has this working as yet, but I might have another look at it now I have ics running if I can be arsed

Sent from my GT-I9100 using XDA
 

Maggot82

Senior Member
Oct 19, 2011
70
10
Telford
Help Please

I was hopong someone could help please,

I have CM9 installed on my SGS2

I have downloaded and copied the files as instructed in post 1, however when it came to installing the zip via recovery my phone kept getting some sort of E: error ??? I figured that I could extract the files needed and add them to the bt folder i created.

I not get this error when trying to load up bt, any help would be great, thanks guys
 

Attachments

  • Screenshot_2012-06-06-09-16-55.jpg
    Screenshot_2012-06-06-09-16-55.jpg
    48.7 KB · Views: 385

Maggot82

Senior Member
Oct 19, 2011
70
10
Telford
UPDATE

UPDATE - right I have now managed to get a little further, to the stage where is states the "UI" can no be launched but the prompt does not change to to root blah blah to allow me to run it, see the 2nd screenshot...........

ANOTHER UPDATE -

I think I have sorted the above but im now getting a permissions deniedfrom the busybox
 

Attachments

  • Screenshot_2012-06-06-09-52-04.jpg
    Screenshot_2012-06-06-09-52-04.jpg
    54.6 KB · Views: 353
Last edited:

Maggot82

Senior Member
Oct 19, 2011
70
10
Telford
OK guys thanks for all your help :D

I guess I sorted it alone, probably the best feeling ever when you get somet like this sorted :)

I guess it all comes down to having the files in the right places and permissions set on certain files to allow it to execute among a few other issues, anyway all sorted now :)
 

Ramazor

Senior Member
Oct 13, 2011
895
606
Rijeka
I don't know if this question has been already asked, but is it possible to run this as second ROM with Siyah? I'm using paranoidandroid :)

Sent from my GT-I9100 using xda premium
 
Last edited:

curioct

Senior Member
Jan 12, 2011
280
41
It really troubles me the number of you messing with tools you clearly barely understand without even some basic shell scripting skills.

Guys please if you really want to learn this stuff, please try to do some basic research, there's plenty of material out there.

The last few posts are a clear example of this problem the output screens demonstrate exactly what was wrong and should have taken someone who is remotely competent to use backtrack no more than a minute to figure out and fix in anyone of a number of ways (I can think of three off the top of my head).

This is not meant to pick on this poster, (he/she is simply the latest example) we all start somewhere, but there are tools in backtrack that require at least intermediate skills, and I'd hate to see you get yourselves in trouble trying things you have no idea about.

At the very least visit remote-exploit.org and the other associated sites, learn some basic command line Linux as a base minimum startpoint. Ideally learn some C and assembly as well read some of the older texts smashing the stack, mitm etc etc

Don't say you weren't warned! This stuff can harm not only remote systems but also your own. This without even thinking about how you cover your tracks if God forbid you did manage to exploit something. I'm sure none of you want to end up bubba's biatch!

Just food for thought, and feel free to ignore the old fogey if you wish but don't say you weren't warned, a little knowledge in this area truly can be very dangerous! And none is even worse!

Sent from my GT-I9100 using XDA
 
  • Like
Reactions: mistressgemini

Ramazor

Senior Member
Oct 13, 2011
895
606
Rijeka
I did not ask anything related to backtrack sine I'm using it as dualboot along with win7. I just wasnt sure if it's some kind of rom for itself or emulator. But regarding the rest of your post, I definitely agree. Don't mess with these things with out knowing some basics of linux or backtrack. It's too bad that this dev isn't as popular as it should be.

Sent from my GT-I9100 using xda premium
 

curioct

Senior Member
Jan 12, 2011
280
41
I did not ask anything related to backtrack sine I'm using it as dualboot along with win7. I just wasnt sure if it's some kind of rom for itself or emulator. But regarding the rest of your post, I definitely agree. Don't mess with these things with out knowing some basics of linux or backtrack. It's too bad that this dev isn't as popular as it should be.

Sent from my GT-I9100 using xda premium


I was referring to maggot82 ;)

The problem was blatant and basic and could have been fixed by anyone with even a very basic understanding.
 
  • Like
Reactions: mistressgemini

Maggot82

Senior Member
Oct 19, 2011
70
10
Telford
The problem was basic if it was on a pc however when there is a rick of maybe screwing up my phone I'm a little more careful thanks for your comments they were really helpful. If by some fluke I hack into Microsoft from my phone and I'm then arrested and then given death via injection I will sit there and think I should have paid more attention to that dude........ or maybe just maybe I wanted to educate myself as a young man and asked for help..... only to post not long after saying don't worry I sorted it.

Cheers x

Sent from my GT-I9100 using XDA
 
  • Like
Reactions: Ramazor

curioct

Senior Member
Jan 12, 2011
280
41
The problem was basic if it was on a pc however when there is a rick of maybe screwing up my phone I'm a little more careful thanks for your comments they were really helpful. If by some fluke I hack into Microsoft from my phone and I'm then arrested and then given death via injection I will sit there and think I should have paid more attention to that dude........ or maybe just maybe I wanted to educate myself as a young man and asked for help..... only to post not long after saying don't worry I sorted it.

Cheers x

Sent from my GT-I9100 using XDA

No the problem was basic fullstop. As I said in the previous post, as I typed it I could think of at least 3 ways of solving it on my phone, off the top of my head. I am not meaning to single you out specifically, we all started somewhere. All I was trying to say was be careful. I'll add to that if you really want to get something out of your efforts my suggestions will be well worth your time.

That elation you felt solving that problem can come many times over as you learn more and more imagine how you will feel on your first successful hack or better yet finding your own very first exploit.

So you can choose to be ignorant and sarcastic. Or you can choose to educate yourself about these things properly.

Your choice of course, no skin off my nose either way, but to me it seems pretty pointless going through the hassle of installing backtrack on your phone if you're not even going to learn basic Linux shell scripting.

Good luck with it either way. I hope you enjoy yourself with it.

Sent from my GT-I9100 using XDA
 
  • Like
Reactions: mistressgemini

Maggot82

Senior Member
Oct 19, 2011
70
10
Telford
Well you are making this about me so of course I will come back at you what do you expect ? Again no problem is simple if you don't know the answer, I would give a for instance but as you obviously know everything about everything I won't waste my time.

You have a few points that I agree with but why you feel the need to act like you are I done know, maybe its the whole age thing and how you know best...... well you dont.


Right I have said my bit and I won't respond to any further post from yourself especially if its condersending.

Oh and the whole point wasn't to use it but just to see if I could do it. I actually do use it in a VM box, if you want to help figure out a way to make the built in wifi on my laptop show as wlan0 when in the BT VM box

Again thanks

Sent from my GT-I9100 using XDA
 

mistressgemini

New member
Feb 13, 2009
1
0
I find it annoying when good advice or input is stomped on. I have started to notice that I get even more annoyed when I see the stomper is another special snowflake. I am an outsider that read this thread from that vantage point, and no one made you the center of attention except for you. I would be willing to bet as the lethal injection was about to be injected, you'd be mulling over all the people that you place blame on for your own actions. The person responding wasn't picking on you, & clearly mentioned that they were speaking about this being an issue that is mentioned more often as time passes.

The difference between successful people that remain successful and the rest of the world is one group chose to observe good advice or input even when it was unsolicited. There is nothing wrong with wanting to solve an issue on your own, & I prefer to do it that way. The first step in anything is to RTFM or folIow the advice of those that have it down. I can promise there is a big difference between getting lucky and truly knowing how to do something the correct way. You can view this in the same way you did the other advice, and I can promise it won't cause me to be up worrying about all the things Bubba has planned for his next cell mate.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 64
    \\----[ Announcement ]----//

    [12/July/2011] Updated with new package (bt5_sgs2_shell_scripts_v2.zip) containing shell scripts & busybox

    //----[ Announcement ]----\\



    hi guys DooMLoRD & anantshri present to u:

    BACKTRACK 5 on SGS2


    all the work was done by anantshri, i mostly assisted by testing it on my SGS2 and modding it slightly so that it will work properly for SGS2... dont forget to thank him!

    i will try n keep it short and simple...

    for more details u can read the original thread at X10 sub-forums...

    [DEV] BACKTRACK 5 on Xperia X10 chroot


    [ Screenshots ]


    on startup (shell):

    shell.png



    in GUI:

    gui.jpeg


    phone + BT5 GUI:

    phone.jpg




    [ Requirements ]



    [ How To : File Setup ]

    u need to do this only once
    1. download the files from the links provided in this thread
    2. extract the files using 7zip to a temporary folder (needs 3.3GB free on that drive)
    3. connect ur SGS2 to PC and mount USB storage
    4. create a folder named 'bt' (without quotes) in the root of ur sdcard and copy the bt.img in that folder
    5. also place the file bt5_sgs2_shell_scripts_v2.zip in root of sdcard, this file has to be flashed via recovery
    6. once u verify that the above is correct then un-mount usb storage
    7. reboot into recovery and flash the file bt5_sgs2_shell_scripts_v2.zip stored in root of sdcard (or if u are using CWM app then just select the file for flashing and the app will do the rest ;))
    8. once ur phone reboots into OS just check the /sdcard/bt folder
    9. final directory structure should look like this:
      • /sdcard/bt/bt
      • /sdcard/bt/bt.img
      • /sdcard/bt/installbt.sh
      • /sdcard/bt/startbt
      • /sdcard/bt/stopbt
    10. once u verify that the above is correct then u can proceed


    [ How To : Launch BT ]

    1. start Terminal Emulator app on ur SGS2 and enter the following commands step by step (accept/allow any SuperUser request/popup that u may receive)
      • su
      • cd /sdcard/bt
      • sh installbt.sh
      • startbt
      • bt
    2. now u are in BackTrack5 shell

    3. to launch GUI (vncserver) enter the following command
      • ui
      uilaunch.jpeg

      now note the number N shown localhost:N
      e.g. as u can see from the above image that "New 'X' desktop is localhost:1", so N=1
      the vncserver is running at (5900 + N, N=1 ; so server port is 5901)

    4. now launch androidVNC app on phone and fill in the detials as follows
      • Nick : bt
      • Address : 127.0.0.1
      • Port : 5901
      • Password : 12345678
      • Username : <leave it blank>
      • Color Format : 24-bit color (4 bpp)
      vnc.jpeg

      inside vnc window select input mode (i personally recommend the following)
      • TouchPad (here your screen works like a big touchpad use it to navigate mouse.)
    5. and then press connect... now u are in BackTrack GUI!

    6. if u want to exit/close BT5 then u need to follow these steps:
      • close the androidVNC app (Menu -> Disconnect)
      • go back into Terminal Emulator app and enter the following commands
        u should be at this shell root@localhost:~#
        • killui
        • exit
      • now u will get back to this shell> #
      • now enter the following commands to stop bt and exit
        • stopbt
        • exit
        • exit
      • u can now exit the Terminal Emulator app
      • i would also recommend that u reboot ur phone


    [ Important Info ]

    root password is 12345678



    [ Download Links ]

    1. update.zip package containing shell scripts, busybox (which gets installed to temporary location) [to be flashed via recovery]
      this will not disturb/conflict with busybox of ur ROM/CF-Root kernel

      bt5_sgs2_shell_scripts_v2.zip (~800KB)

    2. main bt.img
      these links are 7zip archives split into 50mb files, u will need to download the following:
      total size: 486MB

      also uploading to mediafire for mirroring...
      Mediafire Folder: http://www.mediafire.com/?f9gk3p3t9wip5

      md5 hashes:

      Code:
       bt.7z.001 f19e769bf42b44867c8bb1d9bb9c5d44
       bt.7z.002 a4dd26a98d2c6925d871fb108fb5fadb
       bt.7z.003 ecca5a5d72c449117b1d3dbc23aeb1a2
       bt.7z.004 8ad487a01e4d149f0247ad9288201f32
       bt.7z.005 adab9cb3778cd8ac89ccc0e21997c3d7
       bt.7z.006 ba6a28de70a1115dc316f45cea508215
       bt.7z.007 f59757e891631607e1a35abadb231b3b
       bt.7z.008 cdb8c28a1fbd03657bb42e8d69f0600b
       bt.7z.009 426d892f872679e3d53d0ebb0376e138
       bt.7z.010 c7d2957bc65340d967b9dd3646d7cb39

    icon8.gif



    ENJOY!
    8
    [ Tips n Tricks! ]

    1. if u have ur device (SGS2) connected over wifi u can connect to the BT5 vncserver running on ur phone!! u will just need to connect to
      <ip_address_of_phone>:<portno>

      pcbasedvnc.png


    2. most of the startup/launching commands can be executed even through adb shell
    5
    ==== Reserved ===

    few pointers as this has been asked many times

    1) Monitor Mode will not work till someone tried to compile a custom wifi drivers with monitor mode enables, in that case also firmware should allow it.

    2) Those using android-vnc-viewer and facing difficulty in navigation check various input modes.
    These 3 works the best for me.

    1. Touch Mouse; D-Pad Pan
    2. Mouse pointer control mode
    3. TouchPad (here your screen works like a big touchpad use it to navigate mouse.)
    3
    [MOD/FIX]scripts will now mount storage on boot and path is fixed

    First the [FIX] bit

    The attached scripts change the PATH environment variable settings to include /usr/local/bin as needed this is added into the 'bt' script

    not sure if this was in all versions of doom's scripts but it's fixed in these ones where it was missing.

    *I have not gone through all programs to identify if other directories should be in path or not


    Second the [MOD]
    I have modified the 'startbt' and 'stopbt' scripts to automatically mount and unmount the sdcard, external_sd and the usb flash drives (otg cable required)

    Once Back|track 5 is loaded these are mounted in the /root/storage directory creating three directories called 'sdcard', 'external_sd' and 'usbflash'

    Since I was only really doing this as a POC, for myself and the poster above, I have not done extensive testing but so far the sdcard and external_sd are working just fine.

    Using a USB flash via this methof the flash drive must be mounted via the OTG cable and fully enumerated prior to booting or files will not display.

    one word of caution my startbt script is configred to boot BT5 from the external sdcard (edit line 5 remove '/external_sd' for default configuration)

    Full scripts with mods highlighted and underlined (simple bold didn't seem to show up much):-

    startbt :-

    Code:
    echo "BackTrack Loader by Anant based on ubuntu loader"
    echo " "
    echo "[ STEP 2 ]"
    echo ">> Setting variables"
    export kit=/sdcard/[B][U]external_sd/[/U][/B]bt
    export bin=/system/bin
    export mnt=/data/local/bt
    [B][U]export stor=$mnt/root/storage
    export sdcard=$stor/sdcard
    export extsd=$stor/external_sd
    export usbflash=$stor/usbflash[/U][/B]
    export PATH=$bin:/usr/bin[B][U]:/usr/local/bin[/U][/B]:/usr/sbin:/bin:$PATH
    export TERM=linux
    export HOME=/root
    export bboxpath=/data/local/tmp/bt/busybox
    # Mounting Image to the farthest loop point
    # FIXME : check if mount sucessfull otherwise abort whole process.
    echo ">> Creating nodes"
    $bboxpath mknod /dev/block/loop254 b 7 254
    echo ">> Mounting image"
    $bboxpath losetup /dev/block/loop254 $kit/bt.img
    echo ">> Setting other mount points"
    $bboxpath mount -t ext2 /dev/block/loop254 $mnt
    $bboxpath mount -t devpts devpts $mnt/dev/pts
    $bboxpath mount -t proc proc $mnt/proc
    $bboxpath mount -t sysfs sysfs $mnt/sys
    [B][U]$bboxpath mkdir -p $sdcard
    $bboxpath mkdir -p $extsd
    $bboxpath mkdir -p $usbflash
    $bboxpath mount --bind /mnt/sdcard $sdcard
    $bboxpath mount --bind /mnt/sdcard/external_sd $extsd
    $bboxpath mount --bind /mnt/sdcard/usbStorage/sda $usbflash[/U][/B]
    echo ">> Seting environment"
    sysctl -w net.ipv4.ip_forward=1
    echo ">> Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
    echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
    echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
    echo "127.0.0.1 localhost" > $mnt/etc/hosts
    echo "[ STEP 2 COMPLETE ]"
    echo " "
    echo "BackTrack is ready just type 'bt' (without the quotes)"



    bt script with mods in bold:-

    Code:
    echo "[ STEP 3 ]"
    echo ">> Setting variables"
    export kit=/sdcard/bt
    export bin=/system/bin
    export mnt=/data/local/bt
    export PATH=$bin:/usr/bin:/usr/sbin[B][U]:/usr/local/bin[/U][/B]:/bin:$PATH
    export TERM=linux
    export HOME=/root
    export bboxpath=/data/local/tmp/bt/busybox
    echo ">> Correcting resolution issues"
    $bboxpath sed -i 's/850/800/g' /data/local/bt/root/bin/ui
    echo "[ STEP 3 COMPLETE ]"
    echo "Customized script for BackTrack by Anant shrivastava http://anantshri.info"
    echo "modded for SGS2 by DooMLoRD"
    echo "Enjoy BackTrack 5 }:)"
    echo " "
    echo "BackTrack shell will now be lauched"
    echo "to start GUI (vncserver) type 'ui' (without the quotes)"
    $bboxpath chroot $mnt /bin/bash

    stopbt script with mods in bold:-

    Code:
    echo "Cleaning the leftover and returning back the memory to Android."
    echo "by Anant Shrivastava http://anantshri.info "
    echo " "
    echo "[ Cleanup ]"
    #After exit command is executed clear it all up
    echo ">> Setting variables"
    export kit=/sdcard/bt
    export bin=/system/bin
    export mnt=/data/local/bt
    export PATH=$bin:/usr/bin:/usr/sbin[B][U]:/usr/local/bin[/U][/B]:/bin:$PATH
    export TERM=linux
    export HOME=/root
    export bboxpath=/data/local/tmp/bt/busybox
    sync
    echo ">> Unmounting temporary mount points"
    [B][U]$bboxpath umount -l /data/local/bt/root/storage/external_sd
    $bboxpath umount -l /data/local/bt/root/storage/usbflash
    $bboxpath umount -l /data/local/bt/root/storage/sdcard[/U][/B]
    $bboxpath umount -l $mnt/dev/pts
    $bboxpath umount -l $mnt/proc 
    $bboxpath umount -l $mnt/sys 
    $bboxpath umount -l $mnt
    echo ">> Unmounting image"
    $bboxpath losetup -d /dev/block/loop254
    echo ">> Remounting system as RO"
    $bboxpath mount -o remount,ro /system
    echo "[ Cleanup Completed ]"
    echo " "
    echo "Please reboot to properly unmount BackTrack"

    I've just noticed I have used full path's in unmounting in this last script, so if you modified the paths to mount things you need to modify these too.

    additionally I used root explorer to manually copy these to '/system/bin' there is no reason that I can think of that these should not work with the standard install.sh script but this has not been tested by me.

    Disclaimer: as mentioned above this was a simple quick and dirty POC for me this messes with files in sensitve areas of your phone, I take no responsibilty for any damage you might do to your own phone.
    3
    files uploaded to personal direct download server!

    links updated

    also uploading to mediafire for mirroring...
    http://www.mediafire.com/?f9gk3p3t9wip5

    will post these links in few hours!

    ENJOY BT5 on ur SGS2