How do I apply a material to all sides of the brush automatically?

Better is to create a static mesh. After that, the previous brush can be treated as a mesh, with the usual texture options