Two things to try; firstly drill a hole into the wall and blow some expanding foam into it (not too much!). Once set this will provide extra support, but it doesn't always work. Secondly on poor quality walls I almost always throw away the hanging brackets most kitchen suppliers provide (
these things) and instead use
long steel rails run across the backs of a run of cabinets (which need the backs notching out to accommodate). These are easier to level up and allow me to put more fixings (very useful on stud walls).
In extreme cases I have been known to rip out a section of wall board (plasterboard, tiles, etc) behind the cupboard(s) and fix a timber/plywood pattress directly to the masonry wall to carry the weight (built-up to the correct level). Once the cabinet is on the butchery work won't ever be seen. I just try to ensure that the customer can't see me doing this as they can get awfully upset, although not half as upset as they would be if they were to load the cabinet up with Royal Doulton and then have it fall off the wall!
