# iptables -t nat -A PREROUTING -I eth0 -j redirect-gateway 192.168.56.2
## 5 Conclusions and Future Work  
Forensic analysis refers to the deep investigation of the crime after it happened to explore the reasons behind the crime. Our proposed forensic analysis system overcomes the low power and low memory limitation of IoT devices. The proposed forensic system makes the forensics of IoT devices in a directly connected environment more efficient and reliable. Without interruption of communication between devices, network traffic is redirected to the logging server, and traffic is analyzed by comparing with rules. These logs of malicious traffic are stored and can be regenerated in the forensics server by different methods. After capturing the logs of attacks launched on IoT devices, not only are the logs regenerated, but a dataset is also created. Multiple machine learning models are trained and tested for the detection of attacks. The decision tree algorithm performed well, with the highest accuracy of 97.29%. Our proposed system is tested in a real-time environment when a Pi camera is installed in the network. Performance of machine learning models was slightly decreased with decision tree with the highest accuracy of 96.01%. Then, multiple reports are generated to describe the details about the type of attack, the number of times an attack was launched, and the recommended action that could be taken. This forensic detail will help to draw the complete attack scenario and make the tracing of attackers possible. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline \multirow{2}{*}{**Research Paper**} & \multirow{2}{*}{**Logs Acquisition**} & \multicolumn{2}{c}{\begin{tabular}{c} **Logs Analysis** \\ **Using Forensic** \\ **Server** \\ \end{tabular} } & \multicolumn{2}{c}{\begin{tabular}{c} **ML Based Logs** \\ **Analysis** \\ \end{tabular} } & \multicolumn{2}{c}{\begin{tabular}{c} **Real-Time Traffic** \\ **Monitoring** \\ \end{tabular} } & \multicolumn{2}{c}{\
\begin{tabular}{c} **Snort Rules** \\ **Generation for** \\ **Attacks** \\ \end{tabular} } & \multicolumn{2}{c}{
\begin{tabular}{c} **Dataset** \\ **Generation** \\ **Scheme** \\ \end{tabular} } \\ \hline Forensic Analysis & & & & & & & & \\ on Internet of & & & & & & & \\ Things (IoT) & & & & & & & \\ Device using & ✓ & & ✓ & ✓ & ✓ & ✓ & ✓ \\ Machine to & & & & & & & & \\ Machine (M2M) & & & & & & & & \\ Framework & & & & & & & \\ Smart Digital & & & & & & & & \\ Forensic & & & & & & & & \\ Readiness Model & ✓ & & \(\times\) & \(\times\) & \(\times\) & ✓ & \(\times\) & \(\times\) \\ for Shadow IoT & & & & & & & & \\ Devices [40] & & & & & & & & \\ Roadmap of & & & & & & & & \\ Digital Forensics & & & & & & & & \\ Investigation & ✓ & & ✓ & \(\times\) & \(\times\) & \(\times\) & \(\times\) & \(\times\) \\ Process with & & & & & & & & \\ Discovery of & & & & & & & & \\ Tools [33] & & & & & & & & \\ A new network & & & & & & & & \\ forensic & & & & & & & & \\ framework based & & & & & & & & \\ on deep learning & & \(\times\) & & \(\times\) & ✓ & ✓ & \(\times\) & \(\times\) & \(\times\) \\ for Internet of & & & & & & & & & \\ Things networks: & & & & & & & & \\ A particle deep & & & & & & & & \\ framework [32] & & & & & & & & \\ A Comprehensive & & & & & & & & \\ Review on & & & & & & & & \\ Malware & & \(\times\) & & \(\times\) & ✓ & \(\times\) & \(\times\) & \(\times\) & \(\times\) \\ Detection & & & & & & & & & \\ Approaches [36] & & & & & & & & \\ DistLog: A & & & & & & & & \\ distributed & & & & & & & & \\ logging scheme & ✓ & & ✓ & \(\times\) & ✓ & \(\times\) & \(\times\) & \(\times\) \\ for IoT forensics & & & & & & & & \\
[47] & & & & & & & & \\ Identification of & & & & & & & & \\ IoT Devices for & & & & & & & & \\ Forensic & & & & & & & & \\ Investigation [42] & & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparative analysis with various frameworks. The area of this research can be extended by adding more attacks with categories and sub-categories. Our dataset is limited to the most common attack on IoT devices. The attributes/features can be enhanced by applying more techniques.