Friday, December 27, 2024

You can snoop on a Windows computer from a web browser and use the API – Živě.cz

Date:

Mom, I think someone installed a virus and shut down our computer. We are probably on that botnet. Alabama hackers!

In today’s sequel to our series on electronic programming, we’ll look at a feature that has been a part of Windows (and not just desktop) for years, but I daresay, except for network administrators for whom it is intended , most of the users don’t know at all.

Is named Windows Device Portaland, as the name suggests, they are basically backdoor to system via LAN and web protocol. Developers have at their disposal simple HTTP REST API and administrators go directly to the full HTML interface that they load in the browser.

And since we already have Windows hidden divine mode, let’s call the Windows Device Portal for the rest of the article divine back door!

Remote computer shutdown from Raspberry Pi using divine back doors:

We activate the divine back door

By default the doors are closed, but you can activate them in modern settings in section For developers under the name Device Portal. Once they run, get the operating system on your local IP address and a free TCP port 50080 start the web server.

Click to enlarge the image
Activating the Device Portal in Windows 11. The settings in Windows 10 are identical, but the Settings application has a different interface. Look for developer tools in it

So that the server is not accessible to everyone on the home network, you can also protect it with a username and password, and you will also find instructions on how to protect it with an encrypted HTTPS connection on the website. But for the simplicity of today’s example, unencrypted HTTP and reliance on home network security will suffice.

Web browser

Now when you retrieve the address of the target machine with the appropriate TCP port in any web browser and on any computer on the local network, the web interface for managing your operating system is displayed.

Click to enlarge the imageClick to enlarge the image
Web Explorer can explore the folders and files of the logged in user

You have practically anything at your disposal. An overview of running modern applications loads on the home screen. Application Manager and options for remote installation. In the card File Browser again you will find access to the root folder of the logged in user, you can browse and happily delete, download and of course me to register files from your own device.

Web task manager

Map Running processes It is already a web-based alternative to Task Manager by name, and you can click the cross to remotely kill any process for which you have the proper rights. And to have the complete Task Manager, tab Performance It also shows classic time charts with CPU, GPU, memory, and network usage.

Click to enlarge the image
Live graphs of the system load in the browser.

Hardware, Bluetooth and Wi-Fi information

Map Device administrator displays a list of connected devices, tab Bluetooth All paired keyboards, mice, headphones, and as a bonus, the scanner from the surrounding BT / BLE boxes will start. Similarly, the card Networking retrieves all network devices, their IP addresses and, if the computer is equipped with Wi-Fi, starts a scan of the available networks in the vicinity.

Click to enlarge the image
Connected BT / BLE devices that you can remotely disconnect and a scanner from the surrounding area
Click to enlarge the image
Information about network adapters and surrounding Wi-Fi

Web regedit and screenshots

In the end there is no lack Log reader – basically a web equivalent of the good old regedit – a Windows Administrator, which displays the complete list of GUI elements visible on the screen that the window manager works with. Selecting an item in the list will display its appearance on the right. So the divine backdoor can also control visual events on the screen.

Click to enlarge the imageClick to enlarge the image
System log reader and window manager item list, including thumbnails. In this case, the dock application part item is showing up in Windows 11, so I have an overview of the window programs that are currently running.

Machine control from a PC via HTTP REST API

However, as we said in the introduction, we can also access the Windows Device Portal server through a simple HTTP REST API, which corresponds to machine-readable JSON format.

So if we want to know the name of the computer, just send an HTTP GET query:

/ api / os / machinename


In the next part for subscribers, we will show how to work with the API using cURL on Raspberry Pi, PowerShell on Windows, and finally we will write a full client in Python, which will shut down the computer with the command.


The continuation of the article belongs to the premium content

Get unlimited access and Live without ads by 41 CZK monthly

Ebenezer Robbins
Ebenezer Robbins
Introvert. Beer guru. Communicator. Travel fanatic. Web advocate. Certified alcohol geek. Tv buff. Subtly charming internet aficionado.

Share post:

Popular

More like this
Related

How to Use Video Marketing to Promote B2C Products?

Video marketing has emerged as a powerful tool for...

Adapting to Change: The Future for Leopard Tortoise Environments

Leopard tortoises, known for their striking spotted shells and...

Debunking Common Misconceptions in Nail Care

Acrylic nails, a popular choice for those seeking durable...

Top Reasons to Buy Instagram Likes from InsFollowPro.com

Buying Instagram followers is a strategy some individuals and...