How to create porous material
You could use 3d dimensional procedural textures for volumetric rendering:


With a node setup like:



The scale of the voronoi texture controls the size of the bubbles. You could also try noise or musgrave texture with different settings.

For more details I reduced the step size in the volumnetric render settings: