After dinner, we go back to the hotel. The TV doesn’t work for some reason. I notice that the wifi maybe somewhat vulnerable and I have nothing to do in this several hours. So I give it a try.
Network scanning
after connected with the wifi, ifconfig | grep inet to get the ipv4 address
$ nmap 192.168.41.107/24 Nmap scan report for 192.168.41.1 Host is up (0.0083s latency). Not shown: 969 closed tcp ports (conn-refused), 29 filtered tcp ports (no-response) PORT STATE SERVICE 53/tcp open domain 80/tcp open http
Nmap scan report for 192.168.41.100 Host is up (0.0081s latency). Not shown: 999 closed tcp ports (conn-refused) PORT STATE SERVICE 6000/tcp open X11
Nmap scan report for 192.168.41.107 Host is up (0.000078s latency). Not shown: 998 closed tcp ports (conn-refused) PORT STATE SERVICE 5000/tcp open upnp 7000/tcp open afs3-fileserver
Nmap done: 256 IP addresses (3 hosts up) scanned in 59.80 seconds
We see http on 80 and DNS on 53, we can guess that this is the router
(Also we can see a X11 on 6000 in 192.168.41.100, about X11 there are also lots of test can play with, but I don’t have kali on my computer and I don’t want to install those tools on my Mac)
Login
The page looks empty, and curl returns 302, make me think there is some protection. It turns out that there is some protection, but is done quite poorly.
Are you fucking kidding me ? Make the page unviewable by using css ?
Then just remove the css
Then we have a login page, no CAPTCHA, so we can do a brute force, but I hate guessing. Thanks to the developer to write some readable javascript code to encourage me to continue.
They try to do something to prevent brute force, but do it in front end via javascript ? Doom to failure.
We can modify the code to enable brute force, but that is not quite useful, I hate guessing. And the password is not the default one.
N-day
So let’s perform some research. I also notice that the login is actually depend on the cookie, if we have the text returned by the server(router), we can set the cookie and login successfully.
But I cannot decide what text is. This is also a brute force point, but again, not fan of guessing game.
I only need to know the cookie value, someone must have done this before.
We can see some file upload function in the admin panel. A firmware update is also possible.
Then we can try to upload a php RCE payload, or modify a valid firmware to perform a malicious firmware update to get RCE. Since I do not have AntSword by my side and I do not want to get trouble and be in jail, I just leave it.
Conclusion
Here is the real value
In real world, if you want to hack something or someone, N-day is the most efficient way to get the job done.(And also the social engineering) 0-day is costy, very time-consuming and may screw up your motivation.
Security in real world is really an engineering problem. It is not build something new, bring some innovation ideas, it is about find the failure of some developers, not quite ‘advanced’ tech.
So only security research matters, only new ways of attack, new types of failure matters. (So I would like to quit and be a developer😅) Learn more about the theory, how to attack through a new way ? how to make tools make engineering more efficient ? (build the fuzzing framework etc) How 0-days are found ?(Not those ‘same knowledge apply to different scenarior’ bugs but really ‘new way to attack’/‘new type of bug’) Knowling the fundamental, attack it through a practical theoratical way. Base on the theory, do your innovation, what if I do something that no one has done ? What if I do Z instead of X and Y ? Will the theory fail ?
We should love new stuff. More opportunity, less competitor. And the most important, new theory, new system architure. They are less reviewed and studied. They are more likely to fail.
Don’t do labor-intense job, except it makes a lot of money.(or you really need money) You can learn stuff, practic stuff(ensure you understand it, make sure you really have the ability to make you idea come true, this is not labor-intense!💻), create stuff, never be constrainted by your past knowledge, build on them.
RealWorld is good because it is real. You got motivated. You will get reward.