Jump to content

H@L0_F00

Dedicated Members
  • Posts

    834
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by H@L0_F00

  1. With the release of Back|Track 4 Final, I finally got around to looking into what scripts needed to be modified and in what way they needed to be modified in order to change the casper directory. This guide, as far as I know, will work with any Ubuntu based LiveCD (BT4, SamuraiWTF, Mint, etc.) that uses the casper squashfs files. So, I will be talking about BT4, but it can be applied to any distro.

    NOTE: You will need some type of writable media, which means you can't do this by booting from your flash drive and then writing to that same flash drive because BT mounts it as read-only by default. You could, however, boot BT from your flash drive, unmount your hard drive, remount your hard drive as writable, and then write the modified rootfs.gz to your hard drive.

    The script found at the bottom of this guide assumes that you have booted into BT4 from either the CD or an ISO (if in a VM). The script is NOT by any means a "good" script, because it is the first script I've ever written, but it gets the job done. You will need to manually change the path you want BT to find the casper directory in, and you may have to change the path that points to the original initrd files.

    Key:

    commands - type this into the terminal windows and press "Enter"

    stuff to change - in the command, change this to your desired path

    To manually change the casper directory:

    01. Boot into Back|Track 4 from either a VM, a CD, or a flash drive.

    02. startx

    03. Start a new terminal. (Black icon on the bottom left)

    04. mkdir tmp

    05. cp /cdrom/boot/initrd.gz ./

    06. gunzip initrd.gz

    07. cd tmp

    08. cpio -id < ../initrd

    09. mv ../initrd ../initrd.old

    10. replace '$path/casper' '$path/.multiboot/BT4-final/casper' '$path/.disk/casper-uuid' '$path/.multiboot/BT4-final/.disk/casper-uuid' '$directory/casper' '$directory/.multiboot/BT4-final/casper' -- scripts/casper

    11. find . | cpio -oH newc > ../initrd

    12. gzip ../initrd

    13. cd ..

    14. rm -rf tmp

    REPEAT THIS, REPLACING EVERY "initrd" WITH "inird800" AND THEN AGAIN WITH "initrdfr"

    Now you can copy the .gz files into your 'boot' directory for BT4

    OR:

    Copy and paste this into a file, change where it says "PATH/TO/YOUR/BT4DIRECTORY" to wherever you have Back|Track 4, save it with a .sh file extension, open a terminal window, chmod 777 change_casper.sh, then run it with: ./change_casper.sh

    rm -rf /bt4-final_edit/
    mkdir -p /bt4-final_edit/tmp/
    echo -e "Copying...\c"
    cp /cdrom/boot/initrd*.gz /bt4-final_edit/
    echo -e "\t\t\t\tDone!"
    echo -e "Decompressing (gunzip)...\c"
    gunzip /bt4-final_edit/initrd*.gz
    echo -e "\t\tDone!"
    cd /bt4-final_edit/tmp/
    mkdir initrd initrd800 initrdfr
    
    # cpio all
    echo -e "Extracting (cpio)...\c"
    cd initrd &amp;&amp; cpio --quiet -id &lt; ../../initrd
    cd ../initrd800 &amp;&amp; cpio --quiet -id &lt; ../../initrd800
    cd ../initrdfr &amp;&amp; cpio --quiet -id &lt; ../../initrdfr
    echo -e "\t\t\tDone!"
    
    # replace all strings
    cd .. &amp;&amp; rm ../initrd*
    echo -e "Replacing all needed strings...\c"
    replace -s '$path/casper' '$path/[color="#808080"]PATH/TO/YOUR/BT4DIRECTORY[/color]/casper' '$path/.disk/casper-uuid' '$path/[color="#808080"]PATH/TO/YOUR/BT4DIRECTORY[/color]/.disk/casper-uuid' '$directory/casper' '$directory/[color="#808080"]PATH/TO/YOUR/BT4DIRECTORY[/color]/casper' -- initrd*/scripts/casper
    echo -e "\t\tDone!"
    
    # repack all with cpio
    echo -e "Repacking (cpio)...\c"
    find initrd/ | cpio --quiet -oH newc &gt; ../initrd 
    find initrd800/ | cpio --quiet -oH newc &gt; ../initrd800
    find initrdfr/ | cpio --quiet -oH newc &gt; ../initrdfr
    echo -e "\t\t\tDone!"
    
    # recompress all with gzip
    echo -e "Recompressing (gzip)...\c"
    gzip ../initrd*
    echo -e "\t\t\tDone!"
    
    # cd, cp all to desktop, &amp;&amp; rm tmp files
    cd
    echo -e "Copying to /root/desktop/ ...\c"
    cp /bt4-final_edit/init* .
    echo -e "\t\tDone!"
    rm -rf /bt4-final_edit/
    echo -e "\n\n\n
    *************************************************
    You can now copy the initrd*.gz files from the  *
    Desktop to the 'boot' folder on your multipass! *
    *************************************************
    \n\n\n"

    If anybody can code a better script where the user can input their desired path and such, please post it!

  2. Ethernet: 10/100 Autoswitch Ethernet connection. IP address and Subnet mask can be set by the user to any value. Standard 10/100 Base T (RJ-45) connector, activity and connection lights.

    RTFM

  3. No problem. In cause your interested in why what you had was not working, you did not supply the "boot" option for the kernel, so it did not know what to boot from (casper in this case).

    I do not believe that is the reason... "boot" is not needed, and does not pertain to the OS you are booting. It is used for chainloads that have been done through the command line and aren't a menu option.

  4. The thing about having multiple partitions on a USB flash drive, is that only the first partition shows up in Windows. You could put all the multipass stuff on the second partition, but you can only edit the second partition under another OS that supports multiple partitions on a flash drive. I have seen and read about people editing the chip controller (I think that's what it's called... I can't remember atm) to make it show up as a regular hdd, and there is some trick with a dummy USB driver that makes it look like a regular hdd as well, but I haven't done much research into either.

  5. Then again, how many people would go "Oh? Alright..." and put in their password... ;)

    I bet that could be quite successful. Also, if they weren't allowed access until after, say a certain amount of time or login attempts, you might phish yourself multiple passwords. Just my thoughts...

  6. Once a phone is connected to your base station, you could do just about anything you want including redirecting it to whom ever you feel like.

    I should have put a direct link to the talk notes, but there are a few slides that have info on such a procedure.

  7. Yes, I would take steps to overthrow the government if they did something like this, or anything that would take away or change any of the rights that I, as well as every other living person, should be entitled to. I live in the USA, and (as far as I know...), something like this is not going on. My original plan was to move somewhere else, where people aren't such idiots, where people value education (a free one at that), where obesity IS NOT A DISEASE, etc, etc, but I've changed my mind, because that's like running away from your problems... I want to stay here and attempt to make as much positive change as possible. So, yes, I might end up in the orgy of lies, scandals, and two-facing they call politics.

  8. I wonder if they really think this will work... I mean, it's the 21st fuckin century! Do they really think the pedo bears are going to be hindered by this idiotic idea of theirs? I don't think so... As we all already know, those who need to get around this will. People can stop hoping for them to do this correctly, because they will not, and never can. And they HAVE to show some kind of success with the damn thing, so they'll overplay any "take downs" they do, and it will be believed by the masses that they are making progress.

    +1 for mass anarchy

    +1 for civil war

    +1 for revolution

    +1 for enlisting our Chinese friends to take down the filters, government, and any others associated

  9. It wold be easier to help if you told us exactly what wasn't working, what different things you've tried, what errors you get, etc. And, yes, I have had some troubles with Kon-Boot on Windows 7 on others' computers, although it works fine on my machine.

×
×
  • Create New...