Jump to content

Multiple sneak-peeks at payload I'm working on..


Dave-ee Jones
 Share

Recommended Posts

Hoi!

Here's a sneak-peek at a payload I'm currently working on. The network settings go a fair while longer down the page so don't despair when you only see the first bit - it's only a sneak-peek!

image.png.b11049a3fd906f000eeb1adc89a9655d.png

It's lookin' pretty snazzy, and the rest of this 'form' looks really good and quite powerful.

Think of it as a WRT configuration portal. Yeah, now you understand, right?

So far I've given it the name 'PopsWRT'. While it's not an actual WiFi router out-of-the-box you can plug a WiFi NIC in and it will technically be correct.

Pops is a play on pocket packet squirrel, and WRT means WiFi router. The reason I added WRT in the name is because it's based on the web-based configuration that most routers have these days.

If you haven't realised already, this payload is based off of WabbitWeb, so feel free to go check that out - link's in my signature.

FYI I am planning on adding support to setup configuration for a WiFi network in the website too. However, I'm not sure of the extent it will go in terms of what you can configure yet.

I hope you like what you see, and feel free to add suggestions to what I can add to the network configuration page, or the whole website in general! The Network Settings page is already quite full but if I get more suggestions I'll split the modules over separate pages and turn the 'Configuration' entry in the menu into an accordion or menu in itself.

Edited by Dave-ee Jones
  • Like 3
Link to comment
Share on other sites

Thanks for the feedback :) Glad you like it.

It probably won't be up and running for a little while yet as I have to finish writing the python webserver to deal with all those forms..Shouldn't be TOO hard.

Anyone know how the DNS server takes multiple entries in a file? Like this?

address=/test.com/172.16.16.16
address=/boo/172.16.16.16

 

1 hour ago, PixL said:

What about a page similar to the pineapple module DWall that will display all those unencrypted images, cookies and credentials?

I'm not familiar with DWall so I'm not entirely sure what you're talking about. I've been displaying data "live" in a cheap way. So what I do for the command line's output is have the output written to a file and have the webpage read the file ~3s later (when the command has finished). I haven't written a web app to properly deal with this.

Link to comment
Share on other sites

  • 2 weeks later...
On 12/14/2017 at 3:30 PM, Dave-ee Jones said:

Thanks for the feedback :) Glad you like it.

It probably won't be up and running for a little while yet as I have to finish writing the python webserver to deal with all those forms..Shouldn't be TOO hard.

Anyone know how the DNS server takes multiple entries in a file? Like this?


address=/test.com/172.16.16.16
address=/boo/172.16.16.16

 

I'm not familiar with DWall so I'm not entirely sure what you're talking about. I've been displaying data "live" in a cheap way. So what I do for the command line's output is have the output written to a file and have the webpage read the file ~3s later (when the command has finished). I haven't written a web app to properly deal with this.

I assume it reads the file line by line (until '\n' is reached) and uses regex or static string matching?

Link to comment
Share on other sites

Another sneak peek. ;)

I got the web server to FINALLY start saving all the web-side configuration to a file that the Packet Squirrel can read.

Apologies for the secrecy of the rest - it's partly because I don't want to get people's hopes up, but also adds a bit more suspense of what may be coming.. :P (Feel free to guess, I'm interested in seeing if there's anything else I can add that you guys might let out).

image.thumb.png.b21312acff7e98ad88e493cdf3985379.png

And yes, those files open in Notepad are generated by the Python webserver, I didn't just write them in there!

Quickly fixed the hosts file to have "address=/" at the start of every line. Fairly simple. :)

Edited by Dave-ee Jones
Link to comment
Share on other sites

11 hours ago, Phil Fergie said:

Excited, when can we get our hands on it?  Great work!

Thanks! I'm hoping it will be done shortly, though I still haven't done a full-on test as a payload yet.

11 hours ago, RazerBlade said:

Nice! This is what the packet squirrel should have had from the beginning. 

Don't say that! Sebkinne will decide to make his own and then mine will be redundant! :unsure:

I wouldn't mind though, his would work better I would think. I'm still not entirely sure the methods I'm using to modify network settings will work..I'm using the only way that seems logical and that's using UCI to edit the DHCP settings. I'm not sure if I should do away with NETMODE completely, if I don't it may start getting a bit weird. I think as long as I set the NETMODE before changing other network settings (netmask, static IP etc.) it should be okay. Changing it after could result in some strange effects.

I hate to tag you @Sebkinne, but I would love some advice here.

Edited by Dave-ee Jones
Link to comment
Share on other sites

So my web server seems to be done (for now, until I add more features), but the base is there.

  • Commands page (CLI) is complete
  • Configuration page (Network Settings) is complete
  • Payloads page is complete
  • Shutdown page is complete (beware of this - if you click on the Shutdown menu option it will shut down the PS' web server immediately which means rebooting it to get PopsWRT going again, I may work on proper controls like reboot, reset etc. to prevent this from happening)
  • Error page is complete (just in case some bozo goes to the wrong page)
  • Home page is...there, but has very little content (says Hi..pretty cool)

Python web server is doing it's job, handling POST requests well and passing them to the payload.sh. Only thing I'm worried about is the payload.sh. It has an 80% chance of being broken somewhere and I'm worried it will completely mess up my PS forever..Even if it does work there may be some inconsistencies somewhere that would break PopsWRT or just have broken features.

Anyway, it's on the way to being complete.

EDIT: Would anyone know why the LED would start flashing cyan and then red after boot? I'm trying to test my payload but it's not even logging "I've started". I suspect it's something to do with the way I'm calling the LED but still..

Edited by Dave-ee Jones
Link to comment
Share on other sites

Yay something's working! (Still won't work as a 'real' payload, I have to launch the 'payload.sh' over SSH in arming mode..)

image.png.3df243c4538968d3eb0efadd16e75bf9.png

It's set to show output 3.5 seconds after you press the Execute button to give the PS time to process the command and write the output to a file that Python can read. Python then spills the contents of the file into the output box. However, obviously not all commands take the same amount of time so that's why I implemented the 'Reload' button, which is the feature WabbitWeb never had.

Edited by Dave-ee Jones
  • Like 1
Link to comment
Share on other sites

On 1/7/2018 at 1:29 AM, RazerBlade said:

But u need to make it executable.

So how do you explain getting a Github payload and using it on the PS without making it executable and it working? Making it executable means you can call it as an executable script - whereas the way payloads are launched on boot are probably sourced. However, that shouldn't affect how my payload crashes on boot but is fine via SSH.

Link to comment
Share on other sites

21 hours ago, RazerBlade said:

Ok, but just test it maybe. Ok?

I did test it and it wasn't that, but I figured out the problem.

The problem was there was a "payloads" directory in my switch folder (/root/payloads/switch3/payloads) and that kept breaking it, probably because it thinks it's meant to have switch folders in it to source the payloads from. Once I removed that it works fine.

Thanks for the suggestion, though.

Edited by Dave-ee Jones
Link to comment
Share on other sites

  • 2 weeks later...

Very, very close to having this completely operational. So far everything seems to be working well. Here's a peek of what's happening with configuration:
image.thumb.png.1efa00a6d4b4998e3b635380e9a91d77.png

 

So you can't see the browser's search bar, but it's browsing to "10.0.0.1", which is what I set the PS' IP as (as seen in the Payload Log). My IP (as you can see in the log) is 10.0.0.100.

Start IP = 100 means the DHCP range starts at 10.0.0.100, and the lease limit is set to 1, so it can only lease 1 IP at a time (I did this for testing purposes), and as you can see it works like a charm.

You can also see all the modules I've got running (DNS, DHCP, SSH, VPN), and see how they interact when you update the configuration (kills web server first and then updates the network and DNSmasq, and then restarts the web server). Takes about a minute for it to complete the update. I tried making it about 10-30 seconds but the python web server kept failing to start (probably because the network hadn't finished it's configuration boot-up). But, as you can see, works nicely.

Let me know if you want any other modules added/changed.

My next features planned are:

  • Static IP can only be changed on certain NETMODEs
    • Obviously the static IP overrides NETMODE CLONE, so that could be a problem
  • Change the 'Shutdown' page to 'Power' so the user can decide to reboot or shutdown the PS
  • Configuration kept over reboots
    • At the moment the network configuration resets every reboot (DNSmasq doesn't, so keep that in mind)
    • This means...
      • getting a backup of the starting configuration
      • making a function that runs on startup to check for a configuration file and, if it's found, apply it
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...