When the boxes are indistinguishable, you cannot use "stars and bars."
Consider first the case of $K$ indistinguishable boxes and $N$ balls. Since only the multiset of ball counts, and not their order, matters, the number of ways of distributing the balls into the boxes is the number of partitions of $N$ into at most $K$ parts. Let's call this number $P_K(N)$; there is no closed-form formula for this number, but it can be computed either recursively (it's a standard "dynamic programming" problem in computer science) or using generating functions.
Now if you have two types of boxes, you need to count the number of ways of first partitioning the balls into those that will go into the white boxes, and those that go in the black boxes, and then, the number of ways of putting those balls into those boxes: