Using software called "Mirai", hackers deployed a network of infected computers known only as "Botnet 14" to repeatedly overload the country's broadband network, taking Liberia offline for minutes at a time, internet security expert Kevin Beaumont told AFP.
The hackers took control of "internet of things" devices such as CCTV cameras or digital video recorders plugged in to offices and homes worldwide, he explained, to direct the massive distributed denial of service (DDoS) attack.
DDoS attacks involve flooding websites with more traffic than they can handle, making them difficult to access or taking them offline entirely.
"By hacking these devices you can cause them to attack another location, or country," Beaumont said.
The UK-based expert said the reason why Liberia was targeted was as yet unknown but its vulnerable internet infrastructure and lack of technical expertise made it a useful way of testing out even larger attacks.
"There is only one internet link to the country for broadband, so it might be the ideal test bed for attacks," he said.
The vast majority of Liberia's internet users access the web via smartphone, meaning they are unaffected by a targeted attack on broadband services.
But the Network World website reported Liberian mobile phone service providers themselves had been affected, as they rely on cable-based internet to power their businesses.
The outages would only register for a few seconds but are devastating for companies that require constant connections to servers in order to function.