Edit: Seeing @Zack's answer, I'll leave it out here. "Poking a/the bear" is right on the money. I'll leave in my bit about "sleeping giants" though since it has more links and the Napoleon context.
As far as countries poking at each other, a minor part or player forcing action from its superior is "the tail wagging the dog," but it's not usually foolhardy. The connotation is that the smaller power is punching above its weight class, to the point where "wagging the dog" has become political shorthand for obfuscating political issues with distracting military action. (That may be what the smaller country is doing, but it focuses attention on the misdirected domestic politics rather than the foolishness of the military action itself.)
As far as I know, the usual English idiom for a smaller power provoking a greater is some variation on Napoleon's supposed adage
China is a sleeping giant. Let her sleep, for when she wakes she will move the world. (Quand la Chine s'éveillera , le monde tremblera.)
The US movie Tora! Tora! Tora! put a similar quote in the mouth of the Japanese admiral Yamamoto in reference to Pearl Harbor having kicked a beehive with the Pearl Harbor attack. (The filmmakers themselves claim it was in his diary.) The more usual forms these days involve "waking a sleeping tiger" or "lion". Game of Thrones used "wake the dragon". Online forums like "the beast".
Maybe the closest idiom to what you were getting at is
To be involved with someone or something that is powerful and could become troublesome or threatening.
I don't know who had it first, but the Chinese have the much more amusing chengyu
老虎屁股摸不得 (lǎohǔ pìgu mō bù dé)
You can't pet a tiger's ass
which is in general use for everything from international relations and high finance to dealing with surly drunks and martinet teachers.
"Grabbing the tiger by the tail" makes the action much more intentional. That said, it's usually used in the context of dealing with some thorny problem and isn't usually associated with foolhardiness these days. You might be better off using a less popular equivalent ("grabbing the wolf by the ears") or just using some generic idiom for soon-to-be-violently-ended idiocy like
"poking a bear with a sharp stick" or "entering a world of pain".