[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D6AKAMDBMAB16FNSD3GWYR":3,"skill-same:01M7D6AKAMDBMAB16FNSD3GWYR":103},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M7D6AKAMDBMAB16FNSD3GWYR","analyzing-golang-malware-with-ghidra",null,"Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped\u002Fobfuscated function names (e.g. via GoResolver), and extracting embedded module\u002Fdependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a garble-packed Go binary, or recovering function names and third-party dependencies from a stripped Go executable.","SaiVatsal\u002FSkills-I-Use","SaiVatsal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F242597752?v=4","01M7D5YM1T4VXW9203M0GFAHZ1","SaiVatsalPolimera","01M7D5YM2D61ST39XVR2V7B7ZJ",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: analyzing-golang-malware-with-ghidra\ndescription: Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo\n  and pclntab structures, recovering stripped\u002Fobfuscated function names (e.g. via\n  GoResolver), and extracting embedded module\u002Fdependency strings and types from Go\n  binaries. Use when analyzing a Go-language malware sample, deobfuscating a garble-packed\n  Go binary, or recovering function names and third-party dependencies from a stripped\n  Go executable.\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags:\n- golang\n- ghidra\n- reverse-engineering\n- malware-analysis\n- binary-analysis\n- go-malware\n- disassembly\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.AE-02\n- RS.AN-03\n- ID.RA-01\n- DE.CM-01\nmitre_attack:\n- T1027\n- T1620\n- T1140\n- T1059\n---\n# Analyzing Golang Malware with Ghidra\n\n## Overview\n\nGo (Golang) has become a popular language for malware authors due to its cross-compilation capabilities, static linking that produces self-contained binaries, and the complexity it introduces for reverse engineering. Go binaries contain the entire runtime, standard library, and all dependencies statically linked, resulting in large binaries (often 5-15MB) with thousands of functions. Ghidra struggles with Go-specific string formats (non-null-terminated), stripped function names, and goroutine concurrency patterns. Specialized tools like GoResolver (Volexity, 2025) use control-flow graph similarity to automatically deobfuscate and recover function names in stripped or obfuscated Go binaries.\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing golang malware with ghidra\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Ghidra 11.0+ with JDK 17+\n- GoResolver plugin (for function name recovery)\n- Go Reverse Engineering Tool Kit (go-re.tk)\n- Python 3.9+ for helper scripts\n- Understanding of Go runtime internals (goroutines, channels, interfaces)\n- Familiarity with Go binary structure (pclntab, moduledata, itab)\n\n## Key Concepts\n\n### Go Binary Structure\n\nGo binaries embed rich metadata in the `pclntab` (PC Line Table) structure, which maps program counters to function names, source files, and line numbers. Even stripped binaries retain this metadata. The `moduledata` structure contains pointers to type information, itabs (interface tables), and the pclntab itself. Go strings are stored as a pointer-length pair rather than null-terminated C strings.\n\n### Function Recovery in Stripped Binaries\n\nDespite stripping symbol tables, Go binaries retain function names within the pclntab. However, obfuscation tools like garble rename functions to random strings. GoResolver addresses this by computing control-flow graph signatures of obfuscated functions and matching them against a database of known Go standard library and third-party package functions.\n\n### Crate\u002FDependency Extraction\n\nGo's dependency management embeds module paths and version strings in the binary. Extracting these reveals the malware's third-party dependencies (HTTP libraries, encryption packages, C2 frameworks), which provides insight into capabilities without full reverse engineering.\n\n## Workflow\n\n### Step 1: Initial Binary Analysis\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Analyze Go binary metadata for malware analysis.\"\"\"\nimport struct\nimport sys\nimport re\n\n\ndef find_go_build_info(data):\n    \"\"\"Extract Go build information from binary.\"\"\"\n    # Go buildinfo magic: \\xff Go buildinf:\n    magic = b'\\xff Go buildinf:'\n    offset = data.find(magic)\n    if offset == -1:\n        return None\n\n    print(f\"[+] Go build info at offset 0x{offset:x}\")\n\n    # Extract Go version string nearby\n    go_version = re.search(rb'go\\d+\\.\\d+(?:\\.\\d+)?', data[offset:offset+256])\n    if go_version:\n        print(f\"  Go Version: {go_version.group().decode()}\")\n\n    return offset\n\n\ndef find_pclntab(data):\n    \"\"\"Locate the pclntab (PC Line Table) structure.\"\"\"\n    # pclntab magic bytes vary by Go version\n    magics = {\n        b'\\xfb\\xff\\xff\\xff\\x00\\x00': \"Go 1.2-1.15\",\n        b'\\xfa\\xff\\xff\\xff\\x00\\x00': \"Go 1.16-1.17\",\n        b'\\xf1\\xff\\xff\\xff\\x00\\x00': \"Go 1.18-1.19\",\n        b'\\xf0\\xff\\xff\\xff\\x00\\x00': \"Go 1.20+\",\n    }\n\n    for magic, version in magics.items():\n        offset = data.find(magic)\n        if offset != -1:\n            print(f\"[+] pclntab found at 0x{offset:x} ({version})\")\n            return offset, version\n\n    return None, None\n\n\ndef extract_function_names(data, pclntab_offset):\n    \"\"\"Extract function names from pclntab.\"\"\"\n    if pclntab_offset is None:\n        return []\n\n    functions = []\n    # Function name strings follow specific patterns\n    func_pattern = re.compile(\n        rb'(?:main|runtime|fmt|net|os|crypto|encoding|io|sync|'\n        rb'syscall|reflect|strings|bytes|path|time|math|sort|'\n        rb'github\\.com|golang\\.org)[\u002F\\.][\\w\u002F.]+',\n    )\n\n    for match in func_pattern.finditer(data):\n        name = match.group().decode('utf-8', errors='replace')\n        if len(name) > 4 and len(name) \u003C 200:\n            functions.append(name)\n\n    return sorted(set(functions))\n\n\ndef extract_go_strings(data):\n    \"\"\"Extract Go-style strings (pointer+length pairs).\"\"\"\n    # Go strings are not null-terminated; extract readable sequences\n    strings = []\n    ascii_pattern = re.compile(rb'[\\x20-\\x7e]{10,}')\n\n    for match in ascii_pattern.finditer(data):\n        s = match.group().decode('ascii')\n        # Filter for interesting malware strings\n        interesting = [\n            'http', 'https', 'tcp', 'udp', 'dns',\n            'cmd', 'shell', 'exec', 'upload', 'download',\n            'encrypt', 'decrypt', 'key', 'token', 'password',\n            'c2', 'beacon', 'agent', 'implant', 'bot',\n            'mutex', 'persist', 'registry', 'scheduled',\n        ]\n        if any(kw in s.lower() for kw in interesting):\n            strings.append(s)\n\n    return strings\n\n\ndef extract_dependencies(data):\n    \"\"\"Extract Go module dependencies from binary.\"\"\"\n    deps = []\n    # Module paths follow pattern: github.com\u002Fuser\u002Frepo\n    dep_pattern = re.compile(\n        rb'((?:github\\.com|gitlab\\.com|golang\\.org|gopkg\\.in|'\n        rb'go\\.etcd\\.io|google\\.golang\\.org)\u002F[^\\x00\\s]{5,80})'\n    )\n\n    for match in dep_pattern.finditer(data):\n        dep = match.group().decode('utf-8', errors='replace')\n        deps.append(dep)\n\n    unique_deps = sorted(set(deps))\n    return unique_deps\n\n\ndef analyze_go_binary(filepath):\n    \"\"\"Full analysis of Go malware binary.\"\"\"\n    with open(filepath, 'rb') as f:\n        data = f.read()\n\n    print(f\"[+] Analyzing Go binary: {filepath}\")\n    print(f\"  File size: {len(data):,} bytes\")\n    print(\"=\" * 60)\n\n    # Build info\n    find_go_build_info(data)\n\n    # pclntab\n    pclntab_offset, go_version = find_pclntab(data)\n\n    # Functions\n    functions = extract_function_names(data, pclntab_offset)\n    print(f\"\\n[+] Recovered {len(functions)} function names\")\n\n    # Categorize functions\n    categories = {\n        \"network\": [], \"crypto\": [], \"os_exec\": [],\n        \"file_io\": [], \"main\": [], \"third_party\": [],\n    }\n    for f in functions:\n        if 'net\u002F' in f or 'http' in f.lower():\n            categories[\"network\"].append(f)\n        elif 'crypto' in f:\n            categories[\"crypto\"].append(f)\n        elif 'os\u002Fexec' in f or 'syscall' in f:\n            categories[\"os_exec\"].append(f)\n        elif 'os.' in f or 'io\u002F' in f:\n            categories[\"file_io\"].append(f)\n        elif f.startswith('main.'):\n            categories[\"main\"].append(f)\n        elif 'github.com' in f or 'golang.org' in f:\n            categories[\"third_party\"].append(f)\n\n    for cat, funcs in categories.items():\n        if funcs:\n            print(f\"\\n  [{cat}] ({len(funcs)} functions):\")\n            for fn in funcs[:10]:\n                print(f\"    {fn}\")\n\n    # Dependencies\n    deps = extract_dependencies(data)\n    print(f\"\\n[+] Dependencies ({len(deps)}):\")\n    for dep in deps[:20]:\n        print(f\"    {dep}\")\n\n    # Suspicious strings\n    sus_strings = extract_go_strings(data)\n    print(f\"\\n[+] Suspicious strings ({len(sus_strings)}):\")\n    for s in sus_strings[:20]:\n        print(f\"    {s}\")\n\n\nif __name__ == \"__main__\":\n    if len(sys.argv) \u003C 2:\n        print(f\"Usage: {sys.argv[0]} \u003Cgo_binary>\")\n        sys.exit(1)\n    analyze_go_binary(sys.argv[1])\n```\n\n### Step 2: Ghidra Analysis Script\n\n```python\n# Ghidra script (run within Ghidra's script manager)\n# Save as AnalyzeGoBinary.py in Ghidra scripts directory\n\n# @category MalwareAnalysis\n# @description Analyze Go binary structure and recover metadata\n\ndef analyze_go_binary_ghidra():\n    \"\"\"Ghidra script for Go binary analysis.\"\"\"\n    from ghidra.program.model.mem import MemoryAccessException\n\n    program = getCurrentProgram()\n    memory = program.getMemory()\n    listing = program.getListing()\n\n    print(\"[+] Go Binary Analysis Script\")\n    print(f\"  Program: {program.getName()}\")\n\n    # Find pclntab\n    pclntab_magics = [\n        bytes([0xf0, 0xff, 0xff, 0xff]),  # Go 1.20+\n        bytes([0xf1, 0xff, 0xff, 0xff]),  # Go 1.18-1.19\n        bytes([0xfa, 0xff, 0xff, 0xff]),  # Go 1.16-1.17\n        bytes([0xfb, 0xff, 0xff, 0xff]),  # Go 1.2-1.15\n    ]\n\n    for magic in pclntab_magics:\n        addr = memory.findBytes(\n            program.getMinAddress(), magic, None, True, None\n        )\n        if addr:\n            print(f\"[+] pclntab found at {addr}\")\n            # Create label\n            program.getSymbolTable().createLabel(\n                addr, \"go_pclntab\", None,\n                ghidra.program.model.symbol.SourceType.ANALYSIS\n            )\n            break\n\n    # Fix Go string definitions\n    # Go strings are ptr+len, not null terminated\n    print(\"[+] Fixing Go string references...\")\n\n    # Search for function names containing package paths\n    symbol_table = program.getSymbolTable()\n    func_count = 0\n    for symbol in symbol_table.getAllSymbols(True):\n        name = symbol.getName()\n        if ('.' in name and\n            any(pkg in name for pkg in\n                ['main.', 'runtime.', 'net.', 'crypto.', 'os.'])):\n            func_count += 1\n\n    print(f\"[+] Found {func_count} Go function symbols\")\n\n\n# Execute\nanalyze_go_binary_ghidra()\n```\n\n## Validation Criteria\n\n- Go version and build information extracted from binary\n- pclntab located and parsed for function name recovery\n- Third-party dependencies identified revealing malware capabilities\n- Main package functions enumerated for targeted analysis\n- Network, crypto, and OS exec functions categorized\n- Ghidra analysis correctly labels Go runtime structures\n\n## References\n\n- [CUJO AI - Reverse Engineering Go Binaries with Ghidra](https:\u002F\u002Fcujo.com\u002Fblog\u002Freverse-engineering-go-binaries-with-ghidra\u002F)\n- [Volexity GoResolver](https:\u002F\u002Fwww.volexity.com\u002Fblog\u002F2025\u002F04\u002F01\u002Fgoresolver-using-control-flow-graph-similarity-to-deobfuscate-golang-binaries-automatically\u002F)\n- [Go Reverse Engineering Tool Kit](https:\u002F\u002Fgo-re.tk\u002Fabout\u002F)\n- [SentinelOne AlphaGolang](https:\u002F\u002Fwww.sentinelone.com\u002Flabs\u002Falphagolang-a-step-by-step-go-malware-reversing-methodology-for-ida-pro\u002F)\n- [Go Binary Reversing Notes](https:\u002F\u002Fgist.github.com\u002F0xdevalias\u002F4e430914124c3fd2c51cb7ac2801acba)\n","# Analyzing Golang Malware with Ghidra\n\n## Overview\n\nGo (Golang) has become a popular language for malware authors due to its cross-compilation capabilities, static linking that produces self-contained binaries, and the complexity it introduces for reverse engineering. Go binaries contain the entire runtime, standard library, and all dependencies statically linked, resulting in large binaries (often 5-15MB) with thousands of functions. Ghidra struggles with Go-specific string formats (non-null-terminated), stripped function names, and goroutine concurrency patterns. Specialized tools like GoResolver (Volexity, 2025) use control-flow graph similarity to automatically deobfuscate and recover function names in stripped or obfuscated Go binaries.\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing golang malware with ghidra\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Ghidra 11.0+ with JDK 17+\n- GoResolver plugin (for function name recovery)\n- Go Reverse Engineering Tool Kit (go-re.tk)\n- Python 3.9+ for helper scripts\n- Understanding of Go runtime internals (goroutines, channels, interfaces)\n- Familiarity with Go binary structure (pclntab, moduledata, itab)\n\n## Key Concepts\n\n### Go Binary Structure\n\nGo binaries embed rich metadata in the `pclntab` (PC Line Table) structure, which maps program counters to function names, source files, and line numbers. Even stripped binaries retain this metadata. The `moduledata` structure contains pointers to type information, itabs (interface tables), and the pclntab itself. Go strings are stored as a pointer-length pair rather than null-terminated C strings.\n\n### Function Recovery in Stripped Binaries\n\nDespite stripping symbol tables, Go binaries retain function names within the pclntab. However, obfuscation tools like garble rename functions to random strings. GoResolver addresses this by computing control-flow graph signatures of obfuscated functions and matching them against a database of known Go standard library and third-party package functions.\n\n### Crate\u002FDependency Extraction\n\nGo's dependency management embeds module paths and version strings in the binary. Extracting these reveals the malware's third-party dependencies (HTTP libraries, encryption packages, C2 frameworks), which provides insight into capabilities without full reverse engineering.\n\n## Workflow\n\n### Step 1: Initial Binary Analysis\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Analyze Go binary metadata for malware analysis.\"\"\"\nimport struct\nimport sys\nimport re\n\n\ndef find_go_build_info(data):\n    \"\"\"Extract Go build information from binary.\"\"\"\n    # Go buildinfo magic: \\xff Go buildinf:\n    magic = b'\\xff Go buildinf:'\n    offset = data.find(magic)\n    if offset == -1:\n        return None\n\n    print(f\"[+] Go build info at offset 0x{offset:x}\")\n\n    # Extract Go version string nearby\n    go_version = re.search(rb'go\\d+\\.\\d+(?:\\.\\d+)?', data[offset:offset+256])\n    if go_version:\n        print(f\"  Go Version: {go_version.group().decode()}\")\n\n    return offset\n\n\ndef find_pclntab(data):\n    \"\"\"Locate the pclntab (PC Line Table) structure.\"\"\"\n    # pclntab magic bytes vary by Go version\n    magics = {\n        b'\\xfb\\xff\\xff\\xff\\x00\\x00': \"Go 1.2-1.15\",\n        b'\\xfa\\xff\\xff\\xff\\x00\\x00': \"Go 1.16-1.17\",\n        b'\\xf1\\xff\\xff\\xff\\x00\\x00': \"Go 1.18-1.19\",\n        b'\\xf0\\xff\\xff\\xff\\x00\\x00': \"Go 1.20+\",\n    }\n\n    for magic, version in magics.items():\n        offset = data.find(magic)\n        if offset != -1:\n            print(f\"[+] pclntab found at 0x{offset:x} ({version})\")\n            return offset, version\n\n    return None, None\n\n\ndef extract_function_names(data, pclntab_offset):\n    \"\"\"Extract function names from pclntab.\"\"\"\n    if pclntab_offset is None:\n        return []\n\n    functions = []\n    # Function name strings follow specific patterns\n    func_pattern = re.compile(\n        rb'(?:main|runtime|fmt|net|os|crypto|encoding|io|sync|'\n        rb'syscall|reflect|strings|bytes|path|time|math|sort|'\n        rb'github\\.com|golang\\.org)[\u002F\\.][\\w\u002F.]+',\n    )\n\n    for match in func_pattern.finditer(data):\n        name = match.group().decode('utf-8', errors='replace')\n        if len(name) > 4 and len(name) \u003C 200:\n            functions.append(name)\n\n    return sorted(set(functions))\n\n\ndef extract_go_strings(data):\n    \"\"\"Extract Go-style strings (pointer+length pairs).\"\"\"\n    # Go strings are not null-terminated; extract readable sequences\n    strings = []\n    ascii_pattern = re.compile(rb'[\\x20-\\x7e]{10,}')\n\n    for match in ascii_pattern.finditer(data):\n        s = match.group().decode('ascii')\n        # Filter for interesting malware strings\n        interesting = [\n            'http', 'https', 'tcp', 'udp', 'dns',\n            'cmd', 'shell', 'exec', 'upload', 'download',\n            'encrypt', 'decrypt', 'key', 'token', 'password',\n            'c2', 'beacon', 'agent', 'implant', 'bot',\n            'mutex', 'persist', 'registry', 'scheduled',\n        ]\n        if any(kw in s.lower() for kw in interesting):\n            strings.append(s)\n\n    return strings\n\n\ndef extract_dependencies(data):\n    \"\"\"Extract Go module dependencies from binary.\"\"\"\n    deps = []\n    # Module paths follow pattern: github.com\u002Fuser\u002Frepo\n    dep_pattern = re.compile(\n        rb'((?:github\\.com|gitlab\\.com|golang\\.org|gopkg\\.in|'\n        rb'go\\.etcd\\.io|google\\.golang\\.org)\u002F[^\\x00\\s]{5,80})'\n    )\n\n    for match in dep_pattern.finditer(data):\n        dep = match.group().decode('utf-8', errors='replace')\n        deps.append(dep)\n\n    unique_deps = sorted(set(deps))\n    return unique_deps\n\n\ndef analyze_go_binary(filepath):\n    \"\"\"Full analysis of Go malware binary.\"\"\"\n    with open(filepath, 'rb') as f:\n        data = f.read()\n\n    print(f\"[+] Analyzing Go binary: {filepath}\")\n    print(f\"  File size: {len(data):,} bytes\")\n    print(\"=\" * 60)\n\n    # Build info\n    find_go_build_info(data)\n\n    # pclntab\n    pclntab_offset, go_version = find_pclntab(data)\n\n    # Functions\n    functions = extract_function_names(data, pclntab_offset)\n    print(f\"\\n[+] Recovered {len(functions)} function names\")\n\n    # Categorize functions\n    categories = {\n        \"network\": [], \"crypto\": [], \"os_exec\": [],\n        \"file_io\": [], \"main\": [], \"third_party\": [],\n    }\n    for f in functions:\n        if 'net\u002F' in f or 'http' in f.lower():\n            categories[\"network\"].append(f)\n        elif 'crypto' in f:\n            categories[\"crypto\"].append(f)\n        elif 'os\u002Fexec' in f or 'syscall' in f:\n            categories[\"os_exec\"].append(f)\n        elif 'os.' in f or 'io\u002F' in f:\n            categories[\"file_io\"].append(f)\n        elif f.startswith('main.'):\n            categories[\"main\"].append(f)\n        elif 'github.com' in f or 'golang.org' in f:\n            categories[\"third_party\"].append(f)\n\n    for cat, funcs in categories.items():\n        if funcs:\n            print(f\"\\n  [{cat}] ({len(funcs)} functions):\")\n            for fn in funcs[:10]:\n                print(f\"    {fn}\")\n\n    # Dependencies\n    deps = extract_dependencies(data)\n    print(f\"\\n[+] Dependencies ({len(deps)}):\")\n    for dep in deps[:20]:\n        print(f\"    {dep}\")\n\n    # Suspicious strings\n    sus_strings = extract_go_strings(data)\n    print(f\"\\n[+] Suspicious strings ({len(sus_strings)}):\")\n    for s in sus_strings[:20]:\n        print(f\"    {s}\")\n\n\nif __name__ == \"__main__\":\n    if len(sys.argv) \u003C 2:\n        print(f\"Usage: {sys.argv[0]} \u003Cgo_binary>\")\n        sys.exit(1)\n    analyze_go_binary(sys.argv[1])\n```\n\n### Step 2: Ghidra Analysis Script\n\n```python\n# Ghidra script (run within Ghidra's script manager)\n# Save as AnalyzeGoBinary.py in Ghidra scripts directory\n\n# @category MalwareAnalysis\n# @description Analyze Go binary structure and recover metadata\n\ndef analyze_go_binary_ghidra():\n    \"\"\"Ghidra script for Go binary analysis.\"\"\"\n    from ghidra.program.model.mem import MemoryAccessException\n\n    program = getCurrentProgram()\n    memory = program.getMemory()\n    listing = program.getListing()\n\n    print(\"[+] Go Binary Analysis Script\")\n    print(f\"  Program: {program.getName()}\")\n\n    # Find pclntab\n    pclntab_magics = [\n        bytes([0xf0, 0xff, 0xff, 0xff]),  # Go 1.20+\n        bytes([0xf1, 0xff, 0xff, 0xff]),  # Go 1.18-1.19\n        bytes([0xfa, 0xff, 0xff, 0xff]),  # Go 1.16-1.17\n        bytes([0xfb, 0xff, 0xff, 0xff]),  # Go 1.2-1.15\n    ]\n\n    for magic in pclntab_magics:\n        addr = memory.findBytes(\n            program.getMinAddress(), magic, None, True, None\n        )\n        if addr:\n            print(f\"[+] pclntab found at {addr}\")\n            # Create label\n            program.getSymbolTable().createLabel(\n                addr, \"go_pclntab\", None,\n                ghidra.program.model.symbol.SourceType.ANALYSIS\n            )\n            break\n\n    # Fix Go string definitions\n    # Go strings are ptr+len, not null terminated\n    print(\"[+] Fixing Go string references...\")\n\n    # Search for function names containing package paths\n    symbol_table = program.getSymbolTable()\n    func_count = 0\n    for symbol in symbol_table.getAllSymbols(True):\n        name = symbol.getName()\n        if ('.' in name and\n            any(pkg in name for pkg in\n                ['main.', 'runtime.', 'net.', 'crypto.', 'os.'])):\n            func_count += 1\n\n    print(f\"[+] Found {func_count} Go function symbols\")\n\n\n# Execute\nanalyze_go_binary_ghidra()\n```\n\n## Validation Criteria\n\n- Go version and build information extracted from binary\n- pclntab located and parsed for function name recovery\n- Third-party dependencies identified revealing malware capabilities\n- Main package functions enumerated for targeted analysis\n- Network, crypto, and OS exec functions categorized\n- Ghidra analysis correctly labels Go runtime structures\n\n## References\n\n- [CUJO AI - Reverse Engineering Go Binaries with Ghidra](https:\u002F\u002Fcujo.com\u002Fblog\u002Freverse-engineering-go-binaries-with-ghidra\u002F)\n- [Volexity GoResolver](https:\u002F\u002Fwww.volexity.com\u002Fblog\u002F2025\u002F04\u002F01\u002Fgoresolver-using-control-flow-graph-similarity-to-deobfuscate-golang-binaries-automatically\u002F)\n- [Go Reverse Engineering Tool Kit](https:\u002F\u002Fgo-re.tk\u002Fabout\u002F)\n- [SentinelOne AlphaGolang](https:\u002F\u002Fwww.sentinelone.com\u002Flabs\u002Falphagolang-a-step-by-step-go-malware-reversing-methodology-for-ida-pro\u002F)\n- [Go Binary Reversing Notes](https:\u002F\u002Fgist.github.com\u002F0xdevalias\u002F4e430914124c3fd2c51cb7ac2801acba)\n",{"name":5,"tags":25,"author":33,"domain":34,"license":15,"version":35,"nist_csf":36,"subdomain":29,"description":7,"mitre_attack":41},[26,27,28,29,30,31,32],"golang","ghidra","reverse-engineering","malware-analysis","binary-analysis","go-malware","disassembly","mahipal","cybersecurity","1.0",[37,38,39,40],"DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01",[42,43,44,45],"T1027","T1620","T1140","T1059","main","8a3b3de73262a4c4db64523949360f3c599c2fb1","Anthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra",0,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use","https:\u002F\u002Fgithub.com\u002FSaiVatsal","https:\u002F\u002Fsaivatsal.github.io\u002FPortfolio\u002F","The Longer It Takes The Stronger It Becomes ","2026-09-21 22:45:58",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add SaiVatsal\u002FSkills-I-Use --skill analyzing-golang-malware-with-ghidra",{"tool":61,"command":62},"bunx","bunx skills add SaiVatsal\u002FSkills-I-Use --skill analyzing-golang-malware-with-ghidra",{"tool":64,"command":65},"pnpm","pnpm dlx skills add SaiVatsal\u002FSkills-I-Use --skill analyzing-golang-malware-with-ghidra","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002FSKILL.md",true,[69,75,79,85,89,93,99],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"assets\u002Ftemplate.md","ASSET","资产文件",752,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002Fassets\u002Ftemplate.md",{"path":76,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fapi-reference.md","REFERENCE","参考文档",2602,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002Freferences\u002Fapi-reference.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fstandards.md",882,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002Freferences\u002Fstandards.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fworkflows.md",1606,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002Freferences\u002Fworkflows.md",{"path":94,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fagent.py","SCRIPT","脚本",9117,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002Fscripts\u002Fagent.py",{"path":100,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Fprocess.py",4706,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fanalyzing-golang-malware-with-ghidra\u002Fscripts\u002Fprocess.py",[104,112,120,129,136,143],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":108,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":20},"01M7DJZP6E6KMBQV4CZSDPZEZ8","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":116,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":20},"01M7DJZFTS5TS06K2TV3MDTE67","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M7DJRK4SRQ908F2TJM6EZ7EV","ui-styling","Create beautiful, accessible user interfaces with shadcn\u002Fui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.","MIT","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fui-styling\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fui-styling\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M7DJR902059VEQP23PVM2WA0","design","Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social\u002Fads\u002Fweb\u002Fprint), icon design (15 styles, SVG, Gemini 3.1 Pro), social photos (HTML→screenshot, multi-platform). Actions: design logo, create CIP, generate mockups, build slides, design banner, generate icon, create social photos, social media images, brand identity, design system. Platforms: Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest, TikTok, Threads, Google Ads.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fdesign\u002FSKILL.md",[],[],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":20},"01M7DJR56QF5N6XYTCPCFHFMNP","design-system","Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing\u002Ftypography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fdesign-system\u002FSKILL.md",[],[],{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":20},"01M7DJQXB6M0SFF7NX8J5N01AH","banner-design","Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter\u002FX, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fbanner-design\u002FSKILL.md",[],[]]