Activists have hacked into the Twitter accounts of the Kenyan defence forces and its spokesman, Major Emmanuel Chirchir.
“All of you who have stolen money #Kenya, we are coming after you,” reads one post.
The hacked posts, which protest about corruption and elitism were signed as being from activist group Anonymous.
The hackers criticised the government saying it only protected the interests of the elite and was not doing enough to tackle poachers and drug traffickers.
Major Chirchir often uses Twitter to give updates of the war against Somalia’s al-Shabab militant group.
However, Col Willy Wesonga told AP that no internal military systems had been infiltrated and that military technicians were trying to find out who was behind the attack.
Anonymous has been involved in a number of high-profile online protests and attacks in recent years. Last year, a group called Anonymous Africa hacked into the account of Zimbabwe’s defence ministry, and targeted the website of South Africa’s governing African National Congress.