63 lines
1.8 KiB
Docker
63 lines
1.8 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install 32-bit Wine, Xvfb, and utilities
|
|
RUN dpkg --add-architecture i386 && \
|
|
apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
wine \
|
|
wine32 \
|
|
xvfb \
|
|
xauth \
|
|
fonts-dejavu-core \
|
|
fonts-liberation && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Configure Wine environment variables
|
|
ENV WINEPREFIX=/wine/prefix
|
|
ENV WINEARCH=win32
|
|
ENV WINEDLLOVERRIDES="mscoree,mshtml="
|
|
|
|
RUN mkdir -p /wine/prefix
|
|
|
|
# Initialize the default Wine prefix
|
|
RUN xvfb-run -a wine wineboot -u && wineserver -w && ls -la /wine/prefix/*.reg
|
|
|
|
# Install Python 2.7 in Wine for IDAPython
|
|
COPY ./python-2.7.18.msi /tmp/python-2.7.18.msi
|
|
RUN xvfb-run -a wine msiexec /i /tmp/python-2.7.18.msi /qn && \
|
|
rm /tmp/python-2.7.18.msi
|
|
|
|
# Set up application directories
|
|
RUN mkdir -p /app/ida /input /output
|
|
COPY ./ida66_files /app/ida
|
|
|
|
# IDAPython local runtime: copy Python stdlib into IDA's python/ directory
|
|
RUN cp /wine/prefix/drive_c/Python27/python27.dll /app/ida/ && \
|
|
cp -r /wine/prefix/drive_c/Python27/Lib /app/ida/python/lib/ && \
|
|
cp -r /wine/prefix/drive_c/Python27/DLLs /app/ida/python/DLLs/ && \
|
|
sed -i 's/USE_LOCAL_PYTHON = 0/USE_LOCAL_PYTHON = 1/' /app/ida/cfg/python.cfg
|
|
|
|
# Import IDA 6.6 license configuration into Wine registry
|
|
COPY ida6_license.reg /tmp/ida6_license.reg
|
|
COPY ida-hkcu.sh /tmp/ida-hkcu.sh
|
|
RUN wine regedit /tmp/ida6_license.reg && \
|
|
rm /tmp/ida6_license.reg && \
|
|
bash /tmp/ida-hkcu.sh && \
|
|
rm /tmp/ida-hkcu.sh && \
|
|
wineserver -w && \
|
|
grep "Hex-Rays" /wine/prefix/user.reg
|
|
|
|
WORKDIR /app/ida
|
|
|
|
# Embed the analysis scripts into the image
|
|
COPY extract.py /app/ida/extract.py
|
|
|
|
# Configure the entrypoint script
|
|
COPY entrypoint.sh /app/ida/entrypoint.sh
|
|
RUN chmod +x /app/ida/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/app/ida/entrypoint.sh"]
|