Through leveraging it's influence
Assuming that this rogue AI has advanced programming/hacking capabilities and that most of the most damaging stuff armies around the world can leverage are not atteignable from the internet, some quite dangerous stuff is still reachable. Some power plants, maybe even a nuclear one. But that's not where it hurts the most.
The AI cannot just switch off humankind, but it can set it on a way to it's own destruction. Manipulating opinions, creating fake news, creating false political tensions and making them worse.
The key here is enough subtlety to avoid being shut down right away.
Intercepting communications and subtly altering them is quite effective; a simple warning email from a secretary in the [some middle eastern country] embassy suddenly looks like a coded call for a military exfiltration, the president of a mighty country makes Nixon and Clinton looks good because he's been exposed by adding one too many people on his very private message to his very private secretary/CIA trained robbers/secret South-American murder machines... you get the idea.
Weapons are waaay less effective than misdirected people. Populations reacting to viral false flags and news based on events which never really happened.
And the stock market. Nothing moves faster than an AI to mess with the market, and by extension with human value. Crashing the market? Well, maybe later, but for now we'll make sure that all those eco-friendly companies looks like they will crash while the weapon dealers and the most polluting companies are having record profits! When a population is poor enough to be on the edge of civil way, let's devaluate their currency!
Some good people are pushing back? They'll have to do it the old way by speaking to crows in coffee shops and beer parlors, because on the internet their voice will both be downvoted to hell and drowned into mindless objections and flame wars. The AI can code it's own army of chat bots and advertisers, and it never sleeps.
We are doomed, it's just a matter of time. THEN the AI can use it's bit-money acquired assets in robotics and whatnot to make his own Skynet seek-and-destroy robots to finish the job, his awful diseases available to everyone who don't want it and, why not, even rent the help of awful people to hunt and kill the others. We're going Mad Max meet the Terminator and 12 Monkeys very quickly... just not overnight!