![]() |
How do I make a NeoPwn Chroot??
Hi,
I guess the title explains itself... Any help? |
Re: How do I make a NeoPwn Chroot??
Quote:
|
Re: How do I make a NeoPwn Chroot??
I guess its similar to making easy debian in a chrooted setup. You just need to create a `container' for filesystem within a file, format it into a linux filesystem, chroot it and dump the stuff from the contents of the neopwn v2 into the `container'.
For now I simply rename the easy debian filename with neopwn v2 whenever I want to use neopwn v2 instead and that is a really lazy method of using neopwn v2. If you wanted to have a proper neopwn setup in a chroot like easy debian, I do recall there was a thread about having multiple chrooted environments. |
Re: How do I make a NeoPwn Chroot??
You cannot simply use the wireless pentesting tools from NeoPwn v2 with just a stock kernel and stock wireless driver. NeoPwn v2 comes with a *cough* custom *cough* kernel with the *cough* proprietary *cough* wireless kernel modules.
However with power kernel (at least version 46 if I'm not mistaken) and lxp's bleeding edge wireless drivers you can achieve the same effect without having to use NeoPwn v2's kernel and its own drivers. Thus its not possible to run a different kernel inside a chroot environment unless maybe you use something like kexec. NeoPwn v2 if I'm not mistaken was supposed to be installed on top of the N900's internal rootfs structure (or at least onto microSD{HC} card) though if one does that they lose all the functionality of what N900 is meant to be. I thought there was a thread that describes how to create a container for chroot image. I guess not. To create a container you will need to determine how much space you want to allocate to the chrooted distribution. 1GB generally is somewhat the minimum if you want GUI and what not and there's really no maximum (if you convert your eMMC or microSD{HC} card to a native linux filesystem) space you want to allocate (though up to whatever the stated free capacity is noted for the medium you choose of course). The next step is to get familiar with dd tool if you want a custom sized `container' for the chosen distro. If you want a simpler way and allocate 4GB `container' for the chosen distro and that your storage medium (eMMC) is on FAT32 then the command is this (as root): Code:
dd if=/dev/zero of=/home/user/MyDocs/test.img The next step is to choose the filesystem for the chosen distro. Most people would tend to choose what is normally recommended upon installing a beginner-friendly distro. The filesystem for that would be ext3, I would also tend to choose ext3 as its easy to deal with and the filesystem support is already part of maemo's kernel). To check what filesystem your device support you need to do this: Code:
cat /proc/filesystems| grep -v nodev| awk '{ print $1 }' Code:
mkfs.ext3 /home/user/MyDocs/test.img.ext3 Upon executing mkfs.ext3 you will get a warning that you are not writing to a partition (or a block device) but to a file, and asks do you want to continue. At this point you will need to say yes. Once the `container' has been created and there is a filesystem within the `container'. You now created a `container' that can be used to put whatever distro of your choice. To use that `container' you will need to first mount it. You will need to create a directory for a place to have the contents of the `container' exposed. The directory for the `container' that is to be mounted on could be placed anywhere however we will stick with /home/user/MyDocs as that is the easiest way to access it all: Code:
mkdir /home/user/MyDocs/test Code:
mount /home/user/MyDocs/test.img.ext3 /home/user/MyDocs/test -o loop After running that command you should now be able to dump the contents of the distro you choose to install. For now we will do NeoPwn v2 chroot. The first thing you will need to do is to extract the contents of w00t.tar.gz into the `container'. For simplicity sake, the w00t.tar.gz is placed in /home/user/MyDocs: Code:
tar -zxvf /home/user/MyDocs/w00t.tar.gz -C /home/user/MyDocs/test Code:
umount /home/user/MyDocs/test Of course not many features that debian chroot provided would be covered by NeoPwn v2 image. Running NeoPwn v2 or any other distro inside chroot environment requires a program that appears within qole's easy debian which handles mouse/keyboard grabbing. Also I could probably upload a premade 4GB NeoPwn v2 if there's enough interest (I'm with a service provider that only offers me 7GB a month, any excess amounts will be charged at AUD$0.10 to my bill at the end of the month. So you can see that I'm not willing unless there is actually enough interest). I have not covered how to create shortcuts and what not for NeoPwn v2 though I may cover such topics if and once I have experimented with it on mine. |
Re: How do I make a NeoPwn Chroot??
What do you mean with a premade NeoPwn? I am looking for an easy debian with pentesting tools installed, is that what you mean by that?
|
Re: How do I make a NeoPwn Chroot??
Quote:
Though my setup is far from complete, it is enough however to be able to get one able to add the rest of whatever features they need in the end such as proper automated chroot scripts, desktop icons (so you can simply tap and get into neopwn chroot just like easy debian without having to rename files, prior to using its own icons/setup). Again, I must stress however that you cannot expect wireless penetration functionality to work fully (with tools from aircrack-ng suite such as airodump-ng, aireplay-ng, etc) with a stock kernel and a neopwn environment. You will at least require kernel power (version 46 if I'm not mistaken) with lxp's bleeding edge wireless drivers loaded and/or installed. A chroot environment does not mean it is like a virtual machine which will boot the chroot's kernel, etc. |
Re: How do I make a NeoPwn Chroot??
Quote:
|
Re: How do I make a NeoPwn Chroot??
lxp's drivers should work with power kernel v46 and above (I have not tested pk49 but in theory it may work). You really don't need neopwn's outdated proprietary kernel version to use its injection capabilities.
Not too sure what you meant by ED image. Are you using your eMMC space to create the image or are you using your microSD{HC} card's space to create the image. If you are using microSD{HC} card to create the image and if your microSD{HC} card is rated class 10 you will need a kernel patch to make the card work. Apparently its some issue with the way the kernel (< v47 iinm) handles writing which is probably too slow and the write queues are all choked up. |
Re: How do I make a NeoPwn Chroot??
ED = Easy Debian, as much more programms are available in easy debian you can run much more pentesting tools than in maemo, also because of depencies.
Oh, I didn't know about that, will look for a fix for class 10 microSDHC as I am using a class 10 card. |
Re: How do I make a pwnieexpress Chroot??
I thought I saw there was a thread for this and it was by kingoddball but I guess I could have been completely mistaken. I have created a pwnieexpress chroot just a moment ago and I now I would like to share with the rest of the community.
Because most of what I have wrote in my second post on this thread covers all the initial areas of what you will need to do to create a chroot `container' in the first place. I will not bother re-documenting the whole thing again. There are however ways to create a 4GB `container' without having to do excessive I/O thrashing on your poor N900. On a linux PC with say more than 4.5GB spare space (flash drives can also suffice here) you can either repartition the spare space as a temporary partition with FAT32 or if the partition is FAT32 you just need to create the `container' within that FAT32 partition and wait for the message to say `file too large' from dd. Once you have created the 4GB.img `container' for instance, you can simply compress it with say something like lzma to make the image really small. From there on you can copy the 4GB.img.lzma into various filenames of your choice as you already have a the generic `container' made. Also creating the whole chroot can be done from the computer, though you cannot test it from your computer as the binaries are obviously compiled for ARM platform. Now because I won't cover creating `containers' and you have ext2 `container' ready to use. We shall get right into extracting contents of pwnieexpress images into that `container' (obviously you would also need to mount the `container' as well). For my convenience sake, you should do the whole thing as root. First extract the contents of the tarball from their website (hosted by github ironically): Code:
tar -zxvf pwnphone_image-7.6.2011.tar.gz We extract the contents of rootfs and optfs from the pwnieexpress's systemBackups directory into the `container'. In my case I have the `container' mounted to /mnt/maemo1 so my case would be like this: Code:
cd systemBackups/ Code:
cp -Rv /mnt/maemo1/home/usr/* /mnt/maemo1/ Code:
cd .. Code:
chown -R 29999:29999 /mnt/maemo1/home/user/* To close the `container' we simply umount it: Code:
umount /mnt/maemo1 |
Re: How do I make a NeoPwn Chroot??
Any chance of an upload? :D
I can build chroot environments, just mine are not the best. I did make a Maemo chroot, but it would not work right. (neither did Angstrom and Meego) They worked, but not right... |
Re: How do I make a NeoPwn Chroot??
I haven't tested the image yet, though I'm speculating there will be some bumps that needs to be ironed out. Its not as simple as I think doing chrooted neopwn image would be since neopwn shares similar base with easy debian.
Also it will not be easy for me to upload it as I still have bandwidth limitations in place. I may do it if there are enough interested parties however. |
Re: How do I make a NeoPwn Chroot??
I still have nothing installed in my easy debian, I am only updating it... And doing upgrade all, will cause the device to stall IO so I need to do it 10 by 10 =( after that I going to install tools like mdk3, aircrack-ng, nmap, zenmap and more ;) I say when it will be ready as I am quite busy these weeks.
|
Re: How do I make a NeoPwn Chroot??
|
All times are GMT. The time now is 13:54. |
vBulletin® Version 3.8.8