Porous membranes, like nets or filters, are thin structures that allow fluid to flow through their pores. Homogenisation can be used to rigorously link the flow velocity with the stresses on the membrane via several coefficients (e.g. permeability and slip) stemming from the solution of Stokes problems at the pore level. For a periodic microstructure, the geometry of a single pore determines these coefficients for the whole membrane. However, many biological membranes are not periodic, and the porous microstructure of industrial membranes can be modified to address specific needs, resulting in non-periodic patterns of solid inclusions and pores. In this case, multiple microscopic calculations are needed to retrieve the local non-periodic membrane properties, negatively affecting the efficiency of the homogenised model. In this paper, we introduce an adjoint-based procedure that drastically reduces the computational cost of these operations by computing the pore-scale solution's first- and second-order sensitivities to geometric modifications. This adjoint-based technique only requires the solution of a few problems on a reference geometry and allows us to find the homogenised solution on any number of modified geometries. This new adjoint-based homogenisation procedure predicts the macroscopic flow around a thin aperiodic porous membrane at a fraction of the computational cost of classical approaches while maintaining comparable accuracy.