those are a type of silkworm (moth larvae). Very Very VERY BAD NEWS. A caterpillar around means your buds will start to die and fall off. I have dealt with this outdoor. You need to hand pick out every single one and smash them. Pull apart your buds nicely and look hard for them. They devour the inside of the bud nodes where it connects to the main branch. If you see bud areas start to turn brown it means the worm got to it and bit the lifeline out of it. Be vigilant. Go now and get them all off and keep your eyes open from now, till harvest day, even to smoke day. They survived in my cure jar for a week!
Oh...and their poops look like tiny groupings of black dirt except the pieces are all the same size and spread throughout the bud.