The drilling mud invasion is a dynamic process varying with time and reveal the permeability or the relatively permeability of the formation saturated with fluid. The mud invasion profile denotes the water saturation change with the radial distance from the borehole wall. The logging with the shallow depth of investigation (DOI), such as density logging, neutron logging and shallow electrical logging, often detects the information of the flushed zone. We chose DOI logging to model the slope invasion profile with the hyperbolic secant function, and the calculated logging reading comparing from the real logging reading to optimize the invasion profile. The results show that the mud invasion profile and the invasion depth are strongly affected by porosity, where the invasion depth reduces with porosity adding.