Dave-ee Jones Posted December 14, 2017 Share Posted December 14, 2017 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! 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. Link to comment Share on other sites More sharing options...
Darren Kitchen Posted December 14, 2017 Share Posted December 14, 2017 Love the dark interface :) Link to comment Share on other sites More sharing options...
PixL Posted December 14, 2017 Share Posted December 14, 2017 This looks cool, when can I have a go with it? :) Link to comment Share on other sites More sharing options...
PixL Posted December 14, 2017 Share Posted December 14, 2017 What about a page similar to the pineapple module DWall that will display all those unencrypted images, cookies and credentials? Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted December 14, 2017 Author Share Posted December 14, 2017 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 More sharing options...
trashbo4t Posted December 27, 2017 Share Posted December 27, 2017 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 More sharing options...
Dave-ee Jones Posted December 29, 2017 Author Share Posted December 29, 2017 Maybe. Anyway, it's currently just asking for the user to input a paragraph like so: test.com/172.16.32.1 squirrel.com/172.16.32.1 And I'll just add the 'address=/' prefix to each line. Not sure how but I'm sure it's been done before so I'll figure it out. Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 3, 2018 Author Share Posted January 3, 2018 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). 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. :) Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 3, 2018 Author Share Posted January 3, 2018 Just finished this little gem..Some of you may know it from WabbitWeb, but this has a special little feature that I (personally) think needed to be in WabbitWeb.. Link to comment Share on other sites More sharing options...
RazerBlade Posted January 3, 2018 Share Posted January 3, 2018 Nice! This is what the packet squirrel should have had from the beginning. Link to comment Share on other sites More sharing options...
Phil Fergie Posted January 3, 2018 Share Posted January 3, 2018 Excited, when can we get our hands on it? Great work! Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 3, 2018 Author Share Posted January 3, 2018 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! 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. Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 4, 2018 Author Share Posted January 4, 2018 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.. Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 5, 2018 Author Share Posted January 5, 2018 Yay something's working! (Still won't work as a 'real' payload, I have to launch the 'payload.sh' over SSH in arming mode..) 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. Link to comment Share on other sites More sharing options...
RazerBlade Posted January 5, 2018 Share Posted January 5, 2018 have you tried chmod a+x ? Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 5, 2018 Author Share Posted January 5, 2018 5 hours ago, RazerBlade said: have you tried chmod a+x ? It doesn't make any sense for me to have to do that to start it as a payload from the switch.. Link to comment Share on other sites More sharing options...
RazerBlade Posted January 6, 2018 Share Posted January 6, 2018 But u need to make it executable. Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 7, 2018 Author Share Posted January 7, 2018 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 More sharing options...
RazerBlade Posted January 8, 2018 Share Posted January 8, 2018 Ok, but just test it maybe. Ok? Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 9, 2018 Author Share Posted January 9, 2018 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. Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 24, 2018 Author Share Posted January 24, 2018 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: 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 Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 29, 2018 Author Share Posted January 29, 2018 My API for the CLI is working pretty well, though I think I'll remove the double-line command break in the output (didn't think that one through ) Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 29, 2018 Author Share Posted January 29, 2018 Payload has officially been released and is ready to run! Take a gander: Link to comment Share on other sites More sharing options...
PoSHMagiC0de Posted January 30, 2018 Share Posted January 30, 2018 Is that a web interface? That is a clean web interface if it is web-based. If not, still clean looking. Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted January 30, 2018 Author Share Posted January 30, 2018 1 minute ago, PoSHMagiC0de said: Is that a web interface? That is a clean web interface if it is web-based. If not, still clean looking. Sure is. It's out too, so you can have a look-see for yourself (links in my signature and in a comment above). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.